perf evsel: display dmesg command of showing a hardcoded path
PATCH 1/1 perf evsel: display dmesg command of showing a hardcoded path
In non-FHS compliant distros like NixOS, nothing resides in /bin and /usr/bin. Instead dynamically symlinked into /run/current-system/sw/bin/, the executable resides in /nix/store.
With this patch,/bin prefix from the dmesg command in the error message is stripped.
--- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/evsel.c +1 -1
@@ -3342,7 +3342,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,return scnprintf (msg, size,"The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n" -"/bin/dmesg | grep -i perf may provide additional information.\n" , +"\"dmesg | grep -i perf\" may provide additional information.\n" , err,str_error_r (err, sbuf,sizeof (sbuf)),evsel__name (evsel)); }
Signature · 1 line
2.46.0