Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools feature: Add support for detecting libpfm4

libpfm4 provides an alternate command line encoding of perf events.

Signed-off-by: Stephane Eranian <eranian@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrii Nakryiko <andriin@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Igor Lubashev <ilubashe@akamai.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiwei Sun <jiwei.sun@windriver.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: yuzhoujian <yuzhoujian@didichuxing.com>
Link: http://lore.kernel.org/lkml/20200429231443.207201-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Stephane Eranian and committed by
Arnaldo Carvalho de Melo
5ef86146 4b198449

+16 -2
+2 -1
tools/build/Makefile.feature
··· 98 98 llvm \ 99 99 llvm-version \ 100 100 clang \ 101 - libbpf 101 + libbpf \ 102 + libpfm4 102 103 103 104 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) 104 105
+5 -1
tools/build/feature/Makefile
··· 69 69 test-libaio.bin \ 70 70 test-libzstd.bin \ 71 71 test-clang-bpf-global-var.bin \ 72 - test-file-handle.bin 72 + test-file-handle.bin \ 73 + test-libpfm4.bin 73 74 74 75 FILES := $(addprefix $(OUTPUT),$(FILES)) 75 76 ··· 331 330 332 331 $(OUTPUT)test-file-handle.bin: 333 332 $(BUILD) 333 + 334 + $(OUTPUT)test-libpfm4.bin: 335 + $(BUILD) -lpfm 334 336 335 337 ############################### 336 338
+9
tools/build/feature/test-libpfm4.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <sys/types.h> 3 + #include <perfmon/pfmlib.h> 4 + 5 + int main(void) 6 + { 7 + pfm_initialize(); 8 + return 0; 9 + }