Re: [PATCH v9 4/4] perf tools: add support for libpfm4

From: Jiri Olsa
Date: Thu Apr 16 2020 - 05:51:32 EST


On Wed, Apr 15, 2020 at 11:35:51PM -0700, Ian Rogers wrote:

SNIP

> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 12a8204d63c6..26167ad38a47 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -1012,6 +1012,18 @@ ifdef LIBCLANGLLVM
> endif
> endif
>
> +ifndef NO_LIBPFM4
> + ifeq ($(feature-libpfm4), 1)
> + CFLAGS += -DHAVE_LIBPFM
> + EXTLIBS += -lpfm
> + ASCIIDOC_EXTRA = -aHAVE_LIBPFM=1
> + $(call detected,CONFIG_LIBPFM4)
> + else
> + msg := $(warning libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev);
> + NO_LIBPFM4 := 1
> + endif
> +endif

now when it's in FEATURE_TESTS_EXTRA it will not get detected,
unless you add the change below.. I wonder how come it was
still being detected for you.. might be bug in feature detection
stuff

jirka


---
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 26167ad38a47..b45c5d370b42 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1013,6 +1013,7 @@ ifdef LIBCLANGLLVM
endif

ifndef NO_LIBPFM4
+ $(call feature_check,libpfm4)
ifeq ($(feature-libpfm4), 1)
CFLAGS += -DHAVE_LIBPFM
EXTLIBS += -lpfm