Inconsistent results from GraphLayout vs GraphStats
Sebastian Zarnekow
sebastian.zarnekow at gmail.com
Sun Jan 29 16:56:31 UTC 2023
It looks like the GraphStatsWalker is missing an invocation of
data.addRecord for the array elements that are pushed onto the stack.
On Sun, Jan 29, 2023 at 5:14 PM Sebastian Zarnekow <
sebastian.zarnekow at gmail.com> wrote:
> Hi,
>
> I tried to find a way to submit a bug report but failed to do so.
> Apparently, issues are not enabled on the GitHub repository - contrary to
> what is mentioned in the readme.md.
>
> Maybe this mailing list is the right channel to discuss my observations:
>
> From my understanding, the results of GraphLayout.totalSize and
> GraphStats.totalSize should be the same for a given object graph. However,
> there is some inconsistency. The following test case fails for me. I'm not
> sure if that's a misunderstanding on my end or a bug in the processing of
> arrays:
>
> @Test
>
> *public* *void* statsVsLayout() {
>
> Object[] objects = *new* Object[1];
>
> objects[0] = *new* String[0];
>
> GraphLayout layout = GraphLayout.*parseInstance*(*new* Object[] { objects
> });
>
> GraphStats stats = GraphStats.*parseInstance*(*new* Object[] { objects });
>
> *assertEquals*(layout.totalSize(), stats.totalSize());
>
> *assertEquals*(layout.totalCount(), stats.totalCount());
>
> }
>
>
>
>
> Best
> Sebastian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jol-dev/attachments/20230129/73c18778/attachment.htm>
More information about the jol-dev
mailing list