mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8008966: NPG: Inefficient Metaspace counter functions cause large young GC regressions
Reviewed-by: mgerdin, coleenp
This commit is contained in:
parent
eafc00bc25
commit
d72b516201
12 changed files with 398 additions and 175 deletions
|
@ -376,18 +376,17 @@ void VM_PopulateDumpSharedSpace::doit() {
|
|||
const char* fmt = "%s space: %9d [ %4.1f%% of total] out of %9d bytes [%4.1f%% used] at " PTR_FORMAT;
|
||||
Metaspace* ro_space = _loader_data->ro_metaspace();
|
||||
Metaspace* rw_space = _loader_data->rw_metaspace();
|
||||
const size_t BPW = BytesPerWord;
|
||||
|
||||
// Allocated size of each space (may not be all occupied)
|
||||
const size_t ro_alloced = ro_space->capacity_words(Metaspace::NonClassType) * BPW;
|
||||
const size_t rw_alloced = rw_space->capacity_words(Metaspace::NonClassType) * BPW;
|
||||
const size_t ro_alloced = ro_space->capacity_bytes_slow(Metaspace::NonClassType);
|
||||
const size_t rw_alloced = rw_space->capacity_bytes_slow(Metaspace::NonClassType);
|
||||
const size_t md_alloced = md_end-md_low;
|
||||
const size_t mc_alloced = mc_end-mc_low;
|
||||
const size_t total_alloced = ro_alloced + rw_alloced + md_alloced + mc_alloced;
|
||||
|
||||
// Occupied size of each space.
|
||||
const size_t ro_bytes = ro_space->used_words(Metaspace::NonClassType) * BPW;
|
||||
const size_t rw_bytes = rw_space->used_words(Metaspace::NonClassType) * BPW;
|
||||
const size_t ro_bytes = ro_space->used_bytes_slow(Metaspace::NonClassType);
|
||||
const size_t rw_bytes = rw_space->used_bytes_slow(Metaspace::NonClassType);
|
||||
const size_t md_bytes = size_t(md_top - md_low);
|
||||
const size_t mc_bytes = size_t(mc_top - mc_low);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue