< prev index next >
src/share/vm/gc_implementation/g1/heapRegion.hpp
Print this page
rev 8910 : full patch for jfr
*** 1,7 ****
/*
! * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 28,37 ****
--- 28,38 ----
#include "gc_implementation/g1/g1AllocationContext.hpp"
#include "gc_implementation/g1/g1BlockOffsetTable.hpp"
#include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
#include "gc_implementation/g1/heapRegionType.hpp"
#include "gc_implementation/g1/survRateGroup.hpp"
+ #include "gc_implementation/g1/g1HeapRegionTraceType.hpp"
#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"
*** 209,218 ****
--- 210,221 ----
// 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,412 ****
--- 406,416 ----
_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,681 ****
} else {
assert( _age_index == -1, "pre-condition" );
}
}
! void set_free() { _type.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_old() { _type.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 {
--- 669,712 ----
} else {
assert( _age_index == -1, "pre-condition" );
}
}
! void set_free() {
! if (EnableJFR) {
! report_region_type_change(G1HeapRegionTraceType::Free);
! }
! _type.set_free();
! }
! void set_eden() {
! if (EnableJFR) {
! report_region_type_change(G1HeapRegionTraceType::Eden);
! }
! _type.set_eden();
! }
! void set_old() {
! if (EnableJFR) {
! report_region_type_change(G1HeapRegionTraceType::Old);
! }
! _type.set_old();
! }
!
! void set_eden_pre_gc() {
! if (EnableJFR) {
! report_region_type_change(G1HeapRegionTraceType::Eden);
! }
! _type.set_eden_pre_gc();
! }
!
! void set_survivor() {
! if (EnableJFR) {
! report_region_type_change(G1HeapRegionTraceType::Survivor);
! }
! _type.set_survivor();
! }
// 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 >