RFR: 8269685: Optimize HeapHprofBinWriter implementation [v10]
Serguei Spitsyn
sspitsyn at openjdk.java.net
Fri Sep 24 19:04:02 UTC 2021
On Fri, 24 Sep 2021 16:44:13 GMT, Lin Zang <lzang at openjdk.org> wrote:
>> 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.
>
> Lin Zang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>
> - Merge branch 'master' into hprof
> - code refine
> - code refine
> - Merge branch 'master' into hprof
> - code clean up and refinement
> - Merge branch 'master' into hprof
> - make calculateGlobalJNIHandlesDumpRecordSize abstract
> - code clean up and remove useless methods
> - Merge branch 'master' into hprof
> - fix write size issue
> - ... and 2 more: https://git.openjdk.java.net/jdk/compare/0c050be6...1da3ab12
Lin, thank you for the update. I like suggestions/simplifications from Alex.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java line 1316:
> 1314: // get size in bytes (in stream) required for given field.
> 1315: private int getSizeForField(Field field) {
> 1316: char typeCode = (char) field.getSignature().getByteAt(0);
Space after cast `(char)` is not not needed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4666
More information about the serviceability-dev
mailing list