hotspot/src/share/vm/memory/metaspaceCounters.cpp
changeset 13737 aa8c9eb6d900
parent 13733 e41e23ae6758
child 14847 92a59a418262
equal deleted inserted replaced
13736:5b15a8f57979 13737:aa8c9eb6d900
    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_unsafe();
    38     size_t used = MetaspaceAux::used_in_bytes();
    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_unsafe();
   134   size_t used_in_bytes = MetaspaceAux::used_in_bytes();
   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");