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

Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
   1 /*
   2  * Copyright (c) 2011, 2012, 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  *


 207   CollectorCounters* incremental_collection_counters() {
 208     return _incremental_collection_counters;
 209   }
 210   CollectorCounters* full_collection_counters() {
 211     return _full_collection_counters;
 212   }
 213   GenerationCounters* young_collection_counters() {
 214     return _young_collection_counters;
 215   }
 216   GenerationCounters* old_collection_counters() {
 217     return _old_collection_counters;
 218   }
 219   HSpaceCounters*      old_space_counters() { return _old_space_counters; }
 220   HSpaceCounters*      eden_counters() { return _eden_counters; }
 221   HSpaceCounters*      from_counters() { return _from_counters; }
 222   HSpaceCounters*      to_counters() { return _to_counters; }
 223 
 224   // Monitoring support used by
 225   //   MemoryService
 226   //   jstat counters

 227 
 228   size_t overall_reserved()           { return _overall_reserved;     }
 229   size_t overall_committed()          { return _overall_committed;    }
 230   size_t overall_used()               { return _overall_used;         }
 231 
 232   size_t young_gen_committed()        { return _young_gen_committed;  }
 233   size_t young_gen_max()              { return overall_reserved();    }
 234   size_t eden_space_committed()       { return _eden_committed;       }
 235   size_t eden_space_used()            { return _eden_used;            }
 236   size_t survivor_space_committed()   { return _survivor_committed;   }
 237   size_t survivor_space_used()        { return _survivor_used;        }
 238 
 239   size_t old_gen_committed()          { return old_space_committed(); }
 240   size_t old_gen_max()                { return overall_reserved();    }
 241   size_t old_space_committed()        { return _old_committed;        }
 242   size_t old_space_used()             { return _old_used;             }
 243 };
 244 
 245 class G1GenerationCounters: public GenerationCounters {
 246 protected:


   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  *


 207   CollectorCounters* incremental_collection_counters() {
 208     return _incremental_collection_counters;
 209   }
 210   CollectorCounters* full_collection_counters() {
 211     return _full_collection_counters;
 212   }
 213   GenerationCounters* young_collection_counters() {
 214     return _young_collection_counters;
 215   }
 216   GenerationCounters* old_collection_counters() {
 217     return _old_collection_counters;
 218   }
 219   HSpaceCounters*      old_space_counters() { return _old_space_counters; }
 220   HSpaceCounters*      eden_counters() { return _eden_counters; }
 221   HSpaceCounters*      from_counters() { return _from_counters; }
 222   HSpaceCounters*      to_counters() { return _to_counters; }
 223 
 224   // Monitoring support used by
 225   //   MemoryService
 226   //   jstat counters
 227   //   Tracing
 228 
 229   size_t overall_reserved()           { return _overall_reserved;     }
 230   size_t overall_committed()          { return _overall_committed;    }
 231   size_t overall_used()               { return _overall_used;         }
 232 
 233   size_t young_gen_committed()        { return _young_gen_committed;  }
 234   size_t young_gen_max()              { return overall_reserved();    }
 235   size_t eden_space_committed()       { return _eden_committed;       }
 236   size_t eden_space_used()            { return _eden_used;            }
 237   size_t survivor_space_committed()   { return _survivor_committed;   }
 238   size_t survivor_space_used()        { return _survivor_used;        }
 239 
 240   size_t old_gen_committed()          { return old_space_committed(); }
 241   size_t old_gen_max()                { return overall_reserved();    }
 242   size_t old_space_committed()        { return _old_committed;        }
 243   size_t old_space_used()             { return _old_used;             }
 244 };
 245 
 246 class G1GenerationCounters: public GenerationCounters {
 247 protected: