mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8005849: JEP 167: Event-Based JVM Tracing
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Bengt Rutisson <bengt.rutisson@oracle.com> Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com> Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com> Co-authored-by: Erik Helin <erik.helin@oracle.com> Co-authored-by: Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com> Co-authored-by: Keith McGuigan <keith.mcguigan@oracle.com> Co-authored-by: Mattias Tobiasson <mattias.tobiasson@oracle.com> Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Co-authored-by: Mikael Auno <mikael.auno@oracle.com> Co-authored-by: Nils Eliasson <nils.eliasson@oracle.com> Co-authored-by: Nils Loodin <nils.loodin@oracle.com> Co-authored-by: Rickard Backman <rickard.backman@oracle.com> Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com> Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com> Reviewed-by: acorn, coleenp, sla
This commit is contained in:
parent
6b2c468c35
commit
718f3252f6
195 changed files with 7628 additions and 1484 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2013, 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
|
||||
|
@ -35,6 +35,8 @@
|
|||
#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psScavenge.hpp"
|
||||
#include "gc_implementation/parallelScavenge/vmPSOperations.hpp"
|
||||
#include "gc_implementation/shared/gcHeapSummary.hpp"
|
||||
#include "gc_implementation/shared/gcWhen.hpp"
|
||||
#include "memory/gcLocker.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -642,6 +644,29 @@ void ParallelScavengeHeap::prepare_for_verify() {
|
|||
ensure_parsability(false); // no need to retire TLABs for verification
|
||||
}
|
||||
|
||||
PSHeapSummary ParallelScavengeHeap::create_ps_heap_summary() {
|
||||
PSOldGen* old = old_gen();
|
||||
HeapWord* old_committed_end = (HeapWord*)old->virtual_space()->committed_high_addr();
|
||||
VirtualSpaceSummary old_summary(old->reserved().start(), old_committed_end, old->reserved().end());
|
||||
SpaceSummary old_space(old->reserved().start(), old_committed_end, old->used_in_bytes());
|
||||
|
||||
PSYoungGen* young = young_gen();
|
||||
VirtualSpaceSummary young_summary(young->reserved().start(),
|
||||
(HeapWord*)young->virtual_space()->committed_high_addr(), young->reserved().end());
|
||||
|
||||
MutableSpace* eden = young_gen()->eden_space();
|
||||
SpaceSummary eden_space(eden->bottom(), eden->end(), eden->used_in_bytes());
|
||||
|
||||
MutableSpace* from = young_gen()->from_space();
|
||||
SpaceSummary from_space(from->bottom(), from->end(), from->used_in_bytes());
|
||||
|
||||
MutableSpace* to = young_gen()->to_space();
|
||||
SpaceSummary to_space(to->bottom(), to->end(), to->used_in_bytes());
|
||||
|
||||
VirtualSpaceSummary heap_summary = create_heap_space_summary();
|
||||
return PSHeapSummary(heap_summary, used(), old_summary, old_space, young_summary, eden_space, from_space, to_space);
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::print_on(outputStream* st) const {
|
||||
young_gen()->print_on(st);
|
||||
old_gen()->print_on(st);
|
||||
|
@ -706,6 +731,12 @@ void ParallelScavengeHeap::print_heap_change(size_t prev_used) {
|
|||
}
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) {
|
||||
const PSHeapSummary& heap_summary = create_ps_heap_summary();
|
||||
const MetaspaceSummary& metaspace_summary = create_metaspace_summary();
|
||||
gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary);
|
||||
}
|
||||
|
||||
ParallelScavengeHeap* ParallelScavengeHeap::heap() {
|
||||
assert(_psh != NULL, "Uninitialized access to ParallelScavengeHeap::heap()");
|
||||
assert(_psh->kind() == CollectedHeap::ParallelScavengeHeap, "not a parallel scavenge heap");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue