mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8055061: assert at share/vm/services/virtualMemoryTracker.cpp:332 Error: ShouldNotReachHere() when running NMT tests
Handled CDS mapping region and added test for the scenario Reviewed-by: coleenp, ctornqvi
This commit is contained in:
parent
2d98294837
commit
7bce315059
2 changed files with 66 additions and 3 deletions
|
@ -337,10 +337,18 @@ bool VirtualMemoryTracker::add_reserved_region(address base_addr, size_t size,
|
|||
|
||||
*reserved_rgn = rgn;
|
||||
return true;
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
// CDS mapping region.
|
||||
// CDS reserves the whole region for mapping CDS archive, then maps each section into the region.
|
||||
// NMT reports CDS as a whole.
|
||||
if (reserved_rgn->flag() == mtClassShared) {
|
||||
assert(reserved_rgn->contain_region(base_addr, size), "Reserved CDS region should contain this mapping region");
|
||||
return true;
|
||||
}
|
||||
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue