Build 9.3 KB
Newer Older
1
perf-y += annotate.o
2
perf-y += block-info.o
3 4
perf-y += block-range.o
perf-y += build-id.o
5
perf-y += cacheline.o
6
perf-y += config.o
7
perf-y += copyfile.o
8 9 10 11 12
perf-y += ctype.o
perf-y += db-export.o
perf-y += env.o
perf-y += event.o
perf-y += evlist.o
13
perf-y += evlist-hybrid.o
14
perf-y += sideband_evlist.o
15 16
perf-y += evsel.o
perf-y += evsel_fprintf.o
17
perf-y += perf_event_attr_fprintf.o
18
perf-y += evswitch.o
19 20 21 22 23 24 25 26
perf-y += find_bit.o
perf-y += get_current_dir_name.o
perf-y += kallsyms.o
perf-y += levenshtein.o
perf-y += llvm-utils.o
perf-y += mmap.o
perf-y += memswap.o
perf-y += parse-events.o
27
perf-y += parse-events-hybrid.o
28 29 30
perf-y += perf_regs.o
perf-y += path.o
perf-y += print_binary.o
31
perf-y += rlimit.o
32
perf-y += argv_split.o
33 34 35 36 37 38 39 40 41 42 43 44
perf-y += rbtree.o
perf-y += libstring.o
perf-y += bitmap.o
perf-y += hweight.o
perf-y += smt.o
perf-y += strbuf.o
perf-y += string.o
perf-y += strlist.o
perf-y += strfilter.o
perf-y += top.o
perf-y += usage.o
perf-y += dso.o
45
perf-y += dsos.o
46 47 48 49 50 51 52 53 54
perf-y += symbol.o
perf-y += symbol_fprintf.o
perf-y += color.o
perf-y += color_config.o
perf-y += metricgroup.o
perf-y += header.o
perf-y += callchain.o
perf-y += values.o
perf-y += debug.o
55
perf-y += fncache.o
56 57 58 59 60 61
perf-y += machine.o
perf-y += map.o
perf-y += pstack.o
perf-y += session.o
perf-y += sample-raw.o
perf-y += s390-sample-raw.o
62
perf-y += amd-sample-raw.o
63 64 65 66 67 68 69 70 71 72 73 74
perf-$(CONFIG_TRACE) += syscalltbl.o
perf-y += ordered-events.o
perf-y += namespaces.o
perf-y += comm.o
perf-y += thread.o
perf-y += thread_map.o
perf-y += trace-event-parse.o
perf-y += parse-events-flex.o
perf-y += parse-events-bison.o
perf-y += pmu.o
perf-y += pmu-flex.o
perf-y += pmu-bison.o
75
perf-y += pmu-hybrid.o
76 77 78 79 80 81 82 83 84
perf-y += trace-event-read.o
perf-y += trace-event-info.o
perf-y += trace-event-scripting.o
perf-y += trace-event.o
perf-y += svghelper.o
perf-y += sort.o
perf-y += hist.o
perf-y += util.o
perf-y += cpumap.o
85
perf-y += affinity.o
J
Jiri Olsa 已提交
86
perf-y += cputopo.o
87 88 89 90 91 92 93 94 95
perf-y += cgroup.o
perf-y += target.o
perf-y += rblist.o
perf-y += intlist.o
perf-y += vdso.o
perf-y += counts.o
perf-y += stat.o
perf-y += stat-shadow.o
perf-y += stat-display.o
96
perf-y += perf_api_probe.o
97 98 99
perf-y += record.o
perf-y += srcline.o
perf-y += srccode.o
100
perf-y += synthetic-events.o
101 102 103 104 105 106
perf-y += data.o
perf-y += tsc.o
perf-y += cloexec.o
perf-y += call-path.o
perf-y += rwsem.o
perf-y += thread-stack.o
J
Jin Yao 已提交
107
perf-y += spark.o
K
Kan Liang 已提交
108
perf-y += topdown.o
109
perf-y += iostat.o
110
perf-y += stream.o
111 112 113 114 115
perf-$(CONFIG_AUXTRACE) += auxtrace.o
perf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
perf-$(CONFIG_AUXTRACE) += intel-pt.o
perf-$(CONFIG_AUXTRACE) += intel-bts.o
perf-$(CONFIG_AUXTRACE) += arm-spe.o
116
perf-$(CONFIG_AUXTRACE) += arm-spe-decoder/
117
perf-$(CONFIG_AUXTRACE) += s390-cpumsf.o
118 119

