src/share/vm/services/memBaseline.cpp

Print this page
rev 3953 : JDK-8005012: Add WB APIs to better support NMT testing
Summary:


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

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




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