Skip to content

Commit 34bec35

Browse files
carstenhaitzleracmel
authored andcommitted
perf test: Add build infra for perf test tools for ARM CoreSight tests
This adds the initial build infrastructure (makefiles maintainers information) for adding follow-on tests for CoreSight. Committer notes: Remove the installation of tests/shell/coresight/*.sh, as there are no files there yet and thus, at this point, make install fails. Use $(QUIET_CLEAN) to avoid having extraneous output in the 'make clean' output. Also use @$(MAKE) in tools/perf/tests/shell/coresight/Makefile as $(Q) is not turning into @ when V=1 isn't used, i.e. in the default case it is not being quiet. The >/dev/null in the all for tools/perf/tests/shell/coresight/Makefile is to avoid this: make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. make[4]: Nothing to be done for 'all'. DESCEND plugins GEN /tmp/build/perf/python/perf.so make[4]: Nothing to be done for 'all'. INSTALL trace_plugins On !arm64 where nothing is done on the main target for tools/perf/tests/shell/coresight/*/Makefile. Signed-off-by: Carsten Haitzler <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Mike Leach <[email protected]> Cc: Suzuki Poulouse <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent c63317a commit 34bec35

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,7 @@ F: drivers/hwtracing/coresight/*
20272027
F: include/dt-bindings/arm/coresight-cti-dt.h
20282028
F: include/linux/coresight*
20292029
F: samples/coresight/*
2030+
F: tools/perf/tests/shell/coresight/*
20302031
F: tools/perf/arch/arm/util/auxtrace.c
20312032
F: tools/perf/arch/arm/util/cs-etm.c
20322033
F: tools/perf/arch/arm/util/cs-etm.h

tools/perf/Makefile.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,8 @@ perf_examples_instdir_SQ = $(subst ','\'',$(perf_examples_instdir))
12961296
STRACE_GROUPS_INSTDIR_SQ = $(subst ','\'',$(STRACE_GROUPS_INSTDIR))
12971297
tip_instdir_SQ = $(subst ','\'',$(tip_instdir))
12981298

1299+
export perfexec_instdir_SQ
1300+
12991301
# If we install to $(HOME) we keep the traceevent default:
13001302
# $(HOME)/.traceevent/plugins
13011303
# Otherwise we install plugins into the global $(libdir).

tools/perf/Makefile.perf

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,16 @@ sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
629629
$(sync_file_range_arrays): $(linux_uapi_dir)/fs.h $(sync_file_range_tbls)
630630
$(Q)$(SHELL) '$(sync_file_range_tbls)' $(linux_uapi_dir) > $@
631631

632-
all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
632+
TESTS_CORESIGHT_DIR := $(srctree)/tools/perf/tests/shell/coresight
633+
634+
tests-coresight-targets: FORCE
635+
$(Q)$(MAKE) -C $(TESTS_CORESIGHT_DIR)
636+
637+
tests-coresight-targets-clean:
638+
$(call QUIET_CLEAN, coresight)
639+
$(Q)$(MAKE) -C $(TESTS_CORESIGHT_DIR) O=$(OUTPUT) clean >/dev/null
640+
641+
all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) tests-coresight-targets
633642

634643
# Create python binding output directory if not already present
635644
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
@@ -1006,7 +1015,9 @@ install-tests: all install-gtk
10061015
$(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
10071016
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
10081017
$(INSTALL) tests/shell/lib/*.sh -m 644 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
1009-
$(INSTALL) tests/shell/lib/*.py -m 644 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'
1018+
$(INSTALL) tests/shell/lib/*.py -m 644 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
1019+
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/coresight'
1020+
$(Q)$(MAKE) -C tests/shell/coresight install-tests
10101021

10111022
install-bin: install-tools install-tests install-traceevent-plugins
10121023

@@ -1077,7 +1088,7 @@ endif # BUILD_BPF_SKEL
10771088
bpf-skel-clean:
10781089
$(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS)
10791090

1080-
clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBPERF)-clean fixdep-clean python-clean bpf-skel-clean
1091+
clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBPERF)-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean
10811092
$(call QUIET_CLEAN, core-objs) $(RM) $(LIBPERF_A) $(OUTPUT)perf-archive $(OUTPUT)perf-iostat $(LANG_BINDINGS)
10821093
$(Q)find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
10831094
$(Q)$(RM) $(OUTPUT).config-detected
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# Carsten Haitzler <[email protected]>, 2021
3+
include ../../../../../tools/scripts/Makefile.include
4+
include ../../../../../tools/scripts/Makefile.arch
5+
include ../../../../../tools/scripts/utilities.mak
6+
7+
SUBDIRS =
8+
9+
all: $(SUBDIRS)
10+
$(SUBDIRS):
11+
@$(MAKE) -C $@ >/dev/null
12+
13+
INSTALLDIRS = $(SUBDIRS:%=install-%)
14+
15+
install-tests: $(INSTALLDIRS)
16+
$(INSTALLDIRS):
17+
@$(MAKE) -C $(@:install-%=%) install-tests >/dev/null
18+
19+
CLEANDIRS = $(SUBDIRS:%=clean-%)
20+
21+
clean: $(CLEANDIRS)
22+
$(CLEANDIRS):
23+
$(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
24+
25+
.PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# Carsten Haitzler <[email protected]>, 2021
3+
4+
ifndef DESTDIR
5+
prefix ?= $(HOME)
6+
endif
7+
8+
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
9+
INSTALL = install
10+
INSTDIR_SUB = tests/shell/coresight
11+
12+
include ../../../../../scripts/Makefile.include
13+
include ../../../../../scripts/Makefile.arch
14+
include ../../../../../scripts/utilities.mak

0 commit comments

Comments
 (0)