ifdef CONFIG_LIBOPENCSD
120 121
perf-$(CONFIG_AUXTRACE) += cs-etm.o
perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
122 123
endif

124 125 126
perf-y += parse-branch-options.o
perf-y += dump-insn.o
perf-y += parse-regs-options.o
127
perf-y += parse-sublevel-options.o
128 129
perf-y += term.o
perf-y += help-unknown-cmd.o
130
perf-y += dlfilter.o
131 132 133 134
perf-y += mem-events.o
perf-y += vsprintf.o
perf-y += units.o
perf-y += time-utils.o
J
Jiri Olsa 已提交
135
perf-y += expr-flex.o
136
perf-y += expr-bison.o
J
Jiri Olsa 已提交
137
perf-y += expr.o
138 139
perf-y += branch.o
perf-y += mem2node.o
140
perf-y += clockid.o
141 142

perf-$(CONFIG_LIBBPF) += bpf-loader.o
143
perf-$(CONFIG_LIBBPF) += bpf_map.o
144
perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o
145
perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o
146 147 148 149
perf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
perf-$(CONFIG_LIBELF) += symbol-elf.o
perf-$(CONFIG_LIBELF) += probe-file.o
perf-$(CONFIG_LIBELF) += probe-event.o
150

J
Jiri Olsa 已提交
151 152 153
ifdef CONFIG_LIBBPF_DYNAMIC
  hashmap := 1
endif
154
ifndef CONFIG_LIBBPF
J
Jiri Olsa 已提交
155 156 157 158
  hashmap := 1
endif

ifdef hashmap
159 160 161
perf-y += hashmap.o
endif

162
ifndef CONFIG_LIBELF
163
perf-y += symbol-minimal.o
164 165
endif

166
ifndef CONFIG_SETNS
167
perf-y += setns.o
168 169
endif

170 171 172
perf-$(CONFIG_DWARF) += probe-finder.o
perf-$(CONFIG_DWARF) += dwarf-aux.o
perf-$(CONFIG_DWARF) += dwarf-regs.o
173

174 175 176 177 178
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
perf-$(CONFIG_LOCAL_LIBUNWIND)    += unwind-libunwind-local.o
perf-$(CONFIG_LIBUNWIND)          += unwind-libunwind.o
perf-$(CONFIG_LIBUNWIND_X86)      += libunwind/x86_32.o
perf-$(CONFIG_LIBUNWIND_AARCH64)  += libunwind/arm64.o
179

180
perf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
N
Nicholas Fraser 已提交
181
perf-y += data-convert-json.o
182

183
perf-y += scripting-engines/
184

185 186
perf-$(CONFIG_ZLIB) += zlib.o
perf-$(CONFIG_LZMA) += lzma.o
187 188
perf-$(CONFIG_ZSTD) += zstd.o

189 190
perf-$(CONFIG_LIBCAP) += cap.o

F
Fabian Hemmer 已提交
191
perf-y += demangle-ocaml.o
192 193
perf-y += demangle-java.o
perf-y += demangle-rust.o
194

195
ifdef CONFIG_JITDUMP
196 197 198
perf-$(CONFIG_LIBELF) += jitdump.o
perf-$(CONFIG_LIBELF) += genelf.o
perf-$(CONFIG_DWARF) += genelf_debug.o
199
endif
200

201
perf-y += perf-hooks.o
W
Wang Nan 已提交
202

203
perf-$(CONFIG_LIBBPF) += bpf-event.o
204

