< prev index next >

src/hotspot/share/runtime/perfMemory.cpp

Print this page

        

*** 51,60 **** --- 51,61 ---- char* PerfMemory::_end = NULL; char* PerfMemory::_top = NULL; size_t PerfMemory::_capacity = 0; jint PerfMemory::_initialized = false; PerfDataPrologue* PerfMemory::_prologue = NULL; + bool PerfMemory::_destroyed = false; void perfMemory_init() { if (!UsePerfData) return;
*** 63,72 **** --- 64,74 ---- void perfMemory_exit() { if (!UsePerfData) return; if (!PerfMemory::is_initialized()) return; + if (PerfMemory::is_destroyed()) return; // Only destroy PerfData objects if we're at a safepoint and the // StatSampler is not active. Otherwise, we risk removing PerfData // objects that are currently being used by running JavaThreads // or the StatSampler. This method is invoked while we are not at
*** 194,208 **** // expected to be the typical condition. // delete_memory_region(); } ! _start = NULL; ! _end = NULL; ! _top = NULL; ! _prologue = NULL; ! _capacity = 0; } // allocate an aligned block of memory from the PerfData memory // region. This method assumes that the PerfData memory region // was aligned on a double word boundary when created. --- 196,206 ---- // expected to be the typical condition. // delete_memory_region(); } ! _destroyed = true; } // allocate an aligned block of memory from the PerfData memory // region. This method assumes that the PerfData memory region // was aligned on a double word boundary when created.
< prev index next >