xref: /linux/tools/perf/tests/Build (revision 811f35ff59b6f99ae272d6f5b96bc9e974f88196)
1# SPDX-License-Identifier: GPL-2.0
2
3perf-y += builtin-test.o
4perf-y += builtin-test-list.o
5perf-y += parse-events.o
6perf-y += dso-data.o
7perf-y += attr.o
8perf-y += vmlinux-kallsyms.o
9perf-$(CONFIG_LIBTRACEEVENT) += openat-syscall.o
10perf-$(CONFIG_LIBTRACEEVENT) += openat-syscall-all-cpus.o
11perf-$(CONFIG_LIBTRACEEVENT) += openat-syscall-tp-fields.o
12perf-$(CONFIG_LIBTRACEEVENT) += mmap-basic.o
13perf-y += perf-record.o
14perf-y += evsel-roundtrip-name.o
15perf-$(CONFIG_LIBTRACEEVENT) += evsel-tp-sched.o
16perf-y += fdarray.o
17perf-y += pmu.o
18perf-y += pmu-events.o
19perf-y += hists_common.o
20perf-y += hists_link.o
21perf-y += hists_filter.o
22perf-y += hists_output.o
23perf-y += hists_cumulate.o
24perf-y += python-use.o
25perf-y += bp_signal.o
26perf-y += bp_signal_overflow.o
27perf-y += bp_account.o
28perf-y += wp.o
29perf-y += task-exit.o
30perf-y += sw-clock.o
31perf-y += mmap-thread-lookup.o
32perf-y += thread-maps-share.o
33perf-$(CONFIG_LIBTRACEEVENT) += switch-tracking.o
34perf-y += keep-tracking.o
35perf-y += code-reading.o
36perf-y += sample-parsing.o
37perf-y += parse-no-sample-id-all.o
38perf-y += kmod-path.o
39perf-y += thread-map.o
40perf-y += llvm.o llvm-src-base.o llvm-src-kbuild.o llvm-src-prologue.o llvm-src-relocation.o
41perf-y += bpf.o
42perf-y += topology.o
43perf-y += mem.o
44perf-y += cpumap.o
45perf-y += stat.o
46perf-y += event_update.o
47perf-y += event-times.o
48perf-y += expr.o
49perf-y += backward-ring-buffer.o
50perf-y += sdt.o
51perf-y += is_printable_array.o
52perf-y += bitmap.o
53perf-y += perf-hooks.o
54perf-y += clang.o
55perf-y += unit_number__scnprintf.o
56perf-y += mem2node.o
57perf-y += maps.o
58perf-y += time-utils-test.o
59perf-y += genelf.o
60perf-y += api-io.o
61perf-y += demangle-java-test.o
62perf-y += demangle-ocaml-test.o
63perf-y += pfm.o
64perf-y += parse-metric.o
65perf-y += pe-file-parsing.o
66perf-y += expand-cgroup.o
67perf-y += perf-time-to-tsc.o
68perf-y += dlfilter-test.o
69perf-y += sigtrap.o
70perf-y += event_groups.o
71perf-y += symbols.o
72
73$(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c tests/Build
74	$(call rule_mkdir)
75	$(Q)echo '#include <tests/llvm.h>' > $@
76	$(Q)echo 'const char test_llvm__bpf_base_prog[] =' >> $@
77	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
78	$(Q)echo ';' >> $@
79
80$(OUTPUT)tests/llvm-src-kbuild.c: tests/bpf-script-test-kbuild.c tests/Build
81	$(call rule_mkdir)
82	$(Q)echo '#include <tests/llvm.h>' > $@
83	$(Q)echo 'const char test_llvm__bpf_test_kbuild_prog[] =' >> $@
84	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
85	$(Q)echo ';' >> $@
86
87$(OUTPUT)tests/llvm-src-prologue.c: tests/bpf-script-test-prologue.c tests/Build
88	$(call rule_mkdir)
89	$(Q)echo '#include <tests/llvm.h>' > $@
90	$(Q)echo 'const char test_llvm__bpf_test_prologue_prog[] =' >> $@
91	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
92	$(Q)echo ';' >> $@
93
94$(OUTPUT)tests/llvm-src-relocation.c: tests/bpf-script-test-relocation.c tests/Build
95	$(call rule_mkdir)
96	$(Q)echo '#include <tests/llvm.h>' > $@
97	$(Q)echo 'const char test_llvm__bpf_test_relocation[] =' >> $@
98	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
99	$(Q)echo ';' >> $@
100
101ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc))
102perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
103endif
104
105CFLAGS_attr.o         += -DBINDIR="BUILD_STR($(bindir_SQ))" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
106CFLAGS_python-use.o   += -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
107CFLAGS_dwarf-unwind.o += -fno-optimize-sibling-calls
108
109perf-y += workloads/
110