Skip to content

Commit b409b69

Browse files
author
CKI KWF Bot
committed
Merge: Reapply "perf util: Make util its own library"
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/3611 JIRA: https://issues.redhat.com/browse/RHEL-79032 Upstream Status: RHEL-only This reverts commit d1630cc. Testing has found out that d1630cc (which is a revert of b04cbd7) has broken the perf python module shipped in python3-perf package: [root@machine ~]# echo "import sys ; sys.path.insert(0, 'python'); import perf" | '/usr/bin/python3' Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /usr/lib64/python3.9/site-packages/perf.cpython-39-x86_64-linux-gnu.so: undefined symbol: verbose Revert that revert. The original problem needs to be solved by moving python3-perf to AppStream, so that it does not break the dependency rule that no BaseOS packages may depend on AppStream packages. Signed-off-by: Michael Petlan <mpetlan@redhat.com> Approved-by: Viktor Malik <vmalik@redhat.com> Approved-by: Jerome Marchand <jmarchan@redhat.com> Approved-by: ashelat <ashelat@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
2 parents d67735f + 365e5eb commit b409b69

File tree

36 files changed

+320
-309
lines changed

36 files changed

+320
-309
lines changed

tools/perf/Build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ 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-y += util/
57+
perf-util-y += util/
58+
perf-util-y += arch/
5859
perf-y += arch/
5960
perf-test-y += arch/
6061
perf-ui-y += ui/
61-
perf-y += scripts/
62+
perf-util-y += scripts/
6263

6364
gtk-y += ui/gtk/
6465

tools/perf/Makefile.perf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,18 @@ 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+
457460
LIBPMU_EVENTS_IN := $(OUTPUT)pmu-events/pmu-events-in.o
458461
LIBPMU_EVENTS := $(OUTPUT)libpmu-events.a
459462

460463
PERFLIBS = $(LIBAPI) $(LIBPERF) $(LIBSUBCMD) $(LIBSYMBOL)
461464
ifdef LIBBPF_STATIC
462465
PERFLIBS += $(LIBBPF)
463466
endif
464-
PERFLIBS += $(LIBPERF_BENCH) $(LIBPERF_TEST) $(LIBPERF_UI) $(LIBPMU_EVENTS)
467+
PERFLIBS += $(LIBPERF_BENCH) $(LIBPERF_TEST) $(LIBPERF_UI) $(LIBPERF_UTIL)
468+
PERFLIBS += $(LIBPMU_EVENTS)
465469

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

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+
784794
$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN)
785795
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) \
786796
$(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-y += common.o
2-
perf-y += $(SRCARCH)/
1+
perf-util-y += common.o
32
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-y += util/
1+
perf-util-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-y += perf_regs.o
1+
perf-util-y += perf_regs.o
22

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

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

8-
perf-$(CONFIG_AUXTRACE) += pmu.o auxtrace.o cs-etm.o
8+
perf-util-$(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-y += util/
1+
perf-util-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-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
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
1010

11-
perf-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
11+
perf-util-$(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-y += util/
1+
perf-util-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-y += perf_regs.o
1+
perf-util-y += perf_regs.o
22

3-
perf-$(CONFIG_DWARF) += dwarf-regs.o
4-
perf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
3+
perf-util-$(CONFIG_DWARF) += dwarf-regs.o
4+
perf-util-$(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-y += util/
1+
perf-util-y += util/

0 commit comments

Comments
 (0)