mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
archinsn.c containing arch_fetch_insn was only enabled with CONFIG_AUXTRACE, but this meant that a NO_AUXTRACE build on x86 would use the empty weak version of arch_fetch_insn - weak symbols are a frequent source of errors like this and are outside of the C specification. Change it so that archinsn.c is always built on x86 and make the weak symbol empty version of arch_fetch_insn a strong one guarded by ifdefs. arch_fetch_insn on x86 depends on insn_decode which is a function included then built into intel-pt-insn-decoder.c. intel-pt-insn-decoder.c isn't built in a NO_AUXTRACE=1 build. Separate the insn_decode function from intel-pt-insn-decoder.c by just directly compiling the relevant file. Guard this compilation to be for either always on x86 (because of the use in arch_fetch_insn) or when auxtrace is enabled. Apply the CFLAGS overrides as necessary, reducing the amount of code where warnings are disabled. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Adrian Hunter <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Colin Ian King <[email protected]> Cc: Dapeng Mi <[email protected]> Cc: Howard Chu <[email protected]> Cc: Ilya Leoshkevich <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Richter <[email protected]> Cc: Veronika Molnarova <[email protected]> Cc: Weilin Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
21 lines
589 B
Python
21 lines
589 B
Python
perf-util-y += header.o
|
|
perf-util-y += tsc.o
|
|
perf-util-y += pmu.o
|
|
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o
|
|
perf-util-y += perf_regs.o
|
|
perf-util-y += topdown.o
|
|
perf-util-y += machine.o
|
|
perf-util-y += event.o
|
|
perf-util-y += evlist.o
|
|
perf-util-y += mem-events.o
|
|
perf-util-y += evsel.o
|
|
perf-util-y += iostat.o
|
|
|
|
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
|
|
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
|
|
|
|
perf-util-$(CONFIG_AUXTRACE) += auxtrace.o
|
|
perf-util-y += archinsn.o
|
|
perf-util-$(CONFIG_AUXTRACE) += intel-pt.o
|
|
perf-util-$(CONFIG_AUXTRACE) += intel-bts.o
|