On Thu, 16 Sep 2021 12:26:10 GMT, Lin Zang <lz...@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 654:

> 652:             out.writeInt(0);
> 653:             // record position of the length slot
> 654:             currentSegmentStart = fos.getChannel().position();

The comment before this line is confusing: the `currentSegmentStart` is not the 
length.
Should this comment be moved after the line 653?

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

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

Reply via email to