Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <carsten.haitzler@arm.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Link: http://lore.kernel.org/lkml/20220909152803.2317006-3-carsten.haitzler@foss.arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Carsten Haitzler and committed by
Arnaldo Carvalho de Melo
34bec35c c63317ab

+56 -3
+1
MAINTAINERS
··· 2027 2027 F: include/dt-bindings/arm/coresight-cti-dt.h 2028 2028 F: include/linux/coresight* 2029 2029 F: samples/coresight/* 2030 + F: tools/perf/tests/shell/coresight/* 2030 2031 F: tools/perf/arch/arm/util/auxtrace.c 2031 2032 F: tools/perf/arch/arm/util/cs-etm.c 2032 2033 F: tools/perf/arch/arm/util/cs-etm.h
+2
tools/perf/Makefile.config
··· 1296 1296 STRACE_GROUPS_INSTDIR_SQ = $(subst ','\'',$(STRACE_GROUPS_INSTDIR)) 1297 1297 tip_instdir_SQ = $(subst ','\'',$(tip_instdir)) 1298 1298 1299 + export perfexec_instdir_SQ 1300 + 1299 1301 # If we install to $(HOME) we keep the traceevent default: 1300 1302 # $(HOME)/.traceevent/plugins 1301 1303 # Otherwise we install plugins into the global $(libdir).
+14 -3
tools/perf/Makefile.perf
··· 629 629 $(sync_file_range_arrays): $(linux_uapi_dir)/fs.h $(sync_file_range_tbls) 630 630 $(Q)$(SHELL) '$(sync_file_range_tbls)' $(linux_uapi_dir) > $@ 631 631 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 633 642 634 643 # Create python binding output directory if not already present 635 644 _dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python') ··· 1015 1006 $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ 1016 1007 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ 1017 1008 $(INSTALL) tests/shell/lib/*.sh -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' 1009 + $(INSTALL) tests/shell/lib/*.py -m 644 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ 1010 + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/coresight' 1011 + $(Q)$(MAKE) -C tests/shell/coresight install-tests 1019 1012 1020 1013 install-bin: install-tools install-tests install-traceevent-plugins 1021 1014 ··· 1088 1077 bpf-skel-clean: 1089 1078 $(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS) 1090 1079 1091 - clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBPERF)-clean fixdep-clean python-clean bpf-skel-clean 1080 + clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBPERF)-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean 1092 1081 $(call QUIET_CLEAN, core-objs) $(RM) $(LIBPERF_A) $(OUTPUT)perf-archive $(OUTPUT)perf-iostat $(LANG_BINDINGS) 1093 1082 $(Q)find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete 1094 1083 $(Q)$(RM) $(OUTPUT).config-detected
+25
tools/perf/tests/shell/coresight/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + # Carsten Haitzler <carsten.haitzler@arm.com>, 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)
+14
tools/perf/tests/shell/coresight/Makefile.miniconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + # Carsten Haitzler <carsten.haitzler@arm.com>, 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