[NFC][intel pt] Improve troubleshooting message
authorWalter Erquinigo <wallace@fb.com>
Wed, 3 Aug 2022 18:33:40 +0000 (11:33 -0700)
committerWalter Erquinigo <wallace@fb.com>
Wed, 3 Aug 2022 18:34:03 +0000 (11:34 -0700)
lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py
lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp

index 511dd68..5c70bad 100644 (file)
@@ -44,7 +44,8 @@ class TraceIntelPTTestCaseBase(TestBase):
                 return False
         if not is_supported():
             self.skipTest("Per cpu tracing is not supported. You need "
-                "/proc/sys/kernel/perf_event_paranoid to be 0 or -1.")
+                "/proc/sys/kernel/perf_event_paranoid to be 0 or -1. "
+                "You can use `sudo sysctl -w kernel.perf_event_paranoid=-1` for that.")
 
     def getTraceOrCreate(self):
         if not self.target().GetTrace().IsValid():
index 8f646c1..a4794e7 100644 (file)
@@ -29,7 +29,7 @@ static Error IncludePerfEventParanoidMessageInError(Error &&error) {
   return createStringError(
       inconvertibleErrorCode(),
       "%s\nYou might need to rerun as sudo or to set "
-      "/proc/sys/kernel/perf_event_paranoid to a value of 0 or -1.",
+      "/proc/sys/kernel/perf_event_paranoid to a value of 0 or -1. You can use `sudo sysctl -w kernel.perf_event_paranoid=-1` for that.",
       toString(std::move(error)).c_str());
 }