RFR: 8329418: Replace pointers to tables with offsets in relocation bitmap
Chris Plummer
cjplummer at openjdk.org
Mon May 6 22:37:53 UTC 2024
On Mon, 6 May 2024 17:05:47 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
> The beginning of the RW region contains pointers to c++ vtables which are always located at a fixed offset from the shared base address at runtime. This offset can be calculated at dumptime and stored with the read-only tables at the top of the RO region. As a further improvement, all the pointers to RO tables are replaced with offsets as well.
>
> These changes will reduce the number of pointers in the RW and RO regions and will allow for the relocation bitmap size optimizations to be more effective. Verified with tier 1-5 tests.
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java line 186:
> 184: // };
> 185: //
> 186: // The following loop compues the following
Since there are lot of comments after this point, maybe the wording should instead be "The loop below...". Also, should be "computes"
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/FileMapInfo.java line 216:
> 214: for (int i=0; i < metadataTypeArray.length; i++) {
> 215: long vtable_offset = vtablesIndex.getJLongAt(i * addressSize); // long offset = _index[i]
> 216: System.out.printf("Offset: %x\n", vtable_offset);
Remove printf().
test/hotspot/jtreg/serviceability/sa/TestSysProps.java line 68:
> 66: }
> 67: if (numProps != expectedCount) {
> 68: throw new RuntimeException("Wrong number of " + cmdName + " properties: " + numProps + " Expected: " + expectedCount);
I think it would be good to add parenthesis around the extra output you added.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19107#discussion_r1591620087
PR Review Comment: https://git.openjdk.org/jdk/pull/19107#discussion_r1591619830
PR Review Comment: https://git.openjdk.org/jdk/pull/19107#discussion_r1591620843
More information about the serviceability-dev
mailing list