Logging of all GC memory access

Ofir Gordon ofirg6 at gmail.com
Mon Jun 8 12:12:09 UTC 2020


Thank you both for your answers.

I was referring to the memory accesses taking place during the gc, and also
specifically access to the heap (i.e. access to an object on the heap as
part of the marking process etc.)

Also, are you familiar with a way to get a "snapshot" of the heap at any gc
activation? log the addresses where objects are placed, and the pointers
between them? is such a thing possible?


‫בתאריך יום ב׳, 8 ביוני 2020 ב-12:22 מאת ‪Andrew Haley‬‏ <‪aph at redhat.com
‬‏>:‬

> On 08/06/2020 10:17, Thomas Schatzl wrote:
> > In case of accesses to the Java heap (and not general memory accesses)
> > by the VM (that does not include compiled code, but includes "other"
> > accesses) you could probably look whether hooking into the Access class
> > and derivatives (RawAccess, HeapAccess, ArrayAccess) helps.
>
> I was composing another reply. I'd add that I'd create a ring buffer and
> add logging to G1ParScanThreadState::copy_to_survivor_space and its
> friends.
> But it depends on exactly what OP wants.
>
> --
> Andrew Haley  (he/him)
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> https://keybase.io/andrewhaley
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
>


More information about the hotspot-gc-dev mailing list