Skip to content

Commit 38b3a5a

Browse files
committed
Merge tag 'perf-tools-2020-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tooling updates from Arnaldo Carvalho de Melo: "These are additional changes to the perf tools, on top of what Ingo already submitted. - Further Intel PT call-trace fixes - Improve SELinux docs and tool warnings - Fix race at exit in 'perf record' using eventfd. - Add missing build tests to the default set of 'make -C tools/perf build-test' - Sync msr-index.h getting new AMD MSRs to decode and filter in 'perf trace'. - Fix fallback to libaudit in 'perf trace' for arches not using per-arch *.tbl files. - Fixes for 'perf ftrace'. - Fixes and improvements for the 'perf stat' metrics. - Use dummy event to get PERF_RECORD_{FORK,MMAP,etc} while synthesizing those metadata events for pre-existing threads. - Fix leaks detected using clang tooling. - Improvements to PMU event metric testing. - Report summary for 'perf stat' interval mode at the end, summing up all the intervals. - Improve pipe mode, i.e. this now works as expected, continuously dumping samples: # perf record -g -e raw_syscalls:sys_enter | perf --no-pager script - Fixes for event grouping, detecting incompatible groups such as: # perf stat -e '{cycles,power/energy-cores/}' -v WARNING: group events cpu maps do not match, disabling group: anon group { power/energy-cores/, cycles } power/energy-cores/: 0 cycles: 0-7 - Fixes for 'perf probe': blacklist address checking, number of kretprobe instances, etc. - JIT processing improvements and fixes plus the addition of a 'perf test' entry for the java demangler. - Add support for synthesizing first/last level cache, TLB and remove access events from HW tracing in the auxtrace code, first to use is ARM SPE. - Vendor events updates and fixes, including for POWER9 and Intel. - Allow using ~/.perfconfig for removing the ',' separators in 'perf stat' output. - Opt-in support for libpfm4" * tag 'perf-tools-2020-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (120 commits) perf tools: Remove some duplicated includes perf symbols: Fix kernel maps for kcore and eBPF tools arch x86: Sync the msr-index.h copy with the kernel sources perf stat: Ensure group is defined on top of the same cpu mask perf libdw: Fix off-by 1 relative directory includes perf arm-spe: Support synthetic events perf auxtrace: Add four itrace options perf tools: Move arm-spe-pkt-decoder.h/c to the new dir perf test: Initialize memory in dwarf-unwind perf tests: Don't tail call optimize in unwind test tools compiler.h: Add attribute to disable tail calls perf build: Add a LIBPFM4=1 build test entry perf tools: Add optional support for libpfm4 perf tools: Correct license on jsmn JSON parser perf jit: Fix inaccurate DWARF line table perf jvmti: Remove redundant jitdump line table entries perf build: Add NO_SDT=1 to the default set of build tests perf build: Add NO_LIBCRYPTO=1 to the default set of build tests perf build: Add NO_SYSCALL_TABLE=1 to the build tests perf build: Remove libaudit from the default feature checks ...
2 parents 6929f71 + 3e9b26d commit 38b3a5a

File tree

145 files changed

+4311
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+4311
-982
lines changed

tools/arch/x86/include/asm/msr-index.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@
301301
#define MSR_PP1_ENERGY_STATUS 0x00000641
302302
#define MSR_PP1_POLICY 0x00000642
303303

304+
#define MSR_AMD_PKG_ENERGY_STATUS 0xc001029b
305+
#define MSR_AMD_RAPL_POWER_UNIT 0xc0010299
306+
304307
/* Config TDP MSRs */
305308
#define MSR_CONFIG_TDP_NOMINAL 0x00000648
306309
#define MSR_CONFIG_TDP_LEVEL_1 0x00000649

tools/build/Makefile.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ FEATURE_TESTS_BASIC := \
4040
glibc \
4141
gtk2 \
4242
gtk2-infobar \
43-
libaudit \
4443
libbfd \
4544
libcap \
4645
libelf \
@@ -112,7 +111,6 @@ FEATURE_DISPLAY ?= \
112111
dwarf_getlocations \
113112
glibc \
114113
gtk2 \
115-
libaudit \
116114
libbfd \
117115
libcap \
118116
libelf \

