blob: 6fdf073093a635a82320337a58b9d48493315ec7 [file] [log] [blame]
Jiri Olsa5ff32882019-02-13 13:32:39 +01001perf-y += annotate.o
Jin Yao60414412019-11-07 15:47:14 +08002perf-y += block-info.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01003perf-y += block-range.o
4perf-y += build-id.o
Arnaldo Carvalho de Melo12500902019-08-22 16:58:29 -03005perf-y += cacheline.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01006perf-y += config.o
Arnaldo Carvalho de Melo32ff3fe2019-09-24 15:14:12 -03007perf-y += copyfile.o
Jiri Olsa5ff32882019-02-13 13:32:39 +01008perf-y += ctype.o
9perf-y += db-export.o
10perf-y += env.o
11perf-y += event.o
12perf-y += evlist.o
13perf-y += evsel.o
14perf-y += evsel_fprintf.o
Arnaldo Carvalho de Meloca125272019-09-24 15:41:51 -030015perf-y += perf_event_attr_fprintf.o
Arnaldo Carvalho de Melo8829e562019-08-15 11:00:11 -030016perf-y += evswitch.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010017perf-y += find_bit.o
18perf-y += get_current_dir_name.o
19perf-y += kallsyms.o
20perf-y += levenshtein.o
21perf-y += llvm-utils.o
22perf-y += mmap.o
23perf-y += memswap.o
24perf-y += parse-events.o
25perf-y += perf_regs.o
26perf-y += path.o
27perf-y += print_binary.o
Arnaldo Carvalho de Melo49752232019-07-09 14:49:26 -030028perf-y += rlimit.o
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -030029perf-y += argv_split.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010030perf-y += rbtree.o
31perf-y += libstring.o
32perf-y += bitmap.o
33perf-y += hweight.o
34perf-y += smt.o
35perf-y += strbuf.o
36perf-y += string.o
37perf-y += strlist.o
38perf-y += strfilter.o
39perf-y += top.o
40perf-y += usage.o
41perf-y += dso.o
Arnaldo Carvalho de Melo4a3cec82019-08-30 11:11:01 -030042perf-y += dsos.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010043perf-y += symbol.o
44perf-y += symbol_fprintf.o
45perf-y += color.o
46perf-y += color_config.o
47perf-y += metricgroup.o
48perf-y += header.o
49perf-y += callchain.o
50perf-y += values.o
51perf-y += debug.o
Andi Kleend9664582019-11-20 16:15:11 -080052perf-y += fncache.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010053perf-y += machine.o
54perf-y += map.o
55perf-y += pstack.o
56perf-y += session.o
57perf-y += sample-raw.o
58perf-y += s390-sample-raw.o
59perf-$(CONFIG_TRACE) += syscalltbl.o
60perf-y += ordered-events.o
61perf-y += namespaces.o
62perf-y += comm.o
63perf-y += thread.o
64perf-y += thread_map.o
65perf-y += trace-event-parse.o
66perf-y += parse-events-flex.o
67perf-y += parse-events-bison.o
68perf-y += pmu.o
69perf-y += pmu-flex.o
70perf-y += pmu-bison.o
71perf-y += trace-event-read.o
72perf-y += trace-event-info.o
73perf-y += trace-event-scripting.o
74perf-y += trace-event.o
75perf-y += svghelper.o
76perf-y += sort.o
77perf-y += hist.o
78perf-y += util.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010079perf-y += cpumap.o
Andi Kleen267ed5d2019-11-20 16:15:12 -080080perf-y += affinity.o
Jiri Olsa5135d5e2019-02-19 10:58:13 +010081perf-y += cputopo.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010082perf-y += cgroup.o
83perf-y += target.o
84perf-y += rblist.o
85perf-y += intlist.o
86perf-y += vdso.o
87perf-y += counts.o
88perf-y += stat.o
89perf-y += stat-shadow.o
90perf-y += stat-display.o
91perf-y += record.o
92perf-y += srcline.o
93perf-y += srccode.o
Arnaldo Carvalho de Melo055c67e2019-09-18 16:08:52 -030094perf-y += synthetic-events.o
Jiri Olsa5ff32882019-02-13 13:32:39 +010095perf-y += data.o
96perf-y += tsc.o
97perf-y += cloexec.o
98perf-y += call-path.o
99perf-y += rwsem.o
100perf-y += thread-stack.o
Jin Yaocebf7d52019-09-25 09:14:46 +0800101perf-y += spark.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100102perf-$(CONFIG_AUXTRACE) += auxtrace.o
103perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
104perf-$(CONFIG_AUXTRACE) += intel-pt.o
105perf-$(CONFIG_AUXTRACE) += intel-bts.o
106perf-$(CONFIG_AUXTRACE) += arm-spe.o
107perf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
108perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
Mathieu Poirier440a23b2018-01-17 10:52:11 -0700109
110ifdef CONFIG_LIBOPENCSD
Jiri Olsa5ff32882019-02-13 13:32:39 +0100111perf-$(CONFIG_AUXTRACE) += cs-etm.o
112perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
Mathieu Poirier440a23b2018-01-17 10:52:11 -0700113endif
114
Jiri Olsa5ff32882019-02-13 13:32:39 +0100115perf-y += parse-branch-options.o
116perf-y += dump-insn.o
117perf-y += parse-regs-options.o
118perf-y += term.o
119perf-y += help-unknown-cmd.o
120perf-y += mem-events.o
121perf-y += vsprintf.o
122perf-y += units.o
123perf-y += time-utils.o
124perf-y += expr-bison.o
Jiri Olsa576a65b2020-02-28 10:36:12 +0100125perf-y += expr.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100126perf-y += branch.o
127perf-y += mem2node.o
Jiri Olsa9352aab2014-12-29 17:42:46 +0100128
Jiri Olsa5ff32882019-02-13 13:32:39 +0100129perf-$(CONFIG_LIBBPF) += bpf-loader.o
Arnaldo Carvalho de Melod19f85642019-02-19 16:11:56 -0300130perf-$(CONFIG_LIBBPF) += bpf_map.o
Jiri Olsa5ff32882019-02-13 13:32:39 +0100131perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
132perf-$(CONFIG_LIBELF) += symbol-elf.o
133perf-$(CONFIG_LIBELF) += probe-file.o
134perf-$(CONFIG_LIBELF) += probe-event.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100135
136ifndef CONFIG_LIBELF
Jiri Olsa5ff32882019-02-13 13:32:39 +0100137perf-y += symbol-minimal.o
Jiri Olsa709e6792014-12-29 23:52:25 +0100138endif
139
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300140ifndef CONFIG_SETNS
Jiri Olsa5ff32882019-02-13 13:32:39 +0100141perf-y += setns.o
Arnaldo Carvalho de Melo86bcdb52017-07-18 17:15:29 -0300142endif
143
Jiri Olsa5ff32882019-02-13 13:32:39 +0100144perf-$(CONFIG_DWARF) += probe-finder.o
145perf-$(CONFIG_DWARF) += dwarf-aux.o
146perf-$(CONFIG_DWARF) += dwarf-regs.o
Jiri Olsa8379fce2014-12-30 00:06:25 +0100147
Jiri Olsa5ff32882019-02-13 13:32:39 +0100148perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
149perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o
150perf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
151perf-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
152perf-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
Jiri Olsab2e45c32014-12-30 00:11:11 +0100153
Jiri Olsa5ff32882019-02-13 13:32:39 +0100154perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
Jiri Olsaedbe9812015-02-20 23:17:00 +0100155
Jiri Olsa5ff32882019-02-13 13:32:39 +0100156perf-y += scripting-engines/
Jiri Olsac7355f82014-12-30 13:11:32 +0100157
Jiri Olsa5ff32882019-02-13 13:32:39 +0100158perf-$(CONFIG_ZLIB) += zlib.o
159perf-$(CONFIG_LZMA) += lzma.o
Alexey Budankovf24c1d72019-03-18 20:42:55 +0300160perf-$(CONFIG_ZSTD) += zstd.o
161
Igor Lubashevc22e1502019-08-07 10:44:14 -0400162perf-$(CONFIG_LIBCAP) += cap.o
163
Jiri Olsa5ff32882019-02-13 13:32:39 +0100164perf-y += demangle-java.o
165perf-y += demangle-rust.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300166
Jiri Olsae12b2022016-03-10 17:41:13 +0100167ifdef CONFIG_JITDUMP
Jiri Olsa5ff32882019-02-13 13:32:39 +0100168perf-$(CONFIG_LIBELF) += jitdump.o
169perf-$(CONFIG_LIBELF) += genelf.o
170perf-$(CONFIG_DWARF) += genelf_debug.o
Arnaldo Carvalho de Melo46dad052016-03-07 18:48:45 -0300171endif
Jiri Olsa3bc33742014-12-30 13:30:04 +0100172
Jiri Olsa5ff32882019-02-13 13:32:39 +0100173perf-y += perf-hooks.o
Wang Nana0748652016-11-26 07:03:28 +0000174
Jiri Olsa5ff32882019-02-13 13:32:39 +0100175perf-$(CONFIG_LIBBPF) += bpf-event.o
Song Liu45178a92019-01-17 08:15:18 -0800176
Jiri Olsa5ff32882019-02-13 13:32:39 +0100177perf-$(CONFIG_CXX) += c++/
Wang Nan00b86692016-11-26 07:03:34 +0000178
Jiri Olsa9352aab2014-12-29 17:42:46 +0100179CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo1b16fff2018-05-04 10:37:27 -0300180CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"
181
Stephane Eranian598b7c62015-11-30 10:02:23 +0100182# avoid compiler warnings in 32-bit mode
183CFLAGS_genelf_debug.o += -Wno-packed
Jiri Olsa9352aab2014-12-29 17:42:46 +0100184
185$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100186 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300187 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100188
189$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
Jiri Olsa19993072014-12-30 18:44:38 +0100190 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300191 $(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100192
Andi Kleen07516732017-03-20 13:17:05 -0700193$(OUTPUT)util/expr-bison.c: util/expr.y
194 $(call rule_mkdir)
195 $(Q)$(call echo-cmd,bison)$(BISON) -v util/expr.y -d $(PARSER_DEBUG_BISON) -o $@ -p expr__
196
Jiri Olsa9352aab2014-12-29 17:42:46 +0100197$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
Jiri Olsa19993072014-12-30 18:44:38 +0100198 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300199 $(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
Jiri Olsa9352aab2014-12-29 17:42:46 +0100200
201$(OUTPUT)util/pmu-bison.c: util/pmu.y
Jiri Olsa19993072014-12-30 18:44:38 +0100202 $(call rule_mkdir)
Jiri Olsa70923bd2015-05-14 12:31:48 -0300203 $(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
Jiri Olsa9352aab2014-12-29 17:42:46 +0100204
205CFLAGS_parse-events-flex.o += -w
206CFLAGS_pmu-flex.o += -w
Namhyung Kim539f3aa2015-04-29 12:55:00 -0300207CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100208CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Andi Kleen07516732017-03-20 13:17:05 -0700209CFLAGS_expr-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
Jiri Olsa9352aab2014-12-29 17:42:46 +0100210
211$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
212$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
213
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300214CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300215CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100216CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300217CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
Jiri Olsa9352aab2014-12-29 17:42:46 +0100218CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
219CFLAGS_parse-events.o += -Wno-redundant-decls
Soramichi AKIYAMAd25ed5d2017-01-17 00:22:37 +0900220CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
Jiri Olsa9352aab2014-12-29 17:42:46 +0100221
222$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100223 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100224 $(call if_changed_dep,cc_o_c)
225
Arnaldo Carvalho de Melo9c105482019-06-26 15:27:58 -0300226$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
227 $(call rule_mkdir)
228 $(call if_changed_dep,cc_o_c)
229
Arnaldo Carvalho de Melo915b0882016-01-08 12:33:37 -0300230$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
231 $(call rule_mkdir)
232 $(call if_changed_dep,cc_o_c)
233
Arnaldo Carvalho de Melo3052ba52019-06-25 17:27:31 -0300234$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
235 $(call rule_mkdir)
236 $(call if_changed_dep,cc_o_c)
237
Arnaldo Carvalho de Melo552eb9752016-01-08 10:46:52 -0300238$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100239 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100240 $(call if_changed_dep,cc_o_c)
241
Arnaldo Carvalho de Melo3f735372015-07-05 22:48:21 -0300242$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100243 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100244 $(call if_changed_dep,cc_o_c)
245
Arnaldo Carvalho de Melo4ddd3272015-11-16 11:36:29 -0300246$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
247 $(call rule_mkdir)
248 $(call if_changed_dep,cc_o_c)
249
Arnaldo Carvalho de Melo0aefc352015-07-09 16:27:25 -0300250$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
Jiri Olsa19993072014-12-30 18:44:38 +0100251 $(call rule_mkdir)
Jiri Olsa9352aab2014-12-29 17:42:46 +0100252 $(call if_changed_dep,cc_o_c)
Arnaldo Carvalho de Melod0761e32016-07-07 15:42:33 -0300253
254$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
255 $(call rule_mkdir)
256 $(call if_changed_dep,cc_o_c)