src/share/vm/services/memBaseline.cpp

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>


  24 #include "precompiled.hpp"
  25 #include "memory/allocation.hpp"
  26 #include "runtime/safepoint.hpp"
  27 #include "runtime/thread.inline.hpp"
  28 #include "services/memBaseline.hpp"
  29 #include "services/memTracker.hpp"
  30 
  31 
  32 MemType2Name MemBaseline::MemType2NameMap[NUMBER_OF_MEMORY_TYPE] = {
  33   {mtJavaHeap,   "Java Heap"},
  34   {mtClass,      "Class"},
  35   {mtThreadStack,"Thread Stack"},
  36   {mtThread,     "Thread"},
  37   {mtCode,       "Code"},
  38   {mtGC,         "GC"},
  39   {mtCompiler,   "Compiler"},
  40   {mtInternal,   "Internal"},
  41   {mtOther,      "Other"},
  42   {mtSymbol,     "Symbol"},
  43   {mtNMT,        "Memory Tracking"},

  44   {mtChunk,      "Pooled Free Chunks"},
  45   {mtClassShared,"Shared spaces for classes"},
  46   {mtTest,       "Test"},
  47   {mtNone,       "Unknown"}  // It can happen when type tagging records are lagging
  48                              // behind
  49 };
  50 
  51 MemBaseline::MemBaseline() {
  52   _baselined = false;
  53 
  54   for (int index = 0; index < NUMBER_OF_MEMORY_TYPE; index ++) {
  55     _malloc_data[index].set_type(MemType2NameMap[index]._flag);
  56     _vm_data[index].set_type(MemType2NameMap[index]._flag);
  57     _arena_data[index].set_type(MemType2NameMap[index]._flag);
  58   }
  59 
  60   _malloc_cs = NULL;
  61   _vm_cs = NULL;
  62   _vm_map = NULL;
  63 




  24 #include "precompiled.hpp"
  25 #include "memory/allocation.hpp"
  26 #include "runtime/safepoint.hpp"
  27 #include "runtime/thread.inline.hpp"
  28 #include "services/memBaseline.hpp"
  29 #include "services/memTracker.hpp"
  30 
  31 
  32 MemType2Name MemBaseline::MemType2NameMap[NUMBER_OF_MEMORY_TYPE] = {
  33   {mtJavaHeap,   "Java Heap"},
  34   {mtClass,      "Class"},
  35   {mtThreadStack,"Thread Stack"},
  36   {mtThread,     "Thread"},
  37   {mtCode,       "Code"},
  38   {mtGC,         "GC"},
  39   {mtCompiler,   "Compiler"},
  40   {mtInternal,   "Internal"},
  41   {mtOther,      "Other"},
  42   {mtSymbol,     "Symbol"},
  43   {mtNMT,        "Memory Tracking"},
  44   {mtTracing,    "Tracing"},
  45   {mtChunk,      "Pooled Free Chunks"},
  46   {mtClassShared,"Shared spaces for classes"},
  47   {mtTest,       "Test"},
  48   {mtNone,       "Unknown"}  // It can happen when type tagging records are lagging
  49                              // behind
  50 };
  51 
  52 MemBaseline::MemBaseline() {
  53   _baselined = false;
  54 
  55   for (int index = 0; index < NUMBER_OF_MEMORY_TYPE; index ++) {
  56     _malloc_data[index].set_type(MemType2NameMap[index]._flag);
  57     _vm_data[index].set_type(MemType2NameMap[index]._flag);
  58     _arena_data[index].set_type(MemType2NameMap[index]._flag);
  59   }
  60 
  61   _malloc_cs = NULL;
  62   _vm_cs = NULL;
  63   _vm_map = NULL;
  64