205
perf-$(CONFIG_CXX) += c++/
206

207 208
perf-$(CONFIG_LIBPFM4) += pfm.o

209
CFLAGS_config.o   += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
210 211
CFLAGS_llvm-utils.o += -DPERF_INCLUDE_DIR="BUILD_STR($(perf_include_dir_SQ))"

212 213
# avoid compiler warnings in 32-bit mode
CFLAGS_genelf_debug.o  += -Wno-packed
214

215
$(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
216
	$(call rule_mkdir)
217 218
	$(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \
		--header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $<
219

220
$(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y
221
	$(call rule_mkdir)
222
	$(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
223
		-o $(OUTPUT)util/parse-events-bison.c -p parse_events_
224

225
$(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c
J
Jiri Olsa 已提交
226
	$(call rule_mkdir)
227 228
	$(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \
		--header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $<
J
Jiri Olsa 已提交
229

230
$(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y
231
	$(call rule_mkdir)
232
	$(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
233
		-o $(OUTPUT)util/expr-bison.c -p expr_
234

235
$(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c
236
	$(call rule_mkdir)
237 238
	$(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \
		--header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $<
239

240
$(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y
241
	$(call rule_mkdir)
242
	$(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
243
		-o $(OUTPUT)util/pmu-bison.c -p perf_pmu_
244

245 246 247 248 249 250 251 252 253 254 255 256 257
FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e  's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26)
ifeq ($(FLEX_GE_26),1)
  flex_flags := -Wno-switch-enum -Wno-switch-default -Wno-unused-function -Wno-redundant-decls -Wno-sign-compare -Wno-unused-parameter -Wno-missing-prototypes -Wno-missing-declarations
  CC_HASNT_MISLEADING_INDENTATION := $(shell echo "int main(void) { return 0 }" | $(CC) -Werror -Wno-misleading-indentation -o /dev/null -xc - 2>&1 | grep -q -- -Wno-misleading-indentation ; echo $$?)
  ifeq ($(CC_HASNT_MISLEADING_INDENTATION), 1)
    flex_flags += -Wno-misleading-indentation
  endif
else
  flex_flags := -w
endif
CFLAGS_parse-events-flex.o  += $(flex_flags)
CFLAGS_pmu-flex.o           += $(flex_flags)
CFLAGS_expr-flex.o          += $(flex_flags)
258 259 260 261 262 263 264 265 266 267 268

bison_flags := -DYYENABLE_NLS=0
BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
ifeq ($(BISON_GE_35),1)
  bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum
else
  bison_flags += -w
endif
CFLAGS_parse-events-bison.o += $(bison_flags)
CFLAGS_pmu-bison.o          += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
CFLAGS_expr-bison.o         += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags)
269 270 271

$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
J
Jiri Olsa 已提交
272
$(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c
273

274
CFLAGS_bitmap.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
275
CFLAGS_find_bit.o      += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
276
CFLAGS_rbtree.o        += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
277
CFLAGS_libstring.o     += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
278 279
CFLAGS_hweight.o       += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
CFLAGS_parse-events.o  += -Wno-redundant-decls
J
Jiri Olsa 已提交
280
CFLAGS_expr.o          += -Wno-redundant-decls
281
CFLAGS_header.o        += -include $(OUTPUT)PERF-VERSION-FILE
282 283

$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
284
	$(call rule_mkdir)
285 286
	$(call if_changed_dep,cc_o_c)

287 288 289 290
$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)

291 292 293 294
$(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)

295 296 297 298
$(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)

299
$(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE
300
	$(call rule_mkdir)
301 302
	$(call if_changed_dep,cc_o_c)

303
$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
304
	$(call rule_mkdir)
305 306
	$(call if_changed_dep,cc_o_c)

307 308 309 310
$(OUTPUT)util/libstring.o: ../lib/string.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)

311
$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
312
	$(call rule_mkdir)
313
	$(call if_changed_dep,cc_o_c)
314 315 316 317

$(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)