-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8339288: Improve diagnostic logging runtime/cds/DeterministicDump.java #21913
8339288: Improve diagnostic logging runtime/cds/DeterministicDump.java #21913
Conversation
👋 Welcome back matsaave! A progress list of the required criteria for merging this PR into |
@matias9927 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 190 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@matias9927 The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
Two suggestions: (1) I think it will be good to print an indicator on the line that differs. Something like
(2) Sometimes an object spans over many lines. It will be good to remember the first line of the very last object (the
before printing the rest of the output. |
That's a good idea! I think my example output is a little confusing because there are actually two differences in it. Using your idea, the output would look like this:
I make sure extra lines are printed after the diff but I can include "..." on top of that as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just one nit.
long offset = spOffset + cdsFileMapRegionSize * region + spUsedOffset; | ||
return readInt(archiveFile, offset, sizetSize); | ||
} | ||
|
||
// used region size | ||
public static long usedRegionSizeAligned(File archiveFile, int region) throws Exception { | ||
long offset = spOffset + cdsFileMapRegionSize * region + spUsedOffset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just call usedRegionSize
like the following?
long used = usedRegionSize(archiveFile, region);
Thanks for the feedback and reviews @iklam and @calvinccheung ! |
Going to push as commit 3b28354.
Your commit was automatically rebased without conflicts. |
@matias9927 Pushed as commit 3b28354. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The test
DeterministicDump.java
fails frequently since it is sensitive to changes in CDS, and with it's current logging, it is very difficult to diagnose the root cause of these failures. The current output looks like this:This change was verified locally by generating non-deterministic archives and map files.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21913/head:pull/21913
$ git checkout pull/21913
Update a local copy of the PR:
$ git checkout pull/21913
$ git pull https://git.openjdk.org/jdk.git pull/21913/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21913
View PR using the GUI difftool:
$ git pr show -t 21913
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21913.diff
Using Webrev
Link to Webrev Comment