Skip to contentSkip to conversation

perf version: Display availability of OpenCSD support

PATCH Applied James Clark 3 participants 3 messages Mar 1, 2024 – Mar 4, 2024 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf version: Display availability of OpenCSD support

This is useful for scripts that work with Perf and ETM trace. Rather than them trying to parse Perf's error output at runtime to see if it was linked or not.

---
 tools/perf/builtin-version.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/builtin-version.c +1 -0
index 1bafe5855ae7..398aa53e9e2e 100644
@@ -84,6 +84,7 @@ static void library_status(void)
 	STATUS(HAVE_LIBTRACEEVENT, libtraceevent);
 	STATUS(HAVE_BPF_SKEL, bpf_skeletons);
 	STATUS(HAVE_DWARF_UNWIND_SUPPORT, dwarf-unwind-support);
+	STATUS(HAVE_CSTRACE_SUPPORT, libopencsd);
 }
 
 int cmd_version(int argc, const char **argv)
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · James Clark

This is useful for scripts that work with Perf and ETM trace. Rather than them trying to parse Perf's error output at runtime to see if it was linked or not.

Thanks,
Ian

Quoted 19 lines
---
 tools/perf/builtin-version.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/builtin-version.c +1 -1
index 1bafe5855ae7..398aa53e9e2e 100644
@@ -84,6 +84,7 @@ static void library_status(void)
        STATUS(HAVE_LIBTRACEEVENT, libtraceevent);
        STATUS(HAVE_BPF_SKEL, bpf_skeletons);
        STATUS(HAVE_DWARF_UNWIND_SUPPORT, dwarf-unwind-support);
+       STATUS(HAVE_CSTRACE_SUPPORT, libopencsd);
 }
 
 int cmd_version(int argc, const char **argv)
--

2.34.1

maintainer Applied
#2 lore raw
In reply to James Clark
Quoted 5 lines · James Clark

This is useful for scripts that work with Perf and ETM trace. Rather than them trying to parse Perf's error output at runtime to see if it was linked or not.

Applied to perf-tools-next, thanks!

Best regards,

Signature · 1 line
Namhyung Kim <[email protected]>