Mercurial > hg > truffle
diff src/share/vm/services/mallocTracker.cpp @ 20553:417e3b8d04c5
8059100: SIGSEGV VirtualMemoryTracker::remove_released_region
Summary: Disallow increasing native memory tracking level
Reviewed-by: hseigel, ctornqvi, gtriantafill
author | coleenp |
---|---|
date | Fri, 10 Oct 2014 19:36:12 +0000 |
parents | 1ff288f0dae4 |
children | 787c9c28311f |
line wrap: on
line diff
--- a/src/share/vm/services/mallocTracker.cpp Mon Feb 24 13:29:14 2014 +0100 +++ b/src/share/vm/services/mallocTracker.cpp Fri Oct 10 19:36:12 2014 +0000 @@ -51,14 +51,6 @@ return amount; } - -void MallocMemorySnapshot::reset() { - _tracking_header.reset(); - for (int index = 0; index < mt_number_of_types; index ++) { - _malloc[index].reset(); - } -} - // Make adjustment by subtracting chunks used by arenas // from total chunks to get total free chunck size void MallocMemorySnapshot::make_adjustment() { @@ -116,14 +108,9 @@ bool MallocTracker::transition(NMT_TrackingLevel from, NMT_TrackingLevel to) { assert(from != NMT_off, "Can not transition from off state"); assert(to != NMT_off, "Can not transition to off state"); - if (from == NMT_minimal) { - MallocMemorySummary::reset(); - } + assert (from != NMT_minimal, "cannot transition from minimal state"); - if (to == NMT_detail) { - assert(from == NMT_minimal || from == NMT_summary, "Just check"); - return MallocSiteTable::initialize(); - } else if (from == NMT_detail) { + if (from == NMT_detail) { assert(to == NMT_minimal || to == NMT_summary, "Just check"); MallocSiteTable::shutdown(); }