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
8269685: Optimize HeapHprofBinWriter implementation #4666
Conversation
|
/issue 8262386 |
@linzang |
Webrevs
|
Dear All, BRs, |
Added the tests I have conducted: |
Hi Lin, You did not answer my question about empty methods in the AbstractHeapGraphWriter.java.
|
Hi Serguei (@sspitsyn), So sorry that I missed your comments, it is strange that your review didn't show on github in this PR. BRs, |
Lin, in order to see my inlined comment you need to look at "Files changed". |
Dear Serguei,
I can not find your comments here either, would you like to help check whether you sumbited the inlined commit after review?
The main reason is that both
Thanks for point them out, I will remove these not used methods. BRs, |
protected int calculateOopDumpRecordSize(Oop oop) throws IOException { | ||
return 0; | ||
} | ||
|
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 Lin,
I don't like these empty methods in this abstract class.
Should they be just abstract instead?
Thanks,
Serguei
Lin, you are right. It occurred I did not submit my comment (while I was sure that I did it). |
Hi Serguei, BRs, |
Hi Lin, |
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Show resolved
Hide resolved
Hi @sspitsyn, |
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
Hi Lin, |
Dear Serguei @sspitsyn , |
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 Lin,
Thank you for the update!
It looks good to me.
Thanks,
Serguei
@linzang This change now passes all automated pre-integration checks. 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 11 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.
|
Dear All, BRs, |
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Show resolved
Hide resolved
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java
Outdated
Show resolved
Hide resolved
@@ -1346,38 +1311,37 @@ private long getAddressValue(Address addr) { | |||
return res; | |||
} | |||
|
|||
// get size in bytes (in stream) required for given field. | |||
private int getSizeForField(Field field) { | |||
char typeCode = (char) field.getSignature().getByteAt(0); |
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.
Space after cast (char)
is not not needed.
Lin, thank you for the update. I like suggestions/simplifications from Alex. |
Thanks @sspitsyn and @alexmenkov for your review and approvel! I will push this PR after 1 day if there is no new comments. BRs, |
/integrate |
Going to push as commit 8876eae.
Your commit was automatically rebased without conflicts. |
This PR rewrite the implementation of the HeapHprofBinWriter, which could simplify the logic of current implementation.
please see detail description at https://bugs.openjdk.java.net/browse/JDK-8269685.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4666/head:pull/4666
$ git checkout pull/4666
Update a local copy of the PR:
$ git checkout pull/4666
$ git pull https://git.openjdk.java.net/jdk pull/4666/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4666
View PR using the GUI difftool:
$ git pr show -t 4666
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4666.diff