< prev index next >
src/share/vm/gc_implementation/g1/heapRegion.cpp
Print this page
rev 8910 : full patch for jfr
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * 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.
@@ -29,10 +29,11 @@
#include "gc_implementation/g1/g1OopClosures.inline.hpp"
#include "gc_implementation/g1/heapRegion.inline.hpp"
#include "gc_implementation/g1/heapRegionBounds.inline.hpp"
#include "gc_implementation/g1/heapRegionRemSet.hpp"
#include "gc_implementation/g1/heapRegionManager.inline.hpp"
+#include "gc_implementation/g1/heapRegionTracer.hpp"
#include "gc_implementation/shared/liveRange.hpp"
#include "memory/genOopClosures.inline.hpp"
#include "memory/iterator.hpp"
#include "memory/space.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -215,11 +216,13 @@
assert(!isHumongous(), "sanity / pre-condition");
assert(end() == _orig_end,
"Should be normal before the humongous object allocation");
assert(top() == bottom(), "should be empty");
assert(bottom() <= new_top && new_top <= new_end, "pre-condition");
-
+ if (EnableJFR) {
+ report_region_type_change(G1HeapRegionTraceType::StartsHumongous);
+ }
_type.set_starts_humongous();
_humongous_start_region = this;
set_end(new_end);
_offsets.set_for_starts_humongous(new_top);
@@ -229,11 +232,13 @@
assert(!isHumongous(), "sanity / pre-condition");
assert(end() == _orig_end,
"Should be normal before the humongous object allocation");
assert(top() == bottom(), "should be empty");
assert(first_hr->startsHumongous(), "pre-condition");
-
+ if (EnableJFR) {
+ report_region_type_change(G1HeapRegionTraceType::ContinuesHumongous);
+ }
_type.set_continues_humongous();
_humongous_start_region = first_hr;
}
void HeapRegion::clear_humongous() {
@@ -301,10 +306,20 @@
hr_clear(false /*par*/, false /*clear_space*/);
set_top(bottom());
record_timestamp();
}
+void HeapRegion::report_region_type_change(G1HeapRegionTraceType::Type to) {
+ assert(EnableJFR, "sanity check");
+ HeapRegionTracer::send_region_type_change(_hrm_index,
+ get_trace_type(),
+ to,
+ (uintptr_t)bottom(),
+ used());
+}
+
+
CompactibleSpace* HeapRegion::next_compaction_space() const {
return G1CollectedHeap::heap()->next_compaction_region(this);
}
void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,
< prev index next >