RFR: 8308903: Print detailed info for Java objects in -Xlog:cds+map [v5]
Ioi Lam
iklam at openjdk.org
Mon Jul 24 16:22:45 UTC 2023
On Mon, 24 Jul 2023 15:46:22 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>>
>> - Merge branch 'master' into 8308903-cds-map-detailed-info-for-oops
>> - added hints in test case
>> - added test case
>> - Merge branch 'master' into 8308903-cds-map-detailed-info-for-oops
>> - @tstuefe and @matias9927 comments
>> - 8308903: Print detailed info for Java objects in -Xlog:cds+map
>
> src/hotspot/share/cds/archiveBuilder.cpp line 1069:
>
>> 1067: ShouldNotReachHere();
>> 1068: }
>> 1069:
>
> Blank line added by accident?
I added this blank line to separate the following lines from the previous loop, to make the code easier to read.
> src/hotspot/share/cds/archiveHeapWriter.cpp line 546:
>
>> 544:
>> 545: BitMap::idx_t idx = requested_field_addr - (Metadata**) _requested_bottom;
>> 546: return (idx < heap_info->ptrmap()->size()) && (heap_info->ptrmap()->at(idx) == true);
>
> For the second condition, would it be clearer to check for non-null?
> `heap_info->ptrmap()->at(idx) != nullptr`
`heap_info->ptrmap()->at(idx)` return a `bool` to indicate whether this index is marked or not.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14841#discussion_r1272482639
PR Review Comment: https://git.openjdk.org/jdk/pull/14841#discussion_r1272480471
More information about the hotspot-dev
mailing list