Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
aa53c09
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
arch
build
cgroup
firewire
hv
iio
include
laptop
lguest
lib
net
nfsd
perf
Documentation
arch
bench
config
python
scripts
tests
attr
Build
attr.c
attr.py
bp_signal.c
bp_signal_overflow.c
builtin-test.c
code-reading.c
dso-data.c
dwarf-unwind.c
evsel-roundtrip-name.c
evsel-tp-sched.c
fdarray.c
hists_common.c
hists_common.h
hists_cumulate.c
hists_filter.c
hists_link.c
hists_output.c
keep-tracking.c
kmod-path.c
make
mmap-basic.c
mmap-thread-lookup.c
openat-syscall-all-cpus.c
openat-syscall-tp-fields.c
openat-syscall.c
parse-events.c
parse-no-sample-id-all.c
perf-record.c
perf-targz-src-pkg
perf-time-to-tsc.c
pmu.c
python-use.c
rdpmc.c
sample-parsing.c
sw-clock.c
switch-tracking.c
task-exit.c
tests.h
thread-map.c
thread-mg-share.c
vmlinux-kallsyms.c
trace
ui
util
.gitignore
Build
CREDITS
MANIFEST
Makefile
Makefile.perf
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-help.c
builtin-inject.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c
builtin-report.c
builtin-sched.c
builtin-script.c
builtin-stat.c
builtin-timechart.c
builtin-top.c
builtin-trace.c
builtin.h
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c
perf.h
power
scripts
testing
thermal
time
usb
virtio
vm
Makefile
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
tools
/
perf
/
tests
/
make
Blame
Blame
Latest commit
History
History
276 lines (235 loc) · 8.55 KB
Breadcrumbs
linux
/
tools
/
perf
/
tests
/
make
Top
File metadata and controls
Code
Blame
276 lines (235 loc) · 8.55 KB
Raw
ifndef MK ifeq ($(MAKECMDGOALS),) # no target specified, trigger the whole suite all: @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf else # run only specific test over 'Makefile' %: @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@ endif else PERF := . include config/Makefile.arch # FIXME looks like x86 is the only arch running tests ;-) # we need some IS_(32/64) flag to make this generic ifeq ($(ARCH)$(IS_64_BIT), x861) lib = lib64 else lib = lib endif has = $(shell which $1 2>/dev/null) # standard single make variable specified make_clean_all := clean all make_python_perf_so := python/perf.so make_debug := DEBUG=1 make_no_libperl := NO_LIBPERL=1 make_no_libpython := NO_LIBPYTHON=1 make_no_scripts := NO_LIBPYTHON=1 NO_LIBPERL=1 make_no_newt := NO_NEWT=1 make_no_slang := NO_SLANG=1 make_no_gtk2 := NO_GTK2=1 make_no_ui := NO_NEWT=1 NO_SLANG=1 NO_GTK2=1 make_no_demangle := NO_DEMANGLE=1 make_no_libelf := NO_LIBELF=1 make_no_libunwind := NO_LIBUNWIND=1 make_no_libdw_dwarf_unwind := NO_LIBDW_DWARF_UNWIND=1 make_no_backtrace := NO_BACKTRACE=1 make_no_libnuma := NO_LIBNUMA=1 make_no_libaudit := NO_LIBAUDIT=1 make_no_libbionic := NO_LIBBIONIC=1 make_no_auxtrace := NO_AUXTRACE=1 make_tags := tags make_cscope := cscope make_help := help make_doc := doc make_perf_o := perf.o make_util_map_o := util/map.o make_util_pmu_bison_o := util/pmu-bison.o make_install := install make_install_bin := install-bin make_install_doc := install-doc make_install_man := install-man make_install_html := install-html make_install_info := install-info make_install_pdf := install-pdf make_install_prefix := install prefix=/tmp/krava make_install_prefix_slash := install prefix=/tmp/krava/ make_static := LDFLAGS=-static # all the NO_* variable combined make_minimal := NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 make_minimal += NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 # $(run) contains all available tests run := make_pure # Targets 'clean all' can be run together only through top level # Makefile because we detect clean target in Makefile.perf and # disable features detection ifeq ($(MK),Makefile) run += make_clean_all endif run += make_python_perf_so run += make_debug run += make_no_libperl run += make_no_libpython run += make_no_scripts run += make_no_newt run += make_no_slang run += make_no_gtk2 run += make_no_ui run += make_no_demangle run += make_no_libelf run += make_no_libunwind run += make_no_libdw_dwarf_unwind run += make_no_backtrace run += make_no_libnuma run += make_no_libaudit run += make_no_libbionic run += make_no_auxtrace run += make_help run += make_doc run += make_perf_o run += make_util_map_o run += make_util_pmu_bison_o run += make_install run += make_install_bin run += make_install_prefix run += make_install_prefix_slash # FIXME 'install-*' commented out till they're fixed # run += make_install_doc # run += make_install_man # run += make_install_html # run += make_install_info # run += make_install_pdf run += make_minimal run += make_static ifneq ($(call has,ctags),) run += make_tags endif ifneq ($(call has,cscope),) run += make_cscope endif # $(run_O) contains same portion of $(run) tests with '_O' attached # to distinguish O=... tests run_O := $(addsuffix _O,$(run)) # disable some tests for O=... run_O := $(filter-out make_python_perf_so_O,$(run_O)) # define test for each compile as 'test_NAME' variable # with the test itself as a value test_make_tags = test -f tags test_make_cscope = test -f cscope.out test_make_tags_O := $(test_make_tags) test_make_cscope_O := $(test_make_cscope) test_ok := true test_make_help := $(test_ok) test_make_doc := $(test_ok) test_make_help_O := $(test_ok) test_make_doc_O := $(test_ok) test_make_python_perf_so := test -f $(PERF)/python/perf.so test_make_perf_o := test -f $(PERF)/perf.o test_make_util_map_o := test -f $(PERF)/util/map.o test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o define test_dest_files for file in $(1); do \ if [ ! -x $$TMP_DEST/$$file ]; then \ echo " failed to find: $$file"; \ fi \ done endef installed_files_bin := bin/perf installed_files_bin += etc/bash_completion.d/perf installed_files_bin += libexec/perf-core/perf-archive installed_files_plugins := $(lib)/traceevent/plugins/plugin_cfg80211.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_scsi.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_xen.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_function.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_sched_switch.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_mac80211.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_kvm.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_kmem.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_hrtimer.so installed_files_plugins += $(lib)/traceevent/plugins/plugin_jbd2.so installed_files_all := $(installed_files_bin) installed_files_all += $(installed_files_plugins) test_make_install := $(call test_dest_files,$(installed_files_all)) test_make_install_O := $(call test_dest_files,$(installed_files_all)) test_make_install_bin := $(call test_dest_files,$(installed_files_bin)) test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin)) # We prefix all installed files for make_install_prefix(_slash) # with '/tmp/krava' to match installed/prefix-ed files. installed_files_all_prefix := $(addprefix /tmp/krava/,$(installed_files_all)) test_make_install_prefix := $(call test_dest_files,$(installed_files_all_prefix)) test_make_install_prefix_O := $(call test_dest_files,$(installed_files_all_prefix)) test_make_install_prefix_slash := $(test_make_install_prefix) test_make_install_prefix_slash_O := $(test_make_install_prefix_O) # FIXME nothing gets installed test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1 test_make_install_man_O := $(test_make_install_man) # FIXME nothing gets installed test_make_install_doc := $(test_ok) test_make_install_doc_O := $(test_ok) # FIXME nothing gets installed test_make_install_html := $(test_ok) test_make_install_html_O := $(test_ok) # FIXME nothing gets installed test_make_install_info := $(test_ok) test_make_install_info_O := $(test_ok) # FIXME nothing gets installed test_make_install_pdf := $(test_ok) test_make_install_pdf_O := $(test_ok) test_make_python_perf_so_O := test -f $$TMP_O/python/perf.so test_make_perf_o_O := test -f $$TMP_O/perf.o test_make_util_map_o_O := test -f $$TMP_O/util/map.o test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o test_default = test -x $(PERF)/perf test = $(if $(test_$1),$(test_$1),$(test_default)) test_default_O = test -x $$TMP_O/perf test_O = $(if $(test_$1),$(test_$1),$(test_default_O)) all: ifdef DEBUG d := $(info run $(run)) d := $(info run_O $(run_O)) endif MAKEFLAGS := --no-print-directory clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) $(run): $(call clean) @TMP_DEST=$$(mktemp -d); \ cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \ echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ $(call test,$@) && \ rm -rf $@ $$TMP_DEST || (cat $@ ; false) $(run_O): $(call clean) @TMP_O=$$(mktemp -d); \ TMP_DEST=$$(mktemp -d); \ cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \ echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1 && \ echo " test: $(call test_O,$@)" >> $@ 2>&1; \ $(call test_O,$@) && \ rm -rf $@ $$TMP_O $$TMP_DEST || (cat $@ ; false) tarpkg: @cmd="$(PERF)/tests/perf-targz-src-pkg $(PERF)"; \ echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1 make_kernelsrc: @echo "- make -C <kernelsrc> tools/perf" $(call clean); \ (make -C ../.. tools/perf) > $@ 2>&1 && \ test -x perf && rm -f $@ || (cat $@ ; false) make_kernelsrc_tools: @echo "- make -C <kernelsrc>/tools perf" $(call clean); \ (make -C ../../tools perf) > $@ 2>&1 && \ test -x perf && rm -f $@ || (cat $@ ; false) all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools @echo OK out: $(run_O) @echo OK .PHONY: all $(run) $(run_O) tarpkg clean endif # ifndef MK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
You can’t perform that action at this time.