mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8061715: gc/g1/TestShrinkAuxiliaryData15.java fails with java.lang.RuntimeException: heap decommit failed - after > before
Added WhiteBox methods to count regions and exact aux data sizes Reviewed-by: tschatzl, jwilhelm, mgerdin
This commit is contained in:
parent
7e86840f64
commit
9272128a46
13 changed files with 192 additions and 75 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2015, 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
|
||||
|
@ -145,6 +145,24 @@ void HeapRegionManager::make_regions_available(uint start, uint num_regions) {
|
|||
}
|
||||
}
|
||||
|
||||
MemoryUsage HeapRegionManager::get_auxiliary_data_memory_usage() const {
|
||||
size_t used_sz =
|
||||
_prev_bitmap_mapper->committed_size() +
|
||||
_next_bitmap_mapper->committed_size() +
|
||||
_bot_mapper->committed_size() +
|
||||
_cardtable_mapper->committed_size() +
|
||||
_card_counts_mapper->committed_size();
|
||||
|
||||
size_t committed_sz =
|
||||
_prev_bitmap_mapper->reserved_size() +
|
||||
_next_bitmap_mapper->reserved_size() +
|
||||
_bot_mapper->reserved_size() +
|
||||
_cardtable_mapper->reserved_size() +
|
||||
_card_counts_mapper->reserved_size();
|
||||
|
||||
return MemoryUsage(0, used_sz, committed_sz, committed_sz);
|
||||
}
|
||||
|
||||
uint HeapRegionManager::expand_by(uint num_regions) {
|
||||
return expand_at(0, num_regions);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue