diff options
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r-- | tools/perf/Makefile.perf | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 05c083bb1122..979d4691221a 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -158,7 +158,7 @@ ifneq ($(OUTPUT),) VPATH += $(OUTPUT) export VPATH # create symlink to the original source -SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source) +SOURCE := $(shell ln -sfn $(srctree)/tools/perf $(OUTPUT)/source) endif # Do not use make's built-in rules @@ -248,7 +248,7 @@ else force_fixdep := $(config) endif -# Runs shellcheck on perf test shell scripts +# Runs shellcheck on perf shell scripts ifeq ($(NO_SHELLCHECK),1) SHELLCHECK := else @@ -265,8 +265,18 @@ ifneq ($(SHELLCHECK),) endif endif +# Runs mypy on perf python files +ifeq ($(MYPY),1) + MYPY := $(shell which mypy 2> /dev/null) +endif + +# Runs pylint on perf python files +ifeq ($(PYLINT),1) + PYLINT := $(shell which pylint 2> /dev/null) +endif + export srctree OUTPUT RM CC CXX LD AR CFLAGS CXXFLAGS V BISON FLEX AWK -export HOSTCC HOSTLD HOSTAR HOSTCFLAGS SHELLCHECK +export HOSTCC HOSTLD HOSTAR HOSTCFLAGS SHELLCHECK MYPY PYLINT include $(srctree)/tools/build/Makefile.include @@ -298,7 +308,6 @@ ifeq ($(filter feature-dump,$(MAKECMDGOALS)),feature-dump) FEATURE_TESTS := all endif endif -include $(srctree)/tools/perf/scripts/Makefile.syscalls include Makefile.config endif @@ -518,6 +527,14 @@ beauty_ioctl_outdir := $(beauty_outdir)/ioctl # Create output directory if not already present $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)') +syscall_array := $(beauty_outdir)/syscalltbl.c +syscall_tbl := $(srctree)/tools/perf/trace/beauty/syscalltbl.sh +syscall_tbl_data := $(srctree)/tools/scripts/syscall.tbl \ + $(wildcard $(srctree)/tools/perf/arch/*/entry/syscalls/syscall*.tbl) + +$(syscall_array): $(syscall_tbl) $(syscall_tbl_data) + $(Q)$(SHELL) '$(syscall_tbl)' $(srctree)/tools $@ + fs_at_flags_array := $(beauty_outdir)/fs_at_flags_array.c fs_at_flags_tbl := $(srctree)/tools/perf/trace/beauty/fs_at_flags.sh @@ -837,6 +854,7 @@ build-dir = $(or $(__build-dir),.) prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders \ arm64-sysreg-defs \ + $(syscall_array) \ $(fs_at_flags_array) \ $(clone_flags_array) \ $(drm_ioctl_array) \ |