RFR: CODETOOLS-7903262: JOL: GraphStatsWalker counts array elements incorrectly
Aleksey Shipilev
shade at openjdk.org
Sat Aug 27 18:26:07 UTC 2022
On Thu, 25 Aug 2022 04:32:58 GMT, Vladimir Plizga <duke at openjdk.org> wrote:
> #### Observed behavior
> Current `GraphStatsWalker` implementation does not count size and quantity of objects directly contained in arrays.
>
> #### Desired behavior
> The `totalSize()` and `totalCount()` methods of a `GraphStats` instance should return the same values as the ones of `GraphLayout` instance built for the same object.
>
> #### Additional info
> There is a [simple unit test](https://gist.github.com/Toparvion/adec9052ad23e85e54d72b5bfb5a1aa3) that can be used to reproduce current behavior without checking out the fix branch.
Oh, good find! I have a minor naming comment.
Looks good. Bots would allow you to integrate once OCA is cleared.
Please also go to https://github.com/Toparvion/jol/actions -- and push the button that allows testing workflows to run.
> Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.
I would say yes, you can say `/signed` now.
jol-core/src/test/java/org/openjdk/jol/info/GraphStatsTest.java line 97:
> 95:
> 96: @Test
> 97: public void layoutAndStatsAccordance() {
Suggestion:
public void layoutAndStatsMatch() {
-------------
PR: https://git.openjdk.org/jol/pull/33Marked as reviewed by shade (Committer).
More information about the jol-dev
mailing list