Re: [PATCH v5] perf tools: add support for libpfm4

From: Jiri Olsa
Date: Tue Mar 24 2020 - 06:26:54 EST


On Mon, Mar 23, 2020 at 04:58:46PM -0700, Ian Rogers wrote:

SNIP

> INTERACTIVE PROMPTING KEYS
> --------------------------
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 80e55e796be9..571aa6b1af40 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -999,6 +999,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)

you don't use CONFIG_LIBPFM4

but I was wondering if we should put it all in separate
object like util/pfm.c to get rid of some of those ifdefs

jirka