Skip to content

Commit d1630cc

Browse files
committed
Revert "perf util: Make util its own library"
JIRA: https://issues.redhat.com/browse/RHEL-65742 Upstream Status: RHEL-only This reverts commit b04cbd7. Conflicts: ========== Revert is not straightforward, because the following backported patches changed the context: ea59b70 ("perf bpf: Move BPF disassembly routines to separate file to avoid clash with capstone bpf headers") 564e5cb ("perf tool: Move fill defaults into tool.c") 8db5cab ("perf stat: Fork and launch 'perf record' when 'perf stat' needs to get retire latency value for a metric.") c3f8644 ("perf report: Support LLVM for addr2line()") Thus we need to adjust the changes manually. Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 446b16a commit d1630cc

File tree

36 files changed

+309
-320
lines changed

36 files changed

+309
-320
lines changed

tools/perf/Build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ CFLAGS_builtin-trace.o += -DSTRACE_GROUPS_DIR="BUILD_STR($(STRACE_GROUPS_DIR_
5454
CFLAGS_builtin-report.o += -DTIPDIR="BUILD_STR($(tipdir_SQ))"
5555
CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
5656

57-
perf-util-y += util/
58-
perf-util-y += arch/
57+
perf-y += util/
5958
perf-y += arch/
6059
perf-test-y += arch/
6160
perf-ui-y += ui/
62-
perf-util-y += scripts/
61+
perf-y += scripts/
6362

6463
gtk-y += ui/gtk/
6564

tools/perf/Makefile.perf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -454,18 +454,14 @@ LIBPERF_TEST := $(OUTPUT)libperf-test.a
454454
LIBPERF_UI_IN := $(OUTPUT)perf-ui-in.o
455455
LIBPERF_UI := $(OUTPUT)libperf-ui.a
456456

457-
LIBPERF_UTIL_IN := $(OUTPUT)perf-util-in.o
458-
LIBPERF_UTIL := $(OUTPUT)libperf-util.a
459-
460457
LIBPMU_EVENTS_IN := $(OUTPUT)pmu-events/pmu-events-in.o
461458
LIBPMU_EVENTS := $(OUTPUT)libpmu-events.a
462459

463460
PERFLIBS = $(LIBAPI) $(LIBPERF) $(LIBSUBCMD) $(LIBSYMBOL)
464461
ifdef LIBBPF_STATIC
465462
PERFLIBS += $(LIBBPF)
466463
endif
467-
PERFLIBS += $(LIBPERF_BENCH) $(LIBPERF_TEST) $(LIBPERF_UI) $(LIBPERF_UTIL)
468-
PERFLIBS += $(LIBPMU_EVENTS)
464+
PERFLIBS += $(LIBPERF_BENCH) $(LIBPERF_TEST) $(LIBPERF_UI) $(LIBPMU_EVENTS)
469465

470466
# We choose to avoid "if .. else if .. else .. endif endif"
471467
# because maintaining the nesting to match is a pain. If
@@ -785,12 +781,6 @@ $(LIBPERF_UI_IN): FORCE prepare
785781
$(LIBPERF_UI): $(LIBPERF_UI_IN)
786782
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $<
787783

788-
$(LIBPERF_UTIL_IN): FORCE prepare
789-
$(Q)$(MAKE) $(build)=perf-util
790-
791-
$(LIBPERF_UTIL): $(LIBPERF_UTIL_IN)
792-
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $<
793-
794784
$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN)
795785
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) \
796786
$(PERF_IN) $(LIBS) -o $@

tools/perf/arch/Build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
perf-util-y += common.o
1+
perf-y += common.o
2+
perf-y += $(SRCARCH)/
23
perf-test-y += $(SRCARCH)/
3-
perf-util-y += $(SRCARCH)/

tools/perf/arch/arm/Build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
perf-util-y += util/
1+
perf-y += util/
22
perf-test-$(CONFIG_DWARF_UNWIND) += tests/

tools/perf/arch/arm/util/Build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
perf-util-y += perf_regs.o
1+
perf-y += perf_regs.o
22

3-
perf-util-$(CONFIG_DWARF) += dwarf-regs.o
3+
perf-$(CONFIG_DWARF) += dwarf-regs.o
44

5-
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
6-
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
5+
perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
6+
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
77

8-
perf-util-$(CONFIG_AUXTRACE) += pmu.o auxtrace.o cs-etm.o
8+
perf-$(CONFIG_AUXTRACE) += pmu.o auxtrace.o cs-etm.o

tools/perf/arch/arm64/Build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
perf-util-y += util/
1+
perf-y += util/
22
perf-test-y += tests/

tools/perf/arch/arm64/util/Build

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
perf-util-y += header.o
2-
perf-util-y += machine.o
3-
perf-util-y += perf_regs.o
4-
perf-util-y += tsc.o
5-
perf-util-y += pmu.o
6-
perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o
7-
perf-util-$(CONFIG_DWARF) += dwarf-regs.o
8-
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
9-
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
1+
perf-y += header.o
2+
perf-y += machine.o
3+
perf-y += perf_regs.o
4+
perf-y += tsc.o
5+
perf-y += pmu.o
6+
perf-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o
7+
perf-$(CONFIG_DWARF) += dwarf-regs.o
8+
perf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
9+
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
1010

11-
perf-util-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
11+
perf-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
1212
../../arm/util/auxtrace.o \
1313
../../arm/util/cs-etm.o \
1414
arm-spe.o mem-events.o hisi-ptt.o

tools/perf/arch/csky/Build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
perf-util-y += util/
1+
perf-y += util/

tools/perf/arch/csky/util/Build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
perf-util-y += perf_regs.o
1+
perf-y += perf_regs.o
22

3-
perf-util-$(CONFIG_DWARF) += dwarf-regs.o
4-
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
3+
perf-$(CONFIG_DWARF) += dwarf-regs.o
4+
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o

tools/perf/arch/loongarch/Build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
perf-util-y += util/
1+
perf-y += util/

0 commit comments

Comments
 (0)