8059100: SIGSEGV VirtualMemoryTracker::remove_released_region

Disallow increasing native memory tracking level

Reviewed-by: hseigel, ctornqvi, gtriantafill
This commit is contained in:
Coleen Phillimore 2014-10-10 19:36:12 +00:00
parent fe03f41db8
commit 3a86f9cd27
12 changed files with 134 additions and 119 deletions

View file

@ -51,14 +51,6 @@ size_t MallocMemorySnapshot::total_arena() const {
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::initialize(NMT_TrackingLevel level) {
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();
}