[G1] Why humongous object bytes allocated after a collection are not recorded in G1Policy::_bytes_allocated_in_old_since_last_gc?

Luo, Ziyi luoziyi at amazon.com
Fri May 22 22:30:36 UTC 2020


Hi,

I have a question about humongous object allocation result in g1CollectedHeap:
http://hg.openjdk.java.net/jdk/jdk/file/6d7c3a8bfab6/src/hotspot/share/gc/g1/g1CollectedHeap.cpp#l874
http://hg.openjdk.java.net/jdk/jdk/file/6d7c3a8bfab6/src/hotspot/share/gc/g1/g1CollectedHeap.cpp#l893

L874 returns the result after a successful humongous allocation. L893 returns 
the result after a successful G1CollectForAllocation. In the former case, the 
allocated bytes are recorded in 
G1Policy::_bytes_allocated_in_old_since_last_gc in L873. But bytes in the 
latter case are not. Is this intentional or a mistake?

Best,
Ziyi



More information about the hotspot-gc-dev mailing list