mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6908215: G1: SEGV with G1PolicyVerbose=2 debug flag
Change CollectionSetChooser::printSortedHeapRegions to handle null entries in _markedRegions growable array. Reviewed-by: jmasa, tonyp, iveresov
This commit is contained in:
parent
d090b4fe29
commit
93d5e80a7e
1 changed files with 8 additions and 1 deletions
|
@ -351,9 +351,16 @@ void
|
|||
CollectionSetChooser::printSortedHeapRegions() {
|
||||
gclog_or_tty->print_cr("Printing %d Heap Regions sorted by amount of known garbage",
|
||||
_numMarkedRegions);
|
||||
|
||||
DEBUG_ONLY(int marked_count = 0;)
|
||||
for (int i = 0; i < _markedRegions.length(); i++) {
|
||||
printHeapRegion(_markedRegions.at(i));
|
||||
HeapRegion* r = _markedRegions.at(i);
|
||||
if (r != NULL) {
|
||||
printHeapRegion(r);
|
||||
DEBUG_ONLY(marked_count++;)
|
||||
}
|
||||
}
|
||||
assert(marked_count == _numMarkedRegions, "must be");
|
||||
gclog_or_tty->print_cr("Done sorted heap region print");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue