@@ -73,7 +73,8 @@ FEATURE_TESTS_BASIC := \
libaio \
libzstd \
disassembler-four-args \
- file-handle
+ file-handle \
+ libpfm4
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
# of all feature tests
@@ -128,7 +129,8 @@ FEATURE_DISPLAY ?= \
bpf \
libaio \
libzstd \
- disassembler-four-args
+ disassembler-four-args \
+ libpfm4
# Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
# If in the future we need per-feature checks/flags for features not
@@ -68,7 +68,8 @@ FILES= \
test-llvm-version.bin \
test-libaio.bin \
test-libzstd.bin \
- test-file-handle.bin
+ test-file-handle.bin \
+ test-libpfm4.bin
FILES := $(addprefix $(OUTPUT),$(FILES))
@@ -325,6 +326,9 @@ $(OUTPUT)test-libzstd.bin:
$(OUTPUT)test-file-handle.bin:
$(BUILD)
+$(OUTPUT)test-libpfm4.bin:
+ $(BUILD) -lpfm
+
###############################
clean:
new file mode 100644
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <sys/types.h>
+#include <perfmon/pfmlib.h>
+
+int main(void)
+{
+ pfm_initialize();
+ return 0;
+}