提交 83f713d9 编写于 作者: B brutisso

7173460: G1: java/lang/management/MemoryMXBean/CollectionUsageThreshold.java failes with G1

Summary: The scope of TraceMemoryManagerStats in G1CollectedHeap need to cover the call to G1MonitoringSupport::update_sizes()
Reviewed-by: johnc, jmasa
上级 35abda9a
......@@ -1493,7 +1493,6 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
JavaThread::dirty_card_queue_set().abandon_logs();
assert(!G1DeferredRSUpdate
|| (G1DeferredRSUpdate && (dirty_card_queue_set().completed_buffers_num() == 0)), "Should not be any");
}
_young_list->reset_sampled_info();
// At this point there should be no regions in the
......@@ -1508,7 +1507,14 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
verify_region_sets_optional();
print_heap_after_gc();
// We must call G1MonitoringSupport::update_sizes() in the same scoping level
// as an active TraceMemoryManagerStats object (i.e. before the destructor for the
// TraceMemoryManagerStats is called) so that the G1 memory pools are updated
// before any GC notifications are raised.
g1mm()->update_sizes();
}
post_full_gc_dump();
return true;
......@@ -3936,7 +3942,6 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
gc_epilogue(false);
}
}
// The closing of the inner scope, immediately above, will complete
// logging at the "fine" level. The record_collection_pause_end() call
......@@ -3954,7 +3959,13 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
TASKQUEUE_STATS_ONLY(reset_taskqueue_stats());
print_heap_after_gc();
// We must call G1MonitoringSupport::update_sizes() in the same scoping level
// as an active TraceMemoryManagerStats object (i.e. before the destructor for the
// TraceMemoryManagerStats is called) so that the G1 memory pools are updated
// before any GC notifications are raised.
g1mm()->update_sizes();
}
if (G1SummarizeRSetStats &&
(G1SummarizeRSetStatsPeriod > 0) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册