summaryrefslogtreecommitdiffstats
path: root/tools/tracing/rtla
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2024-10-17 16:09:10 +0200
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-10-17 23:13:15 +0200
commite2b48b226b84848972c4fde6066ed9ff1254463f (patch)
treea1fde9d6732ddba87db00f7a166137faee8ab353 /tools/tracing/rtla
parenttools/build: Add libcpupower dependency detection (diff)
downloadlinux-e2b48b226b84848972c4fde6066ed9ff1254463f.tar.xz
linux-e2b48b226b84848972c4fde6066ed9ff1254463f.zip
rtla: Add optional dependency on libcpupower
If libcpupower is present, set HAVE_LIBCPUPOWER_SUPPORT macro to allow features depending on libcpupower in rtla. Link: https://lore.kernel.org/20241017140914.3200454-3-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla')
-rw-r--r--tools/tracing/rtla/Makefile2
-rw-r--r--tools/tracing/rtla/Makefile.config10
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index b5878be36125..a6a7dee16622 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -32,8 +32,10 @@ DOCSRC := ../../../Documentation/tools/rtla/
FEATURE_TESTS := libtraceevent
FEATURE_TESTS += libtracefs
+FEATURE_TESTS += libcpupower
FEATURE_DISPLAY := libtraceevent
FEATURE_DISPLAY += libtracefs
+FEATURE_DISPLAY += libcpupower
ifeq ($(V),1)
Q =
diff --git a/tools/tracing/rtla/Makefile.config b/tools/tracing/rtla/Makefile.config
index 5f8c286712d4..92a6e12e42d3 100644
--- a/tools/tracing/rtla/Makefile.config
+++ b/tools/tracing/rtla/Makefile.config
@@ -43,6 +43,16 @@ else
$(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)
endif
+$(call feature_check,libcpupower)
+ifeq ($(feature-libcpupower), 1)
+ $(call detected,CONFIG_LIBCPUPOWER)
+ CFLAGS += -DHAVE_LIBCPUPOWER_SUPPORT
+ EXTLIBS += -lcpupower
+else
+ $(info libcpupower is missing, building without --deepest-idle-state support.)
+ $(info Please install libcpupower-dev/kernel-tools-libs-devel)
+endif
+
ifeq ($(STOP_ERROR),1)
$(error Please, check the errors above.)
endif