-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8346239: Improve memory efficiency of JimageDiffGenerator #22835
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@MBaesken @RealFYang Could you please test this PR since you originally ran into JDK-8346239 (this bug) and JDK-8344036. Thanks! |
Yes, I can confirm that it works on my linux-aarch64 platform. Great! Thanks! |
Hi Severin, I added it to our build/test queue. |
Thank you! |
Thanks, Matthias! |
Please review this fairly simple change to improve how the
JimageDiffGenerator
works. The original implementation is pretty naive and read all bytes into memory and then compared them. This improved version only reads bytes on a bound buffer into memory compares those bytes and if equal continues on to reading the next bytes (2k
at most) at a time. Previously it was2*N
(whereN
is the file size of a file in bytes) part of the JDK. Ouch.There is still the off-chance of reading a full file into memory when the generator detects a change, but this shouldn't happen for large files since the total diff should be around
600K
as of today.This also reverts changes from JDK-8344036 other than the
/timeout
change to the test, which is preserved as I think this bump is no longer needed.Testing:
--with-native-debug-symbols=internal
(so as to have a large libjvm.so).Thoughts?
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22835/head:pull/22835
$ git checkout pull/22835
Update a local copy of the PR:
$ git checkout pull/22835
$ git pull https://git.openjdk.org/jdk.git pull/22835/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22835
View PR using the GUI difftool:
$ git pr show -t 22835
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22835.diff
Using Webrev
Link to Webrev Comment