RFR: 8329431: Improve speed of writing CDS heap objects [v2]
Matias Saavedra Silva
matsaave at openjdk.org
Wed Apr 10 00:25:09 UTC 2024
On Mon, 8 Apr 2024 02:58:58 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> src/hotspot/share/cds/archiveHeapWriter.cpp line 82:
>>
>>> 80: Universe::heap()->collect(GCCause::_java_lang_system_gc);
>>> 81:
>>> 82: _buffer_offset_to_source_obj_table = new BufferOffsetToSourceObjectTable(36137, 1 * M);
>>
>> Is there a variable we can use instead of the hard coded value 36137? It isn't immediately clear why this value is used and I think a named variable would clear that up.
>
> I changed to something like this:
>
> `new BufferOffsetToSourceObjectTable(/*size*/36137, /*max size*/1 * M)`
My main confusion is why 36137 was chosen specifically. I figure it's a prime number to set as the initial size of the table?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18572#discussion_r1558516447
More information about the hotspot-runtime-dev
mailing list