< prev index next >
src/share/vm/gc_implementation/g1/heapRegion.hpp
Print this page
rev 9033 : 8223691: Add JFR G1 Region Type Change Event Support
@@ -33,10 +33,11 @@
#include "gc_implementation/shared/ageTable.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp"
#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.
// NOTE: Although a HeapRegion is a Space, its
@@ -209,10 +210,12 @@
// issues.)
HeapRegionRemSet* _rem_set;
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;
AllocationContext_t _allocation_context;
@@ -403,10 +406,11 @@
_prev_marked_bytes = _next_marked_bytes = 0;
}
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(); }
bool is_young() const { return _type.is_young(); }
bool is_eden() const { return _type.is_eden(); }
@@ -665,17 +669,17 @@
} else {
assert( _age_index == -1, "pre-condition" );
}
}
- 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
// is within the unmarked area of the region.
bool obj_allocated_since_prev_marking(oop obj) const {
< prev index next >