tools/build/feature/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(
9191
###############################
9292

9393
$(OUTPUT)test-all.bin:
94-
$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
94+
$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
9595

9696
$(OUTPUT)test-hello.bin:
9797
$(BUILD)

tools/build/feature/test-all.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
# include "test-libunwind.c"
7575
#undef main
7676

77-
#define main main_test_libaudit
78-
# include "test-libaudit.c"
79-
#undef main
80-
8177
#define main main_test_libslang
8278
# include "test-libslang.c"
8379
#undef main
@@ -208,7 +204,6 @@ int main(int argc, char *argv[])
208204
main_test_libelf_gelf_getnote();
209205
main_test_libelf_getshdrstrndx();
210206
main_test_libunwind();
211-
main_test_libaudit();
212207
main_test_libslang();
213208
main_test_gtk2(argc, argv);
214209
main_test_gtk2_infobar(argc, argv);

tools/include/linux/compiler-gcc.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
#define __pure __attribute__((pure))
2828
#endif
2929
#define noinline __attribute__((noinline))
30+
#ifdef __has_attribute
31+
#if __has_attribute(disable_tail_calls)
32+
#define __no_tail_call __attribute__((disable_tail_calls))
33+
#endif
34+
#endif
35+
#ifndef __no_tail_call
36+
#if GCC_VERSION > 40201
37+
#define __no_tail_call __attribute__((optimize("no-optimize-sibling-calls")))
38+
#else
39+
#define __no_tail_call
40+
#endif
41+
#endif
3042
#ifndef __packed
3143
#define __packed __attribute__((packed))
3244
#endif

tools/include/linux/compiler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
#ifndef noinline
4848
#define noinline
4949
#endif
50+
#ifndef __no_tail_call
51+
#define __no_tail_call
52+
#endif
5053

5154
/* Are two types/vars the same type (ignoring qualifiers)? */
5255
#ifndef __same_type

tools/perf/Documentation/itrace.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
i synthesize instructions events
2-
b synthesize branches events
2+
b synthesize branches events (branch misses for Arm SPE)
33
c synthesize branches events (calls only)
44
r synthesize branches events (returns only)
55
x synthesize transactions events
@@ -9,6 +9,10 @@
99
of aux-output (refer to perf record)
1010
e synthesize error events
1111
d create a debug log
12+
f synthesize first level cache events
13+
m synthesize last level cache events
14+
t synthesize TLB events
15+
a synthesize remote access events
1216
g synthesize a call chain (use with i or x)
1317
G synthesize a call chain on existing event records
1418
l synthesize last branch entries (use with i or x)

tools/perf/Documentation/perf-c2c.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RECORD OPTIONS
4040
--------------
4141
-e::
4242
--event=::
43-
Select the PMU event. Use 'perf mem record -e list'
43+
Select the PMU event. Use 'perf c2c record -e list'
4444
to list available events.
4545

4646
-v::

tools/perf/Documentation/perf-config.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,11 @@ convert.*::
667667
Limit the size of ordered_events queue, so we could control
668668
allocation size of perf data files without proper finished
669669
round events.
670+
stat.*::
671+
672+
stat.big-num::
673+
(boolean) Change the default for "--big-num". To make
674+
"--no-big-num" the default, set "stat.big-num=false".
670675

671676
intel-pt.*::
672677

tools/perf/Documentation/perf-intel-pt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ The v4.2 kernel introduced support for a context switch metadata event,
687687
PERF_RECORD_SWITCH, which allows unprivileged users to see when their processes
688688
are scheduled out and in, just not by whom, which is left for the
689689
PERF_RECORD_SWITCH_CPU_WIDE, that is only accessible in system wide context,
690-
which in turn requires CAP_SYS_ADMIN.
690+
which in turn requires CAP_PERFMON or CAP_SYS_ADMIN.
691691

692692
Please see the 45ac1403f564 ("perf: Add PERF_RECORD_SWITCH to indicate context
693693
switches") commit, that introduces these metadata events for further info.

0 commit comments

Comments
 (0)