-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8299672: Enhance HeapDump JFR event #11864
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
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
@@ -65,6 +65,8 @@ public static void main(String[] args) throws Exception { | |||
Events.assertField(e, "gcBeforeDump").equal(true); | |||
Events.assertField(e, "onOutOfMemoryError").equal(false); | |||
Events.assertField(e, "size").equal(Files.size(path)); | |||
Events.assertField(e, "compression").equal(-1); |
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.
I would use below(1) instead of equals(-1), since it is not specified which value < 1 is used when gzip compression is not enabled. Or you could do the sanitizing when storing the value in the event itself. But in that case I would probably use 0 instead of -1.
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.
Hi Ralf, thanks for the review.
I adjusted the test as suggested.
@MBaesken 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 81 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 |
What's the rationale for adding compression level and overwrite? |
The support for gzipped heap dumps was added recently with "8237354: Add option to jcmd to write a gzipped heap dump" but not reflected in JFR so I wanted to add it here too to get a full picture of the heap dump creation. |
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.
Some spelling issues, for consistency.
@@ -1144,11 +1144,14 @@ | |||
<Field type="ulong" contentType="bytes" name="size" label="Size Written" /> | |||
</Event> | |||
|
|||
<Event name="HeapDump" category="Java Virtual Machine, Diagnostics" label="Heap Dump" stackTrace="true" thread="true"> | |||
<Field type="string" name="destination" label="Destination" /> | |||
<Event name="HeapDump" category="Java Virtual Machine, Diagnostics" label="Heap Dump" description="Information about a successfully written Java Heap dump" |
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.
spelling: "Java heap dump" in description (small heap)
<Field type="string" name="destination" label="Destination" /> | ||
<Event name="HeapDump" category="Java Virtual Machine, Diagnostics" label="Heap Dump" description="Information about a successfully written Java Heap dump" | ||
stackTrace="true" thread="true"> | ||
<Field type="string" name="destination" label="Destination path of the dump" /> |
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.
Spelling: In the label we'd write Path and Dump in capitals
<Field type="long" name="size" label="Size" /> | ||
<Field type="boolean" name="gcBeforeDump" label="GC Before Dump" /> | ||
<Field type="boolean" name="onOutOfMemoryError" label="On Out of Memory Error" /> | ||
<Field type="boolean" name="onOutOfMemoryError" label="Heap dump on Out of Memory Error" /> |
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.
Also here: "Dump" in capitals in the label
<Field type="boolean" name="onOutOfMemoryError" label="On Out of Memory Error" /> | ||
<Field type="boolean" name="onOutOfMemoryError" label="Heap dump on Out of Memory Error" /> | ||
<Field type="boolean" name="overwrite" label="Overwrite" description="Heap dump overwrites previous file location if it exists" /> | ||
<Field type="int" name="compression" label="Compression Level" description="Compression level of the Dump, if larger than 0 we use gzip compressoion with this level" /> |
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.
Here, in description, use small letter for "dump"
Hi Christoph, I did some adjustments (also compressoion -> compression). |
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 to me now.
PS: The metadata.xml also has a copyright year to update which you should do before integrating.
Not sure what the user is going to do with the information, but OK. |
/integrate |
Going to push as commit 0ee8cac.
Your commit was automatically rebased without conflicts. |
Enhance the JFR Event HeapDump with the additional interesting fields, compression and overwrite.
Add some UL logging in case the heap dump writing failed .
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11864/head:pull/11864
$ git checkout pull/11864
Update a local copy of the PR:
$ git checkout pull/11864
$ git pull https://git.openjdk.org/jdk pull/11864/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11864
View PR using the GUI difftool:
$ git pr show -t 11864
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11864.diff