Filler objects in G1 Humongous Region?

Krystal Mok rednaxelafx at
Thu Jun 27 18:11:05 UTC 2019

Hi GC experts,

I'd like to ask a few questions related to G1 humongous object handling and
filler objects.

AFAICT, G1 started putting filler objects at the tail of the last
"continues humongous" region starting from JDK9 (JDK-8138681), and it's
still the case in the latest code. That's for improving usage accounting.

But this is not done in any of the JDK8u versions, right? i.e. the tail of
the last "continues humongous" region is left unused and no filler object
is inserted.

And even when a filler object are inserted into the tail, it shouldn't be
discoverable by the HeapDumper because
G1CollectedHeap::safe_object_iterate() skips over all "continues humongous"
regions, right?

The context for the questions above is: recently a colleague of mine
collected a HPROF heap dump from a OpenJDK8u191 run with G1 GC turned on.
There were a lot of int[] objects deemed as unreachable, whose contents
were "random looking" -- they seem to be contents of other objects that
used to be in the same space.
The G1 heap region size was 2MB, and these unreachable int[] objects were
slightly less than 1MB each (too big to be a TLAB filler object).

That symptom seem to match with what would have been filler objects at the
tail of a "single humongous" or perhaps the last in a chain of "continues
humongous" regions. But IIUC:
1. JDK8u G1 doesn't put filler objects there
2. even if there were filler objects there, they shouldn't appear in a heap

So I got really confused. Could G1 experts help shed some light on what
those weird looking int[] objects could have been?
The situation was not easily reproducible so we weren't able to collect a
full core dump. Otherwise it may have been easier for me to answer my own

Best regards,

More information about the hotspot-gc-dev mailing list