< prev index next >

src/share/vm/runtime/perfMemory.cpp

Print this page




  74   // PerfData objects are used in parallel with a safepoint. See
  75   // the work around in PerfDataManager::destroy().
  76   //
  77   if (SafepointSynchronize::is_at_safepoint() && !StatSampler::is_active()) {
  78     PerfDataManager::destroy();
  79   }
  80 
  81   // Remove the persistent external resources, if any. This method
  82   // does not unmap or invalidate any virtual memory allocated during
  83   // initialization.
  84   //
  85   PerfMemory::destroy();
  86 }
  87 
  88 void PerfMemory::initialize() {
  89 
  90   if (_prologue != NULL)
  91     // initialization already performed
  92     return;
  93 
  94   size_t capacity = align_size_up(PerfDataMemorySize,
  95                                   os::vm_allocation_granularity());
  96 
  97   log_debug(perf, memops)("PerfDataMemorySize = " SIZE_FORMAT ","
  98                           " os::vm_allocation_granularity = %d,"
  99                           " adjusted size = " SIZE_FORMAT "\n",
 100                           PerfDataMemorySize,
 101                           os::vm_allocation_granularity(),
 102                           capacity);
 103 
 104   // allocate PerfData memory region
 105   create_memory_region(capacity);
 106 
 107   if (_start == NULL) {
 108 
 109     // the PerfMemory region could not be created as desired. Rather
 110     // than terminating the JVM, we revert to creating the instrumentation
 111     // on the C heap. When running in this mode, external monitoring
 112     // clients cannot attach to and monitor this JVM.
 113     //
 114     // the warning is issued only in debug mode in order to avoid




  74   // PerfData objects are used in parallel with a safepoint. See
  75   // the work around in PerfDataManager::destroy().
  76   //
  77   if (SafepointSynchronize::is_at_safepoint() && !StatSampler::is_active()) {
  78     PerfDataManager::destroy();
  79   }
  80 
  81   // Remove the persistent external resources, if any. This method
  82   // does not unmap or invalidate any virtual memory allocated during
  83   // initialization.
  84   //
  85   PerfMemory::destroy();
  86 }
  87 
  88 void PerfMemory::initialize() {
  89 
  90   if (_prologue != NULL)
  91     // initialization already performed
  92     return;
  93 
  94   size_t capacity = align_up(PerfDataMemorySize,
  95                                   os::vm_allocation_granularity());
  96 
  97   log_debug(perf, memops)("PerfDataMemorySize = " SIZE_FORMAT ","
  98                           " os::vm_allocation_granularity = %d,"
  99                           " adjusted size = " SIZE_FORMAT "\n",
 100                           PerfDataMemorySize,
 101                           os::vm_allocation_granularity(),
 102                           capacity);
 103 
 104   // allocate PerfData memory region
 105   create_memory_region(capacity);
 106 
 107   if (_start == NULL) {
 108 
 109     // the PerfMemory region could not be created as desired. Rather
 110     // than terminating the JVM, we revert to creating the instrumentation
 111     // on the C heap. When running in this mode, external monitoring
 112     // clients cannot attach to and monitor this JVM.
 113     //
 114     // the warning is issued only in debug mode in order to avoid


< prev index next >