RFR: 8269685: Optimize HeapHprofBinWriter implementation [v8]

Serguei Spitsyn sspitsyn at openjdk.java.net
Thu Sep 16 15:55:54 UTC 2021


On Thu, 16 Sep 2021 12:26:10 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 ten commits:
> 
>  - 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
>  - Merge branch 'master' into hprof
>  - 8269685: Optimize HeapHprofBinWriter implementation

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java line 651:

> 649:             out.writeInt(size);
> 650:         } else {
> 651:             out.writeByte((byte) (HPROF_HEAP_DUMP));

Formatting nit: No need in space after cast to `byte`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4666


More information about the serviceability-dev mailing list