--- old/src/share/vm/gc_implementation/g1/heapRegion.hpp 2019-03-11 12:58:24.218423494 +0800 +++ new/src/share/vm/gc_implementation/g1/heapRegion.hpp 2019-03-11 12:58:24.071427754 +0800 @@ -35,6 +35,7 @@ #include "memory/space.inline.hpp" #include "memory/watermark.hpp" #include "utilities/macros.hpp" +#include "gc_implementation/g1/g1HeapRegionTraceType.hpp" // A HeapRegion is the smallest piece of a G1CollectedHeap that // can be collected independently. @@ -211,6 +212,8 @@ G1BlockOffsetArrayContigSpace* offsets() { return &_offsets; } + void report_region_type_change(G1HeapRegionTraceType::Type to); + protected: // The index of this region in the heap region sequence. uint _hrm_index; @@ -405,6 +408,7 @@ const char* get_type_str() const { return _type.get_str(); } const char* get_short_type_str() const { return _type.get_short_str(); } + G1HeapRegionTraceType::Type get_trace_type() { return _type.get_trace_type(); } bool is_free() const { return _type.is_free(); } @@ -667,13 +671,13 @@ } } - void set_free() { _type.set_free(); } + void set_free(); - void set_eden() { _type.set_eden(); } - void set_eden_pre_gc() { _type.set_eden_pre_gc(); } - void set_survivor() { _type.set_survivor(); } + void set_eden(); + void set_eden_pre_gc(); + void set_survivor(); - void set_old() { _type.set_old(); } + void set_old(); // Determine if an object has been allocated since the last // mark performed by the collector. This returns true iff the object