From 371610793491fcd1c9af114a0de0cdda9a4408b0 Mon Sep 17 00:00:00 2001 From: Walter Erquinigo Date: Wed, 3 Aug 2022 11:33:40 -0700 Subject: [PATCH] [NFC][intel pt] Improve troubleshooting message --- lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py | 3 ++- lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py index 511dd68..5c70bad 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py @@ -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(): diff --git a/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp b/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp index 8f646c1..a4794e7 100644 --- a/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp +++ b/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp @@ -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()); } -- 2.7.4