Skip to content

Commit e2b48b2

Browse files
lenticularis39rostedt
authored andcommitted
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/[email protected] Signed-off-by: Tomas Glozar <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 0f59a6c commit e2b48b2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tools/tracing/rtla/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ DOCSRC := ../../../Documentation/tools/rtla/
3232

3333
FEATURE_TESTS := libtraceevent
3434
FEATURE_TESTS += libtracefs
35+
FEATURE_TESTS += libcpupower
3536
FEATURE_DISPLAY := libtraceevent
3637
FEATURE_DISPLAY += libtracefs
38+
FEATURE_DISPLAY += libcpupower
3739

3840
ifeq ($(V),1)
3941
Q =

tools/tracing/rtla/Makefile.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ else
4343
$(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)
4444
endif
4545

46+
$(call feature_check,libcpupower)
47+
ifeq ($(feature-libcpupower), 1)
48+
$(call detected,CONFIG_LIBCPUPOWER)
49+
CFLAGS += -DHAVE_LIBCPUPOWER_SUPPORT
50+
EXTLIBS += -lcpupower
51+
else
52+
$(info libcpupower is missing, building without --deepest-idle-state support.)
53+
$(info Please install libcpupower-dev/kernel-tools-libs-devel)
54+
endif
55+
4656
ifeq ($(STOP_ERROR),1)
4757
$(error Please, check the errors above.)
4858
endif

0 commit comments

Comments
 (0)