Skip to content

Commit 3716107

Browse files
author
Walter Erquinigo
committed
[NFC][intel pt] Improve troubleshooting message
1 parent 9e966dd commit 3716107

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def is_supported():
4444
return False
4545
if not is_supported():
4646
self.skipTest("Per cpu tracing is not supported. You need "
47-
"/proc/sys/kernel/perf_event_paranoid to be 0 or -1.")
47+
"/proc/sys/kernel/perf_event_paranoid to be 0 or -1. "
48+
"You can use `sudo sysctl -w kernel.perf_event_paranoid=-1` for that.")
4849

4950
def getTraceOrCreate(self):
5051
if not self.target().GetTrace().IsValid():

lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static Error IncludePerfEventParanoidMessageInError(Error &&error) {
2929
return createStringError(
3030
inconvertibleErrorCode(),
3131
"%s\nYou might need to rerun as sudo or to set "
32-
"/proc/sys/kernel/perf_event_paranoid to a value of 0 or -1.",
32+
"/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.",
3333
toString(std::move(error)).c_str());
3434
}
3535

0 commit comments

Comments
 (0)