Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/metaspaceCounters.cpp @ 6730:5d2156bcb78b
7195789: NPG: assert(used + free == capacity) failed: Accounting is wrong
Reviewed-by: coleenp, jcoomes
author | jmasa |
---|---|
date | Tue, 04 Sep 2012 16:20:28 -0700 |
parents | da91efe96a93 |
children | 942bb29b20b0 |
comparison
equal
deleted
inserted
replaced
6729:d17383603741 | 6730:5d2156bcb78b |
---|---|
33 MetaspaceCounters::MetaspaceCounters() { | 33 MetaspaceCounters::MetaspaceCounters() { |
34 if (UsePerfData) { | 34 if (UsePerfData) { |
35 size_t min_capacity = MetaspaceAux::min_chunk_size(); | 35 size_t min_capacity = MetaspaceAux::min_chunk_size(); |
36 size_t max_capacity = MetaspaceAux::reserved_in_bytes(); | 36 size_t max_capacity = MetaspaceAux::reserved_in_bytes(); |
37 size_t curr_capacity = MetaspaceAux::capacity_in_bytes(); | 37 size_t curr_capacity = MetaspaceAux::capacity_in_bytes(); |
38 size_t used = MetaspaceAux::used_in_bytes(); | 38 size_t used = MetaspaceAux::used_in_bytes_unsafe(); |
39 | 39 |
40 initialize(min_capacity, max_capacity, curr_capacity, used); | 40 initialize(min_capacity, max_capacity, curr_capacity, used); |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
129 _capacity->set_value(capacity_in_bytes); | 129 _capacity->set_value(capacity_in_bytes); |
130 } | 130 } |
131 | 131 |
132 void MetaspaceCounters::update_used() { | 132 void MetaspaceCounters::update_used() { |
133 assert(UsePerfData, "Should not be called unless being used"); | 133 assert(UsePerfData, "Should not be called unless being used"); |
134 size_t used_in_bytes = MetaspaceAux::used_in_bytes(); | 134 size_t used_in_bytes = MetaspaceAux::used_in_bytes_unsafe(); |
135 _used->set_value(used_in_bytes); | 135 _used->set_value(used_in_bytes); |
136 } | 136 } |
137 | 137 |
138 void MetaspaceCounters::update_max_capacity() { | 138 void MetaspaceCounters::update_max_capacity() { |
139 assert(UsePerfData, "Should not be called unless being used"); | 139 assert(UsePerfData, "Should not be called unless being used"); |