[master] RFR: JVMTI: Don't use object header for marking

Thomas Stuefe stuefe at openjdk.java.net
Thu Mar 24 19:18:55 UTC 2022


On Thu, 24 Mar 2022 09:24:30 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> JVMTI marks objects in order to track whether or not it has already visited objects during heap walking. This uses the usual GC marking bits in the object header. However, this proves to be confusing and brittle because some GCs also uses those header bits for marking and/or indicating forwarded objects. In particular, it becomes unreliable for Shenandoah GC to distinguish JVMTI marked objects from forwarded objects.
>> 
>> JVMTI should have no business in marking objects in their header. This change proposes to let JVMTI use its own (temporary) marking bitmap instead. This decouples JVMTI better from GCs.
>> 
>> Testing:
>>  - [x] tier1
>>  - [x] tier2
>>  - [ ] tier3
>
> src/hotspot/share/prims/jvmtiTagMap.cpp line 1388:
> 
>> 1386:   if (!os::commit_memory((char*)_bitmap_region.start(), _bitmap_region.byte_size(), false)) {
>> 1387:     vm_exit_out_of_memory(_bitmap_region.byte_size(), OOM_MALLOC_ERROR,
>> 1388:                           "Could not commit native memory for auxiliary marking bitmap for JVMTI object marking");
> 
> Use os::commit_memory_or_exit ?

Also, its not a OOM_MALLOC

-------------

PR: https://git.openjdk.java.net/lilliput/pull/45


More information about the lilliput-dev mailing list