changeset 1441:a5079769b73b

Amend 7902097 with better failure message about Mac OS X SIP.
author shade
date Mon, 22 Jan 2018 18:10:17 +0100
parents ae08c0b9db44
children f797116d4991
files jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Mon Jan 22 18:04:43 2018 +0100
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Mon Jan 22 18:10:17 2018 +0100
@@ -576,8 +576,10 @@
             }
 
             if (sum < 1000) {
-                pw.println("WARNING: The perf event count is suspiciously low (" + sum + "). The performance data might be\n" +
-                    "inaccurate or misleading. Try to do the profiling again, or tune up the sampling frequency.");
+                pw.println("WARNING: The perf event count is suspiciously low (" + sum + "). The performance data might be");
+                pw.println("inaccurate or misleading. Try to do the profiling again, or tune up the sampling frequency.");
+                pw.println("With some profilers on Mac OS X, System Integrity Protection (SIP) may prevent profiling.");
+                pw.println("In such case, temporarily disabling SIP with 'csrutil disable' might help.");
             }
         }