< prev index next >

src/share/vm/gc/g1/g1MonitoringSupport.hpp

Print this page
rev 8362 : [mq]: hotspot
   1 /*
   2  * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1MONITORINGSUPPORT_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1MONITORINGSUPPORT_HPP
  27 
  28 #include "gc_implementation/shared/hSpaceCounters.hpp"
  29 
  30 class G1CollectedHeap;
  31 
  32 // Class for monitoring logical spaces in G1. It provides data for
  33 // both G1's jstat counters as well as G1's memory pools.
  34 //
  35 // G1 splits the heap into heap regions and each heap region belongs
  36 // to one of the following categories:
  37 //
  38 // * eden      : regions that have been allocated since the last GC
  39 // * survivors : regions with objects that survived the last few GCs
  40 // * old       : long-lived non-humongous regions
  41 // * humongous : humongous regions
  42 // * free      : free regions
  43 //
  44 // The combination of eden and survivor regions form the equivalent of
  45 // the young generation in the other GCs. The combination of old and
  46 // humongous regions form the equivalent of the old generation in the
  47 // other GCs. Free regions do not have a good equivalent in the other
  48 // GCs given that they can be allocated as any of the other region types.


 249 
 250 public:
 251   G1GenerationCounters(G1MonitoringSupport* g1mm,
 252                        const char* name, int ordinal, int spaces,
 253                        size_t min_capacity, size_t max_capacity,
 254                        size_t curr_capacity);
 255 };
 256 
 257 class G1YoungGenerationCounters: public G1GenerationCounters {
 258 public:
 259   G1YoungGenerationCounters(G1MonitoringSupport* g1mm, const char* name);
 260   virtual void update_all();
 261 };
 262 
 263 class G1OldGenerationCounters: public G1GenerationCounters {
 264 public:
 265   G1OldGenerationCounters(G1MonitoringSupport* g1mm, const char* name);
 266   virtual void update_all();
 267 };
 268 
 269 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1MONITORINGSUPPORT_HPP
   1 /*
   2  * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1MONITORINGSUPPORT_HPP
  26 #define SHARE_VM_GC_G1_G1MONITORINGSUPPORT_HPP
  27 
  28 #include "gc/shared/hSpaceCounters.hpp"
  29 
  30 class G1CollectedHeap;
  31 
  32 // Class for monitoring logical spaces in G1. It provides data for
  33 // both G1's jstat counters as well as G1's memory pools.
  34 //
  35 // G1 splits the heap into heap regions and each heap region belongs
  36 // to one of the following categories:
  37 //
  38 // * eden      : regions that have been allocated since the last GC
  39 // * survivors : regions with objects that survived the last few GCs
  40 // * old       : long-lived non-humongous regions
  41 // * humongous : humongous regions
  42 // * free      : free regions
  43 //
  44 // The combination of eden and survivor regions form the equivalent of
  45 // the young generation in the other GCs. The combination of old and
  46 // humongous regions form the equivalent of the old generation in the
  47 // other GCs. Free regions do not have a good equivalent in the other
  48 // GCs given that they can be allocated as any of the other region types.


 249 
 250 public:
 251   G1GenerationCounters(G1MonitoringSupport* g1mm,
 252                        const char* name, int ordinal, int spaces,
 253                        size_t min_capacity, size_t max_capacity,
 254                        size_t curr_capacity);
 255 };
 256 
 257 class G1YoungGenerationCounters: public G1GenerationCounters {
 258 public:
 259   G1YoungGenerationCounters(G1MonitoringSupport* g1mm, const char* name);
 260   virtual void update_all();
 261 };
 262 
 263 class G1OldGenerationCounters: public G1GenerationCounters {
 264 public:
 265   G1OldGenerationCounters(G1MonitoringSupport* g1mm, const char* name);
 266   virtual void update_all();
 267 };
 268 
 269 #endif // SHARE_VM_GC_G1_G1MONITORINGSUPPORT_HPP
< prev index next >