7076820: assert(addr != 0) failed: address sanity check in PerfMemory::detach with -XX:-UsePerfData
authordsamersoff
Wed, 14 Jan 2015 07:10:53 -0800
changeset 28618 f9d2242c1874
parent 28477 157314902d78
child 28619 adeadd271a0f
7076820: assert(addr != 0) failed: address sanity check in PerfMemory::detach with -XX:-UsePerfData Summary: Explicitly checks for UsePerfData and if it's false make Perf:detach a NOP. Reviewed-by: dholmes, jbachorik
hotspot/src/share/vm/prims/perf.cpp
--- a/hotspot/src/share/vm/prims/perf.cpp	Tue Jan 13 14:30:53 2015 -0500
+++ b/hotspot/src/share/vm/prims/perf.cpp	Wed Jan 14 07:10:53 2015 -0800
@@ -100,6 +100,11 @@
 
   PerfWrapper("Perf_Detach");
 
+  if (!UsePerfData) {
+    // With -XX:-UsePerfData, detach is just a NOP
+    return;
+  }
+
   void* address = 0;
   jlong capacity = 0;