hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.cpp
changeset 29703 0bbea51cbaf8
parent 13728 882756847a04
equal deleted inserted replaced
29702:9ed339a5e096 29703:0bbea51cbaf8
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    61     cname = PerfDataManager::counter_name(_name_space, "initCapacity");
    61     cname = PerfDataManager::counter_name(_name_space, "initCapacity");
    62     PerfDataManager::create_constant(SUN_GC, cname, PerfData::U_Bytes,
    62     PerfDataManager::create_constant(SUN_GC, cname, PerfData::U_Bytes,
    63                                      _space->capacity(), CHECK);
    63                                      _space->capacity(), CHECK);
    64   }
    64   }
    65 }
    65 }
       
    66 
       
    67 void CSpaceCounters::update_capacity() {
       
    68   _capacity->set_value(_space->capacity());
       
    69 }
       
    70 
       
    71 void CSpaceCounters::update_used() {
       
    72   _used->set_value(_space->used());
       
    73 }
       
    74 
       
    75 void CSpaceCounters::update_all() {
       
    76   update_used();
       
    77   update_capacity();
       
    78 }
       
    79 
       
    80 jlong ContiguousSpaceUsedHelper::take_sample(){
       
    81   return _space->used();
       
    82 }