* [GIT PULL 00/19] perf/urgent fixes for 4.18
@ 2018-06-25 17:40 Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 01/19] perf record: Support s390 random socket_id assignment Arnaldo Carvalho de Melo
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
Alexei Starovoitov, Andi Kleen, Ankit Nautiyal, Boqun Feng,
Christoph Hellwig, Daniel Borkmann, David Ahern,
David S . Miller, Eric Leblond, Hangbin Liu, Heiko Carstens,
Hendrik Brueckner, Jin Yao, Jiri Olsa
Hi Ingo,
Please consider pulling,
- Arnaldo
Test results at the end of this message, as usual.
The following changes since commit 57d6a7938a8fc6cee8420b40ca244220b41721f5:
perf/core: Move the inline keyword at the beginning of the function declaration (2018-06-22 11:07:47 +0200)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.18-20180625
for you to fetch changes up to 92ead7ee30c80f8852d28735cbcb9d79bc85f715:
perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] (2018-06-25 11:59:37 -0300)
----------------------------------------------------------------
perf/urgent fixes:
perf bench: (Jiri Olsa):
. Fix NUMA report output code handling of less than 1s runtimes.
perf script: (Ravi Bangoria)
. Add missing output fields in a 'perf script -h' hint.
. Fix crash because of missing evsel->priv.
. Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE], which
is just a end of features header marker.
perf stat: (Thomas Richter)
. Remove duplicate event counting
perf test:
. Wire parsing error handling in 'parse events' test (Jiri Olsa)
. Fix 'session topology' test on s/390 (Thomas Richter)
eBPF: (Yonghong Song)
. Fix a clang 7.0 compilation error when building perf linking
with libclang
intel-pt: (Adrian Hunter)
. Fix packet decoding of CYC packets.
Copies of kernel files: (Arnaldo Carvalho de Melo)
. Synchronize drm/drm.h UAPI
. Update x86's syscall_64.tbl, adding support for 'io_pgetevents' and 'rseq'
in 'perf trace'.
. Update powerpc uapi/asm/unistd.h, adding support for the 'rseq' syscall.
. Update if_link.h and bpf.h, no effect on tool features.
PowerPC: (Sandipan Das)
. Fix crash if callchain is empty.
s/390: (Thomas Richter)
. Support random socked_id assignment in the perf header.
. Support s390 random socket_id assignment in perf.data file.
. Make PMU alias definitions taken from sysfs and JSON files comparable
by normalizing them wrt spaces and newlines.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Adrian Hunter (1):
perf intel-pt: Fix packet decoding of CYC packets
Arnaldo Carvalho de Melo (5):
tools headers uapi: Synchronize drm/drm.h
perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq'
tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall
tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT}
tools include uapi: Synchronize bpf.h with the kernel
Jiri Olsa (3):
perf tests: Add event parsing error handling to parse events test
perf tests: Add valid callback for parse-events test
perf bench: Fix numa report output code
Ravi Bangoria (3):
perf script: Add missing output fields in a hint
perf script: Fix crash because of missing evsel->priv
perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]
Sandipan Das (1):
perf report powerpc: Fix crash if callchain is empty
Thomas Richter (5):
perf record: Support s390 random socket_id assignment
perf test session topology: Fix test on s390
perf alias: Remove trailing newline when reading sysfs files
perf alias: Rebuild alias expression string to make it comparable
perf stat: Remove duplicate event counting
Yonghong Song (1):
perf tools: Fix a clang 7.0 compilation error
tools/arch/powerpc/include/uapi/asm/unistd.h | 1 +
tools/include/uapi/drm/drm.h | 7 ++
tools/include/uapi/linux/bpf.h | 2 +-
tools/include/uapi/linux/if_link.h | 2 +
tools/perf/arch/powerpc/util/skip-callchain-idx.c | 2 +-
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 +
tools/perf/bench/numa.c | 5 +-
tools/perf/builtin-annotate.c | 11 ++-
tools/perf/builtin-report.c | 3 +-
tools/perf/builtin-script.c | 30 ++++++-
tools/perf/tests/parse-events.c | 25 ++++--
tools/perf/tests/topology.c | 1 +
tools/perf/util/c++/clang.cpp | 11 ++-
tools/perf/util/header.c | 12 ++-
.../util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +-
tools/perf/util/pmu.c | 99 +++++++++++++++++++++-
16 files changed, 194 insertions(+), 21 deletions(-)
Test results:
The first ones are container (docker) based builds of tools/perf with
and without libelf support. Where clang is available, it is also used
to build perf with/without libelf, and building with LIBCLANGLLVM=1
(built-in clang) with gcc and clang when clang and its devel libraries
are installed.
The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.
Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.
The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.
Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.
# dm
1 alpine:3.4 : Ok gcc (Alpine 5.3.0) 5.3.0
2 alpine:3.5 : Ok gcc (Alpine 6.2.1) 6.2.1 20160822
3 alpine:3.6 : Ok gcc (Alpine 6.3.0) 6.3.0
4 alpine:3.7 : Ok gcc (Alpine 6.4.0) 6.4.0
5 alpine:edge : Ok gcc (Alpine 6.4.0) 6.4.0
6 amazonlinux:1 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
7 amazonlinux:2 : Ok gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
8 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
9 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
10 centos:5 : Ok gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
11 centos:6 : Ok gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
12 centos:7 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
13 debian:7 : Ok gcc (Debian 4.7.2-5) 4.7.2
14 debian:8 : Ok gcc (Debian 4.9.2-10+deb8u1) 4.9.2
15 debian:9 : Ok gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
16 debian:experimental : Ok gcc (Debian 7.3.0-19) 7.3.0
17 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
18 debian:experimental-x-mips : Ok mips-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
19 debian:experimental-x-mips64 : Ok mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
20 debian:experimental-x-mipsel : Ok mipsel-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
21 fedora:20 : Ok gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
22 fedora:21 : Ok gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
23 fedora:22 : Ok gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
24 fedora:23 : Ok gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
<stopped due to a power outage>
# git log --oneline -1
92ead7ee30c8 (HEAD -> perf/urgent) perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]
# perf version
perf version 4.17.g92ead7
# uname -a
Linux jouet 4.17.0-rc5 #21 SMP Mon May 14 15:35:35 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
# perf test
1: vmlinux symtab matches kallsyms : Ok
2: Detect openat syscall event : Ok
3: Detect openat syscall event on all cpus : Ok
4: Read samples using the mmap interface : Ok
5: Test data source output : Ok
6: Parse event definition strings : Ok
7: Simple expression parser : Ok
8: PERF_RECORD_* events & perf_sample fields : Ok
9: Parse perf pmu format : Ok
10: DSO data read : Ok
11: DSO data cache : Ok
12: DSO data reopen : Ok
13: Roundtrip evsel->name : Ok
14: Parse sched tracepoints fields : Ok
15: syscalls:sys_enter_openat event fields : Ok
16: Setup struct perf_event_attr : Ok
17: Match and link multiple hists : Ok
18: 'import perf' in python : Ok
19: Breakpoint overflow signal handler : Ok
20: Breakpoint overflow sampling : Ok
21: Breakpoint accounting : Ok
22: Number of exit events of a simple workload : Ok
23: Software clock events period values : Ok
24: Object code reading : Ok
25: Sample parsing : Ok
26: Use a dummy software event to keep tracking : Ok
27: Parse with no sample_id_all bit set : Ok
28: Filter hist entries : Ok
29: Lookup mmap thread : Ok
30: Share thread mg : Ok
31: Sort output of hist entries : Ok
32: Cumulate child hist entries : Ok
33: Track with sched_switch : Ok
34: Filter fds with revents mask in a fdarray : Ok
35: Add fd to a fdarray, making it autogrow : Ok
36: kmod_path__parse : Ok
37: Thread map : Ok
38: LLVM search and compile :
38.1: Basic BPF llvm compile : Ok
38.2: kbuild searching : Ok
38.3: Compile source for BPF prologue generation : Ok
38.4: Compile source for BPF relocation : Ok
39: Session topology : Ok
40: BPF filter :
40.1: Basic BPF filtering : Ok
40.2: BPF pinning : Ok
40.3: BPF prologue generation : Ok
40.4: BPF relocation checker : Ok
41: Synthesize thread map : Ok
42: Remove thread map : Ok
43: Synthesize cpu map : Ok
44: Synthesize stat config : Ok
45: Synthesize stat : Ok
46: Synthesize stat round : Ok
47: Synthesize attr update : Ok
48: Event times : Ok
49: Read backward ring buffer : Ok
50: Print cpu map : Ok
51: Probe SDT events : Ok
52: is_printable_array : Ok
53: Print bitmap : Ok
54: perf hooks : Ok
55: builtin clang support : Skip (not compiled in)
56: unit_number__scnprintf : Ok
57: mem2node : Ok
58: x86 rdpmc : Ok
59: Convert perf time to TSC : Ok
60: DWARF unwind : Ok
61: x86 instruction decoder - new instructions : Ok
62: Use vfs_getname probe to get syscall args filenames : Ok
63: Check open filename arg using perf trace + vfs_getname: Ok
64: probe libc's inet_pton & backtrace it with ping : Ok
65: Add vfs_getname probe to get syscall args filenames : Ok
#
$ make -C tools/perf build-test
make: Entering directory '/home/acme/git/perf/tools/perf'
- tarpkg: ./tests/perf-targz-src-pkg .
make_install_prefix_O: make install prefix=/tmp/krava
make_install_O: make install
make_clean_all_O: make clean all
make_no_libnuma_O: make NO_LIBNUMA=1
make_perf_o_O: make perf.o
make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
make_no_libelf_O: make NO_LIBELF=1
make_no_demangle_O: make NO_DEMANGLE=1
make_no_libbionic_O: make NO_LIBBIONIC=1
make_with_babeltrace_O: make LIBBABELTRACE=1
make_pure_O: make
make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
make_util_map_o_O: make util/map.o
make_util_pmu_bison_o_O: make util/pmu-bison.o
make_install_bin_O: make install-bin
make_install_prefix_slash_O: make install prefix=/tmp/krava/
make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
make_doc_O: make doc
make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
make_tags_O: make tags
make_static_O: make LDFLAGS=-static
make_no_slang_O: make NO_SLANG=1
make_no_libbpf_O: make NO_LIBBPF=1
make_no_libperl_O: make NO_LIBPERL=1
make_debug_O: make DEBUG=1
make_no_libunwind_O: make NO_LIBUNWIND=1
make_no_libaudit_O: make NO_LIBAUDIT=1
make_no_newt_O: make NO_NEWT=1
make_no_libpython_O: make NO_LIBPYTHON=1
make_no_backtrace_O: make NO_BACKTRACE=1
make_help_O: make help
make_with_clangllvm_O: make LIBCLANGLLVM=1
make_no_gtk2_O: make NO_GTK2=1
make_no_auxtrace_O: make NO_AUXTRACE=1
OK
make: Leaving directory '/home/acme/git/perf/tools/perf'
$
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 01/19] perf record: Support s390 random socket_id assignment
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 02/19] perf test session topology: Fix test on s390 Arnaldo Carvalho de Melo
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Thomas Richter,
Heiko Carstens, Martin Schwidefsky, Arnaldo Carvalho de Melo
From: Thomas Richter <tmricht@linux.ibm.com>
On s390 the socket identifier assigned to a CPU identifier is random and
(depending on the configuration of the LPAR) may be higher than the CPU
identifier. This is currently not supported.
Fix this by allowing arbitrary socket identifiers being assigned to
CPU id.
Output before:
[root@p23lp27 perf]# ./perf report --header -I -v
...
socket_id number is too big.You may need to upgrade the perf tool.
Error:
The perf.data file has no samples!
# ========
# captured on : Tue May 29 09:29:57 2018
# header version : 1
...
# Core ID and Socket ID information is not available
...
[root@p23lp27 perf]#
Output after:
[root@p23lp27 perf]# ./perf report --header -I -v
...
Error:
The perf.data file has no samples!
# ========
# captured on : Tue May 29 09:29:57 2018
# header version : 1
...
# CPU 0: Core ID 0, Socket ID 6
# CPU 1: Core ID 1, Socket ID 3
# CPU 2: Core ID -1, Socket ID -1
...
[root@p23lp27 perf]#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180611073153.15592-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
| 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 540cd2dcd3e7..59fcc790c865 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2129,6 +2129,7 @@ static int process_cpu_topology(struct feat_fd *ff, void *data __maybe_unused)
int cpu_nr = ff->ph->env.nr_cpus_avail;
u64 size = 0;
struct perf_header *ph = ff->ph;
+ bool do_core_id_test = true;
ph->env.cpu = calloc(cpu_nr, sizeof(*ph->env.cpu));
if (!ph->env.cpu)
@@ -2183,6 +2184,13 @@ static int process_cpu_topology(struct feat_fd *ff, void *data __maybe_unused)
return 0;
}
+ /* On s390 the socket_id number is not related to the numbers of cpus.
+ * The socket_id number might be higher than the numbers of cpus.
+ * This depends on the configuration.
+ */
+ if (ph->env.arch && !strncmp(ph->env.arch, "s390", 4))
+ do_core_id_test = false;
+
for (i = 0; i < (u32)cpu_nr; i++) {
if (do_read_u32(ff, &nr))
goto free_cpu;
@@ -2192,7 +2200,7 @@ static int process_cpu_topology(struct feat_fd *ff, void *data __maybe_unused)
if (do_read_u32(ff, &nr))
goto free_cpu;
- if (nr != (u32)-1 && nr > (u32)cpu_nr) {
+ if (do_core_id_test && nr != (u32)-1 && nr > (u32)cpu_nr) {
pr_debug("socket_id number is too big."
"You may need to upgrade the perf tool.\n");
goto free_cpu;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 02/19] perf test session topology: Fix test on s390
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 01/19] perf record: Support s390 random socket_id assignment Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 03/19] perf report powerpc: Fix crash if callchain is empty Arnaldo Carvalho de Melo
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Thomas Richter,
Heiko Carstens, Martin Schwidefsky, Arnaldo Carvalho de Melo
From: Thomas Richter <tmricht@linux.ibm.com>
On s390 this test case fails because the socket identifiction numbers
assigned to the CPU are higher than the CPU identification numbers.
F/ix this by adding the platform architecture into the perf data header
flag information. This helps identifiing the test platform and handles
s390 specifics in process_cpu_topology().
Before:
[root@p23lp27 perf]# perf test -vvvvv -F 39
39: Session topology :
--- start ---
templ file: /tmp/perf-test-iUv755
socket_id number is too big.You may need to upgrade the perf tool.
---- end ----
Session topology: Skip
[root@p23lp27 perf]#
After:
[root@p23lp27 perf]# perf test -vvvvv -F 39
39: Session topology :
--- start ---
templ file: /tmp/perf-test-8X8VTs
CPU 0, core 0, socket 6
CPU 1, core 1, socket 3
---- end ----
Session topology: Ok
[root@p23lp27 perf]#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Fixes: c84974ed9fb6 ("perf test: Add entry to test cpu topology")
Link: http://lkml.kernel.org/r/20180611073153.15592-2-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/topology.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index 40e30a26b23c..9497d02f69e6 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -45,6 +45,7 @@ static int session_write_header(char *path)
perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY);
perf_header__set_feat(&session->header, HEADER_NRCPUS);
+ perf_header__set_feat(&session->header, HEADER_ARCH);
session->header.data_size += DATA_SIZE;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 03/19] perf report powerpc: Fix crash if callchain is empty
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 01/19] perf record: Support s390 random socket_id assignment Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 02/19] perf test session topology: Fix test on s390 Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 04/19] perf tests: Add event parsing error handling to parse events test Arnaldo Carvalho de Melo
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Sandipan Das,
Jiri Olsa, Naveen N . Rao, Sukadev Bhattiprolu,
Arnaldo Carvalho de Melo
From: Sandipan Das <sandipan@linux.ibm.com>
For some cases, the callchain provided by the kernel may be empty. So,
the callchain ip filtering code will cause a crash if we do not check
whether the struct ip_callchain pointer is NULL before accessing any
members.
This can be observed on a powerpc64le system running Fedora 27 as shown
below.
# perf record -b -e cycles:u ls
Before:
# perf report --branch-history
perf: Segmentation fault
-------- backtrace --------
perf[0x1027615c]
linux-vdso64.so.1(__kernel_sigtramp_rt64+0x0)[0x7fff856304d8]
perf(arch_skip_callchain_idx+0x44)[0x10257c58]
perf[0x1017f2e4]
perf(thread__resolve_callchain+0x124)[0x1017ff5c]
perf(sample__resolve_callchain+0xf0)[0x10172788]
...
After:
# perf report --branch-history
Samples: 25 of event 'cycles:u', Event count (approx.): 2306870
Overhead Source:Line Symbol Shared Object
+ 11.60% _init+35736 [.] _init ls
+ 9.84% strcoll_l.c:137 [.] __strcoll_l libc-2.26.so
+ 9.16% memcpy.S:175 [.] __memcpy_power7 libc-2.26.so
+ 9.01% gconv_charset.h:54 [.] _nl_find_locale libc-2.26.so
+ 8.87% dl-addr.c:52 [.] _dl_addr libc-2.26.so
+ 8.83% _init+236 [.] _init ls
...
Reported-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Acked-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20180611104049.11048-1-sandipan@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/powerpc/util/skip-callchain-idx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/perf/arch/powerpc/util/skip-callchain-idx.c
index 3598b8b75d27..ef5d59a5742e 100644
--- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c
+++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c
@@ -243,7 +243,7 @@ int arch_skip_callchain_idx(struct thread *thread, struct ip_callchain *chain)
u64 ip;
u64 skip_slot = -1;
- if (chain->nr < 3)
+ if (!chain || chain->nr < 3)
return skip_slot;
ip = chain->ips[2];
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 04/19] perf tests: Add event parsing error handling to parse events test
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 03/19] perf report powerpc: Fix crash if callchain is empty Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 05/19] perf tests: Add valid callback for parse-events test Arnaldo Carvalho de Melo
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, David Ahern, Heiko Carstens,
Hendrik Brueckner, Martin Schwidefsky, Namhyung Kim,
Peter Zijlstra, Thomas Richter, Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Add missing error handling for parse_events calls in test_event function
that led to following segfault on s390:
running test 52 'intel_pt//u'
perf: Segmentation fault
...
/lib64/libc.so.6(vasprintf+0xe6) [0x3fffca3f106]
/lib64/libc.so.6(asprintf+0x46) [0x3fffca1aa96]
./perf(parse_events_add_pmu+0xb8) [0x80132088]
./perf(parse_events_parse+0xc62) [0x8019529a]
./perf(parse_events+0x98) [0x801341c0]
./perf(test__parse_events+0x48) [0x800cd140]
./perf(cmd_test+0x26a) [0x800bd44a]
test child interrupted
Adding the struct parse_events_error argument to parse_events call. Also
adding parse_events_print_error to get more details on the parsing
failures, like:
# perf test 6 -v
running test 52 'intel_pt//u'failed to parse event 'intel_pt//u', err 1, str 'Cannot find PMU `intel_pt'. Missing kernel support?'
event syntax error: 'intel_pt//u'
\___ Cannot find PMU `intel_pt'. Missing kernel support?
Committer note:
Use named initializers in the struct parse_events_error variable to
avoid breaking the build on centos5, 6 and others with a similar gcc:
cc1: warnings being treated as errors
tests/parse-events.c: In function 'test_event':
tests/parse-events.c:1696: error: missing initializer
tests/parse-events.c:1696: error: (near initialization for 'err.str')
Reported-by: Kim Phillips <kim.phillips@arm.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Kim Phillips <kim.phillips@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Link: http://lkml.kernel.org/r/20180611093422.1005-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/parse-events.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 7d4077068454..9751e7563a45 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1686,6 +1686,7 @@ static struct terms_test test__terms[] = {
static int test_event(struct evlist_test *e)
{
+ struct parse_events_error err = { .idx = 0, };
struct perf_evlist *evlist;
int ret;
@@ -1693,10 +1694,11 @@ static int test_event(struct evlist_test *e)
if (evlist == NULL)
return -ENOMEM;
- ret = parse_events(evlist, e->name, NULL);
+ ret = parse_events(evlist, e->name, &err);
if (ret) {
- pr_debug("failed to parse event '%s', err %d\n",
- e->name, ret);
+ pr_debug("failed to parse event '%s', err %d, str '%s'\n",
+ e->name, ret, err.str);
+ parse_events_print_error(&err, e->name);
} else {
ret = e->check(evlist);
}
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 05/19] perf tests: Add valid callback for parse-events test
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 04/19] perf tests: Add event parsing error handling to parse events test Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 06/19] perf intel-pt: Fix packet decoding of CYC packets Arnaldo Carvalho de Melo
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, David Ahern, Heiko Carstens,
Hendrik Brueckner, Kim Phillips, Martin Schwidefsky,
Namhyung Kim, Peter Zijlstra, Thomas Richter,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Adding optional 'valid' callback for events tests in parse-events
object, so we don't try to parse PMUs, which are not supported.
Following line is displayed for skipped test:
running test 52 'intel_pt//u'... SKIP
Committer note:
Use named initializers in the struct evlist_test variable to avoid
breaking the build on centos:5, 6 and others with a similar gcc:
cc1: warnings being treated as errors
tests/parse-events.c: In function 'test_pmu_events':
tests/parse-events.c:1817: error: missing initializer
tests/parse-events.c:1817: error: (near initialization for 'e.type')
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Link: http://lkml.kernel.org/r/20180611093422.1005-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/parse-events.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 9751e7563a45..61211918bfba 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -1309,6 +1309,11 @@ static int test__checkevent_config_cache(struct perf_evlist *evlist)
return 0;
}
+static bool test__intel_pt_valid(void)
+{
+ return !!perf_pmu__find("intel_pt");
+}
+
static int test__intel_pt(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = perf_evlist__first(evlist);
@@ -1375,6 +1380,7 @@ struct evlist_test {
const char *name;
__u32 type;
const int id;
+ bool (*valid)(void);
int (*check)(struct perf_evlist *evlist);
};
@@ -1648,6 +1654,7 @@ static struct evlist_test test__events[] = {
},
{
.name = "intel_pt//u",
+ .valid = test__intel_pt_valid,
.check = test__intel_pt,
.id = 52,
},
@@ -1690,6 +1697,11 @@ static int test_event(struct evlist_test *e)
struct perf_evlist *evlist;
int ret;
+ if (e->valid && !e->valid()) {
+ pr_debug("... SKIP");
+ return 0;
+ }
+
evlist = perf_evlist__new();
if (evlist == NULL)
return -ENOMEM;
@@ -1716,10 +1728,11 @@ static int test_events(struct evlist_test *events, unsigned cnt)
for (i = 0; i < cnt; i++) {
struct evlist_test *e = &events[i];
- pr_debug("running test %d '%s'\n", e->id, e->name);
+ pr_debug("running test %d '%s'", e->id, e->name);
ret1 = test_event(e);
if (ret1)
ret2 = ret1;
+ pr_debug("\n");
}
return ret2;
@@ -1801,7 +1814,7 @@ static int test_pmu_events(void)
}
while (!ret && (ent = readdir(dir))) {
- struct evlist_test e;
+ struct evlist_test e = { .id = 0, };
char name[2 * NAME_MAX + 1 + 12 + 3];
/* Names containing . are special and cannot be used directly */
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 06/19] perf intel-pt: Fix packet decoding of CYC packets
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 05/19] perf tests: Add valid callback for parse-events test Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 07/19] tools headers uapi: Synchronize drm/drm.h Arnaldo Carvalho de Melo
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Jiri Olsa, stable, Arnaldo Carvalho de Melo
From: Adrian Hunter <adrian.hunter@intel.com>
Use a 64-bit type so that the cycle count is not limited to 32-bits.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1528371002-8862-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
index ba4c9dd18643..d426761a549d 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
@@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
if (len < offs)
return INTEL_PT_NEED_MORE_BYTES;
byte = buf[offs++];
- payload |= (byte >> 1) << shift;
+ payload |= ((uint64_t)byte >> 1) << shift;
}
packet->type = INTEL_PT_CYC;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 07/19] tools headers uapi: Synchronize drm/drm.h
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (5 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 06/19] perf intel-pt: Fix packet decoding of CYC packets Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 08/19] perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq' Arnaldo Carvalho de Melo
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, Ankit Nautiyal,
David Ahern, Jiri Olsa, Maarten Lankhorst, Namhyung Kim,
Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To pick up the new ioctls added in these csets:
7595bda2fb43 ("drm: Add DRM client cap for aspect-ratio")
The DRM caps are not yet being decoded in 'perf trace', so this sync
doesn't incur in any change in behaviour in any tools, just silencing
this tools/perf/ build warning:
Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h'
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-atwz0arwanq1npu8pptwkoxt@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/uapi/drm/drm.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h
index 6fdff5945c8a..9c660e1688ab 100644
--- a/tools/include/uapi/drm/drm.h
+++ b/tools/include/uapi/drm/drm.h
@@ -680,6 +680,13 @@ struct drm_get_cap {
*/
#define DRM_CLIENT_CAP_ATOMIC 3
+/**
+ * DRM_CLIENT_CAP_ASPECT_RATIO
+ *
+ * If set to 1, the DRM core will provide aspect ratio information in modes.
+ */
+#define DRM_CLIENT_CAP_ASPECT_RATIO 4
+
/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap {
__u64 capability;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 08/19] perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq'
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (6 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 07/19] tools headers uapi: Synchronize drm/drm.h Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 09/19] tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall Arnaldo Carvalho de Melo
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, Christoph Hellwig,
David Ahern, Jiri Olsa, Mathieu Desnoyers, Namhyung Kim,
Thomas Gleixner, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
This updates the tools/perf/ copy of the system call table for x86 which makes
'perf trace' become aware of the new 'io_pgetevents' and 'rseq' syscalls, no
matter in which system it gets built, i.e. older systems where the syscalls are
not available in the running kernel (via tracefs) or in the system headers will
still be aware of these syscalls/.
These are the csets introducing the source drift:
05c17cedf85b ("x86: Wire up restartable sequence system call")
7a074e96dee6 ("aio: implement io_pgetevents")
This results in this build time change:
$ diff -u /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.old /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c
--- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.old 2018-06-15 11:48:17.648948094 -0300
+++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c 2018-06-15 11:48:22.133942480 -0300
@@ -332,5 +332,7 @@
[330] = "pkey_alloc",
[331] = "pkey_free",
[332] = "statx",
+ [333] = "io_pgetevents",
+ [334] = "rseq",
};
-#define SYSCALLTBL_x86_64_MAX_ID 332
+#define SYSCALLTBL_x86_64_MAX_ID 334
$
This silences the following tools/perf/ build warning:
Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-tfvyz51sabuzemrszbrhzxni@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
index 4dfe42666d0c..f0b1709a5ffb 100644
--- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
+++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
@@ -341,6 +341,8 @@
330 common pkey_alloc __x64_sys_pkey_alloc
331 common pkey_free __x64_sys_pkey_free
332 common statx __x64_sys_statx
+333 common io_pgetevents __x64_sys_io_pgetevents
+334 common rseq __x64_sys_rseq
#
# x32-specific system call numbers start at 512 to avoid cache impact
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 09/19] tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (7 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 08/19] perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq' Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 10/19] tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT} Arnaldo Carvalho de Melo
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
Boqun Feng, David Ahern, Hendrik Brueckner, Jiri Olsa,
Mathieu Desnoyers, Michael Ellerman, Namhyung Kim, Ravi Bangoria,
Thomas Gleixner, Thomas Richter, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
This updates the tools/perf/ copy of the powerpc file used to generate
the syscall table file used to make 'perf trace' become aware of the new
'rseq' syscall, no matter in which system it gets built, i.e. older
systems where the syscalls are not available in the running kernel (via
tracefs) or in the system headers will still be aware of these
syscalls/.
From this commit:
bb862b021d75 ("powerpc: Wire up restartable sequences system call")
Silencing this tools/perf build warning:
Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/unistd.h' differs from latest version at 'arch/powerpc/include/uapi/asm/unistd.h'
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-adtgz6u3apd76tghiu9w0k19@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/arch/powerpc/include/uapi/asm/unistd.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/arch/powerpc/include/uapi/asm/unistd.h b/tools/arch/powerpc/include/uapi/asm/unistd.h
index 389c36fd8299..ac5ba55066dd 100644
--- a/tools/arch/powerpc/include/uapi/asm/unistd.h
+++ b/tools/arch/powerpc/include/uapi/asm/unistd.h
@@ -398,5 +398,6 @@
#define __NR_pkey_alloc 384
#define __NR_pkey_free 385
#define __NR_pkey_mprotect 386
+#define __NR_rseq 387
#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 10/19] tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT}
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (8 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 09/19] tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 11/19] tools include uapi: Synchronize bpf.h with the kernel Arnaldo Carvalho de Melo
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Alexei Starovoitov, David S . Miller,
Eric Leblond, Hangbin Liu, Nikolay Aleksandrov
From: Arnaldo Carvalho de Melo <acme@redhat.com>
The IFLA_BRPORT_ISOLATED and IFLA_VXLAN_TTL_INHERIT defines were added in:
7d850abd5f4e ("net: bridge: add support for port isolation")
72f6d71e491e ("vxlan: add ttl inherit support")
Pick them, silencing this build warning:
Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Leblond <eric@regit.org>
Cc: Hangbin Liu <liuhangbin@gmail.com>
Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Link: https://lkml.kernel.org/n/tip-ezi5u0mmdqm0wfm0y2y8176r@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/uapi/linux/if_link.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/include/uapi/linux/if_link.h b/tools/include/uapi/linux/if_link.h
index 68699f654118..cf01b6824244 100644
--- a/tools/include/uapi/linux/if_link.h
+++ b/tools/include/uapi/linux/if_link.h
@@ -333,6 +333,7 @@ enum {
IFLA_BRPORT_BCAST_FLOOD,
IFLA_BRPORT_GROUP_FWD_MASK,
IFLA_BRPORT_NEIGH_SUPPRESS,
+ IFLA_BRPORT_ISOLATED,
__IFLA_BRPORT_MAX
};
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -516,6 +517,7 @@ enum {
IFLA_VXLAN_COLLECT_METADATA,
IFLA_VXLAN_LABEL,
IFLA_VXLAN_GPE,
+ IFLA_VXLAN_TTL_INHERIT,
__IFLA_VXLAN_MAX
};
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 11/19] tools include uapi: Synchronize bpf.h with the kernel
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (9 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 10/19] tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT} Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 12/19] perf tools: Fix a clang 7.0 compilation error Arnaldo Carvalho de Melo
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, Alexei Starovoitov,
David Ahern, Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To pick the rename in:
bd3a08aaa9a3 ("bpf: flowlabel in bpf_fib_lookup should be flowinfo")
Silencing this build warning:
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-zd1sgtbybtjrrt7bqdybu0s0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/uapi/linux/bpf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index e0b06784f227..59b19b6a40d7 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -2630,7 +2630,7 @@ struct bpf_fib_lookup {
union {
/* inputs to lookup */
__u8 tos; /* AF_INET */
- __be32 flowlabel; /* AF_INET6 */
+ __be32 flowinfo; /* AF_INET6, flow_label + priority */
/* output: metric of fib result (IPv4/IPv6 only) */
__u32 rt_metric;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 12/19] perf tools: Fix a clang 7.0 compilation error
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (10 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 11/19] tools include uapi: Synchronize bpf.h with the kernel Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 13/19] perf alias: Remove trailing newline when reading sysfs files Arnaldo Carvalho de Melo
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Yonghong Song,
Alexei Starovoitov, Daniel Borkmann, Jiri Olsa, Martin KaFai Lau,
Wang Nan, Arnaldo Carvalho de Melo
From: Yonghong Song <yhs@fb.com>
Arnaldo reported the perf build failure with latest llvm/clang compiler
(7.0).
$ make LIBCLANGLLVM=1 -C tools/perf/
<SNIP>
CC /tmp/tmp.t53Qo38zci/tests/kmod-path.o
util/c++/clang.cpp: In function ‘std::unique_ptr<llvm::SmallVectorImpl<char> >
perf::getBPFObjectFromModule(llvm::Module*)’:
util/c++/clang.cpp:150:43: error: no matching function for call to
‘llvm::TargetMachine::addPassesToEmitFile(llvm::legacy::PassManager&,
llvm::raw_svector_ostream&, llvm::TargetMachine::CodeGenFileType)’
TargetMachine::CGFT_ObjectFile)) {
^
In file included from util/c++/clang.cpp:25:0:
/usr/local/include/llvm/Target/TargetMachine.h:254:16: note: candidate:
virtual bool llvm::TargetMachine::addPassesToEmitFile(
llvm::legacy::PassManagerBase&, llvm::raw_pwrite_stream&,
llvm::raw_pwrite_stream*, llvm::TargetMachine::CodeGenFileType, bool,
llvm::MachineModuleInfo*)
virtual bool addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &,
^~~~~~~~~~~~~~~~~~~
/usr/local/include/llvm/Target/TargetMachine.h:254:16: note:
candidate expects 6 arguments, 3 provided
mv: cannot stat '/tmp/tmp.t53Qo38zci/util/c++/.clang.o.tmp': No such file or directory
make[7]: *** [/home/acme/git/perf/tools/build/Makefile.build:101:
/tmp/tmp.t53Qo38zci/util/c++/clang.o] Error 1
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: c++] Error 2
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[5]: *** Waiting for unfinished jobs....
CC /tmp/tmp.t53Qo38zci/tests/thread-map.o
The function addPassesToEmitFile signature changed in llvm 7.0 and such
a change caused the failure. This patch fixed the issue with using
proper function signatures under different compiler versions.
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20180616174739.1076733-1-yhs@fb.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/c++/clang.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp
index bf31ceab33bd..89512504551b 100644
--- a/tools/perf/util/c++/clang.cpp
+++ b/tools/perf/util/c++/clang.cpp
@@ -146,8 +146,15 @@ getBPFObjectFromModule(llvm::Module *Module)
raw_svector_ostream ostream(*Buffer);
legacy::PassManager PM;
- if (TargetMachine->addPassesToEmitFile(PM, ostream,
- TargetMachine::CGFT_ObjectFile)) {
+ bool NotAdded;
+#if CLANG_VERSION_MAJOR < 7
+ NotAdded = TargetMachine->addPassesToEmitFile(PM, ostream,
+ TargetMachine::CGFT_ObjectFile);
+#else
+ NotAdded = TargetMachine->addPassesToEmitFile(PM, ostream, nullptr,
+ TargetMachine::CGFT_ObjectFile);
+#endif
+ if (NotAdded) {
llvm::errs() << "TargetMachine can't emit a file of this type\n";
return std::unique_ptr<llvm::SmallVectorImpl<char>>(nullptr);;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 13/19] perf alias: Remove trailing newline when reading sysfs files
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (11 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 12/19] perf tools: Fix a clang 7.0 compilation error Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 14/19] perf alias: Rebuild alias expression string to make it comparable Arnaldo Carvalho de Melo
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Thomas Richter,
Heiko Carstens, Jiri Olsa, Martin Schwidefsky,
Arnaldo Carvalho de Melo
From: Thomas Richter <tmricht@linux.ibm.com>
Remove a trailing newline when reading sysfs file contents such as
/sys/devices/cpum_cf/events/TX_NC_TEND. This shows when verbose option
-v is used.
Output before:
tx_nc_tend -> 'cpum_cf'/'event=0x008d
'/
Output after:
tx_nc_tend -> 'cpum_cf'/'event=0x8d'/
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180615101105.47047-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/pmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index d2fb597c9a8c..2738fc8d200d 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -303,6 +303,9 @@ static int perf_pmu__new_alias(struct list_head *list, char *dir, char *name, FI
buf[ret] = 0;
+ /* Remove trailing newline from sysfs file */
+ rtrim(buf);
+
return __perf_pmu__new_alias(list, dir, name, NULL, buf, NULL, NULL, NULL,
NULL, NULL, NULL);
}
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 14/19] perf alias: Rebuild alias expression string to make it comparable
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (12 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 13/19] perf alias: Remove trailing newline when reading sysfs files Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 15/19] perf stat: Remove duplicate event counting Arnaldo Carvalho de Melo
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Thomas Richter,
Heiko Carstens, Jiri Olsa, Martin Schwidefsky,
Arnaldo Carvalho de Melo
From: Thomas Richter <tmricht@linux.ibm.com>
PMU alias definitions in sysfs files may have spaces, newlines and
numbers with leading zeroes. Some alias definitions may also appear in
JSON files without spaces, etc.
Scan alias definitions and remove leading zeroes, spaces, newlines, etc
and rebuild string to make alias->str member comparable.
s390 for example has terms specified as event=0x0091 (read from files
../<PMU>/events/<FILE> and terms specified as event=0x91 (read from JSON
files).
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180615101105.47047-2-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/pmu.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 2738fc8d200d..f321ce97d9ec 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -241,9 +241,11 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
char *metric_expr,
char *metric_name)
{
+ struct parse_events_term *term;
struct perf_pmu_alias *alias;
int ret;
int num;
+ char newval[256];
alias = malloc(sizeof(*alias));
if (!alias)
@@ -262,6 +264,27 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
return ret;
}
+ /* Scan event and remove leading zeroes, spaces, newlines, some
+ * platforms have terms specified as
+ * event=0x0091 (read from files ../<PMU>/events/<FILE>
+ * and terms specified as event=0x91 (read from JSON files).
+ *
+ * Rebuild string to make alias->str member comparable.
+ */
+ memset(newval, 0, sizeof(newval));
+ ret = 0;
+ list_for_each_entry(term, &alias->terms, list) {
+ if (ret)
+ ret += scnprintf(newval + ret, sizeof(newval) - ret,
+ ",");
+ if (term->type_val == PARSE_EVENTS__TERM_TYPE_NUM)
+ ret += scnprintf(newval + ret, sizeof(newval) - ret,
+ "%s=%#x", term->config, term->val.num);
+ else if (term->type_val == PARSE_EVENTS__TERM_TYPE_STR)
+ ret += scnprintf(newval + ret, sizeof(newval) - ret,
+ "%s=%s", term->config, term->val.str);
+ }
+
alias->name = strdup(name);
if (dir) {
/*
@@ -285,7 +308,7 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
snprintf(alias->unit, sizeof(alias->unit), "%s", unit);
}
alias->per_pkg = perpkg && sscanf(perpkg, "%d", &num) == 1 && num == 1;
- alias->str = strdup(val);
+ alias->str = strdup(newval);
list_add_tail(&alias->list, list);
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 15/19] perf stat: Remove duplicate event counting
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (13 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 14/19] perf alias: Rebuild alias expression string to make it comparable Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 16/19] perf bench: Fix numa report output code Arnaldo Carvalho de Melo
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Thomas Richter,
Heiko Carstens, Martin Schwidefsky, Arnaldo Carvalho de Melo
From: Thomas Richter <tmricht@linux.ibm.com>
'perf stat' shows a mismatch in perf stat regarding counter names on
s390:
Run command:
[root@s35lp76 perf]# ./perf stat -e tx_nc_tend -v --
~/mytesttx 1 >/tmp/111
tx_nc_tend: 1 573146 573146
tx_nc_tend: 1 573146 573146
Performance counter stats for '/root/mytesttx 1':
3 tx_nc_tend
0.001037252 seconds time elapsed
[root@s35lp76 perf]#
shows transaction counter tx_nc_tend with value 3 but it was triggered
only once as seen by the output of mytesttx.
When looking up the event name tx_nc_tend the following function
sequence is called:
parse_events_multi_pmu_add()
+--> perf_pmu__scan() being called with NULL argument
+--> pmu_read_sysfs() scans directory ../devices/ for
all PMUs
+--> perf_pmu__find() tries to find a PMU in the
global pmu list.
+--> pmu_lookup() called to read all file
entries when not in global
list.
pmu_lookup() causes the issue. It calls
+---> pmu_aliases() to read all the entries in the PMU directory.
On s390 this is named
/sys/devices/cpum_cf/events.
+--> pmu_aliases_parse() reads all files and creates an
alias for each file name.
So we end up with first entry created by
reading the sysfs file
[root@s35lp76 perf]# cat /sys/devices/cpum_cf
/events/TX_NC_TEND
event=0x008d
[root@s35lp76 perf]#
Debug output shows this entry
tx_nc_tend -> 'cpum_cf'/'event=0x008d
'/
After all files in this directory have been
read and aliases created this function is called:
+--> pmu_add_cpu_aliases()
This function looks up the CPU tables
created by the json files.
With json files for s390 now available all
the aliases are added to
the PMU alias list a second time.
The second entry is added by
reading the json file converted by jevent
resulting in file pmu-events/pmu-events.c:
{
.name = "tx_nc_tend",
.event = "event=0x8d",
.desc = "Unit: cpum_cf Completed TEND \
instructions \
in non-constrained TX mode",
.topic = "extended",
.long_desc = "A TEND instruction has \
completed in a \
non-constrained \
transactional-execution mode",
.pmu = "cpum_cf",
},
Debug output shows this entry
tx_nc_tend -> 'cpum_cf'/'event=0x8d'/
Function pmu_aliases_parse() and pmu_add_cpu_aliases() both use
__perf_pmu__new_alias() to add an alias to the PMU alias list. There is
no check if an alias already exist
So we end up with 2 entries for tx_nc_tend in the PMU alias list.
Having set up the PMU alias list for this PMU now
parse_events_multi_add_pmu() reads the complete alias list and adds each
alias with parse_events_add_pmu() to the global perfev_list. This
causes the alias to be added multiple times to the event list.
Fix this by making __perf_pmu__new_alias() to merge alias definitions if
an alias is already on the alias list. Also print a debug message when
the alias has mismatches in some fields.
Output before:
[root@s35lp76 perf]# ./perf stat -e tx_nc_tend -v \
-- ~/mytesttx 1 >/tmp/111
tx_nc_tend: 1 551446 551446
Performance counter stats for '/root/mytesttx 1':
3 tx_nc_tend
0.000961134 seconds time elapsed
[root@s35lp76 perf]#
Output after:
[root@s35lp76 perf]# ./perf stat -e tx_nc_tend -v \
-- ~/mytesttx 1 >/tmp/111
tx_nc_tend: 1 551446 551446
Performance counter stats for '/root/mytesttx 1':
1 tx_nc_tend
0.000961134 seconds time elapsed
[root@s35lp76 perf]#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180615101105.47047-3-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/pmu.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index f321ce97d9ec..3ba6a1742f91 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -234,6 +234,74 @@ static int perf_pmu__parse_snapshot(struct perf_pmu_alias *alias,
return 0;
}
+static void perf_pmu_assign_str(char *name, const char *field, char **old_str,
+ char **new_str)
+{
+ if (!*old_str)
+ goto set_new;
+
+ if (*new_str) { /* Have new string, check with old */
+ if (strcasecmp(*old_str, *new_str))
+ pr_debug("alias %s differs in field '%s'\n",
+ name, field);
+ zfree(old_str);
+ } else /* Nothing new --> keep old string */
+ return;
+set_new:
+ *old_str = *new_str;
+ *new_str = NULL;
+}
+
+static void perf_pmu_update_alias(struct perf_pmu_alias *old,
+ struct perf_pmu_alias *newalias)
+{
+ perf_pmu_assign_str(old->name, "desc", &old->desc, &newalias->desc);
+ perf_pmu_assign_str(old->name, "long_desc", &old->long_desc,
+ &newalias->long_desc);
+ perf_pmu_assign_str(old->name, "topic", &old->topic, &newalias->topic);
+ perf_pmu_assign_str(old->name, "metric_expr", &old->metric_expr,
+ &newalias->metric_expr);
+ perf_pmu_assign_str(old->name, "metric_name", &old->metric_name,
+ &newalias->metric_name);
+ perf_pmu_assign_str(old->name, "value", &old->str, &newalias->str);
+ old->scale = newalias->scale;
+ old->per_pkg = newalias->per_pkg;
+ old->snapshot = newalias->snapshot;
+ memcpy(old->unit, newalias->unit, sizeof(old->unit));
+}
+
+/* Delete an alias entry. */
+static void perf_pmu_free_alias(struct perf_pmu_alias *newalias)
+{
+ zfree(&newalias->name);
+ zfree(&newalias->desc);
+ zfree(&newalias->long_desc);
+ zfree(&newalias->topic);
+ zfree(&newalias->str);
+ zfree(&newalias->metric_expr);
+ zfree(&newalias->metric_name);
+ parse_events_terms__purge(&newalias->terms);
+ free(newalias);
+}
+
+/* Merge an alias, search in alias list. If this name is already
+ * present merge both of them to combine all information.
+ */
+static bool perf_pmu_merge_alias(struct perf_pmu_alias *newalias,
+ struct list_head *alist)
+{
+ struct perf_pmu_alias *a;
+
+ list_for_each_entry(a, alist, list) {
+ if (!strcasecmp(newalias->name, a->name)) {
+ perf_pmu_update_alias(a, newalias);
+ perf_pmu_free_alias(newalias);
+ return true;
+ }
+ }
+ return false;
+}
+
static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
char *desc, char *val,
char *long_desc, char *topic,
@@ -310,7 +378,8 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
alias->per_pkg = perpkg && sscanf(perpkg, "%d", &num) == 1 && num == 1;
alias->str = strdup(newval);
- list_add_tail(&alias->list, list);
+ if (!perf_pmu_merge_alias(alias, list))
+ list_add_tail(&alias->list, list);
return 0;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 16/19] perf bench: Fix numa report output code
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (14 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 15/19] perf stat: Remove duplicate event counting Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 17/19] perf script: Add missing output fields in a hint Arnaldo Carvalho de Melo
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, David Ahern, Namhyung Kim, Peter Zijlstra,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Currently we can hit following assert when running numa bench:
$ perf bench numa mem -p 3 -t 1 -P 512 -s 100 -zZ0cm --thp 1
perf: bench/numa.c:1577: __bench_numa: Assertion `!(!(((wait_stat) & 0x7f) == 0))' failed.
The assertion is correct, because we hit the SIGFPE in following line:
Thread 2.2 "thread 0/0" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffd28c6700 (LWP 11750)]
0x000.. in worker_thread (__tdata=0x7.. ) at bench/numa.c:1257
1257 td->speed_gbs = bytes_done / (td->runtime_ns / NSEC_PER_SEC) / 1e9;
We don't check if the runtime is actually bigger than 1 second,
and thus this might end up with zero division within FPU.
Adding the check to prevent this.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180620094036.17278-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/bench/numa.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 63eb49082774..44195514b19e 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1098,7 +1098,7 @@ static void *worker_thread(void *__tdata)
u8 *global_data;
u8 *process_data;
u8 *thread_data;
- u64 bytes_done;
+ u64 bytes_done, secs;
long work_done;
u32 l;
struct rusage rusage;
@@ -1254,7 +1254,8 @@ static void *worker_thread(void *__tdata)
timersub(&stop, &start0, &diff);
td->runtime_ns = diff.tv_sec * NSEC_PER_SEC;
td->runtime_ns += diff.tv_usec * NSEC_PER_USEC;
- td->speed_gbs = bytes_done / (td->runtime_ns / NSEC_PER_SEC) / 1e9;
+ secs = td->runtime_ns / NSEC_PER_SEC;
+ td->speed_gbs = secs ? bytes_done / secs / 1e9 : 0;
getrusage(RUSAGE_THREAD, &rusage);
td->system_time_ns = rusage.ru_stime.tv_sec * NSEC_PER_SEC;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 17/19] perf script: Add missing output fields in a hint
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (15 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 16/19] perf bench: Fix numa report output code Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 18/19] perf script: Fix crash because of missing evsel->priv Arnaldo Carvalho de Melo
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Ravi Bangoria,
Alexander Shishkin, Andi Kleen, David Ahern,
David Carrillo-Cisneros, Jin Yao, Jiri Olsa, Namhyung Kim,
Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
A few fields are missing in a perf script -F hint. Add them.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20180625124220.6434-2-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-script.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index a31d7082188e..f3fefbcc4503 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3125,8 +3125,9 @@ int cmd_script(int argc, const char **argv)
"+field to add and -field to remove."
"Valid types: hw,sw,trace,raw,synth. "
"Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,"
- "addr,symoff,period,iregs,uregs,brstack,brstacksym,flags,"
- "bpf-output,callindent,insn,insnlen,brstackinsn,synth,phys_addr",
+ "addr,symoff,srcline,period,iregs,uregs,brstack,"
+ "brstacksym,flags,bpf-output,brstackinsn,brstackoff,"
+ "callindent,insn,insnlen,synth,phys_addr,metric,misc",
parse_output_fields),
OPT_BOOLEAN('a', "all-cpus", &system_wide,
"system-wide collection from all CPUs"),
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 18/19] perf script: Fix crash because of missing evsel->priv
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (16 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 17/19] perf script: Add missing output fields in a hint Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 19/19] perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] Arnaldo Carvalho de Melo
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Ravi Bangoria,
Alexander Shishkin, Andi Kleen, David Ahern,
David Carrillo-Cisneros, Jin Yao, Jiri Olsa, Namhyung Kim,
Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
'perf script' in piped mode is crashing because evsel->priv is not set
properly. Fix it.
Before:
# perf record -o - -- ls | perf script
<SNIP 'ls' output>
Segmentation fault (core dumped)
#
After:
# perf record -o - -- ls | perf script
<SNIP 'ls' output>
ls 2282 1031.731974: 250000 cpu-clock:uhH: 7effe4b3d29e
ls 2282 1031.732222: 250000 cpu-clock:uhH: 7effe4b3a650
#
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: a14390fde64e ("perf script: Allow creating per-event dump files")
Link: http://lkml.kernel.org/r/20180625124220.6434-3-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-script.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index f3fefbcc4503..ad2ac1300420 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1834,6 +1834,7 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
struct perf_evlist *evlist;
struct perf_evsel *evsel, *pos;
int err;
+ static struct perf_evsel_script *es;
err = perf_event__process_attr(tool, event, pevlist);
if (err)
@@ -1842,6 +1843,19 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
evlist = *pevlist;
evsel = perf_evlist__last(*pevlist);
+ if (!evsel->priv) {
+ if (scr->per_event_dump) {
+ evsel->priv = perf_evsel_script__new(evsel,
+ scr->session->data);
+ } else {
+ es = zalloc(sizeof(*es));
+ if (!es)
+ return -ENOMEM;
+ es->fp = stdout;
+ evsel->priv = es;
+ }
+ }
+
if (evsel->attr.type >= PERF_TYPE_MAX &&
evsel->attr.type != PERF_TYPE_SYNTH)
return 0;
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 19/19] perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (17 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 18/19] perf script: Fix crash because of missing evsel->priv Arnaldo Carvalho de Melo
@ 2018-06-25 17:40 ` Arnaldo Carvalho de Melo
2018-06-25 20:26 ` [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
2018-06-26 6:46 ` Ingo Molnar
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 17:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Ravi Bangoria,
Alexander Shishkin, Andi Kleen, David Ahern,
David Carrillo-Cisneros, Jin Yao, Jiri Olsa, Namhyung Kim,
Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
perf_event__process_feature() accesses feat_ops[HEADER_LAST_FEATURE]
which is not defined and thus perf is crashing. HEADER_LAST_FEATURE is
used as an end marker for the perf report but it's unused for perf
script/annotate. Ignore HEADER_LAST_FEATURE for perf script/annotate,
just like it is done in 'perf report'.
Before:
# perf record -o - ls | perf script
<SNIP 'ls' output>
Segmentation fault (core dumped)
#
After:
# perf record -o - ls | perf script
<SNIP 'ls' output>
Segmentation fault (core dumped)
ls 7031 4392.099856: 250000 cpu-clock:uhH: 7f5e0ce7cd60
ls 7031 4392.100355: 250000 cpu-clock:uhH: 7f5e0c706ef7
#
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Fixes: 57b5de463925 ("perf report: Support forced leader feature in pipe mode")
Link: http://lkml.kernel.org/r/20180625124220.6434-4-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-annotate.c | 11 ++++++++++-
tools/perf/builtin-report.c | 3 ++-
tools/perf/builtin-script.c | 11 ++++++++++-
| 2 +-
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 5eb22cc56363..8180319285af 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -283,6 +283,15 @@ static int process_sample_event(struct perf_tool *tool,
return ret;
}
+static int process_feature_event(struct perf_tool *tool,
+ union perf_event *event,
+ struct perf_session *session)
+{
+ if (event->feat.feat_id < HEADER_LAST_FEATURE)
+ return perf_event__process_feature(tool, event, session);
+ return 0;
+}
+
static int hist_entry__tty_annotate(struct hist_entry *he,
struct perf_evsel *evsel,
struct perf_annotate *ann)
@@ -471,7 +480,7 @@ int cmd_annotate(int argc, const char **argv)
.attr = perf_event__process_attr,
.build_id = perf_event__process_build_id,
.tracing_data = perf_event__process_tracing_data,
- .feature = perf_event__process_feature,
+ .feature = process_feature_event,
.ordered_events = true,
.ordering_requires_timestamps = true,
},
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index cdb5b6949832..c04dc7b53797 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -217,7 +217,8 @@ static int process_feature_event(struct perf_tool *tool,
}
/*
- * All features are received, we can force the
+ * (feat_id = HEADER_LAST_FEATURE) is the end marker which
+ * means all features are received, now we can force the
* group if needed.
*/
setup_forced_leader(rep, session->evlist);
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index ad2ac1300420..568ddfac3213 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3044,6 +3044,15 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
return set_maps(script);
}
+static int process_feature_event(struct perf_tool *tool,
+ union perf_event *event,
+ struct perf_session *session)
+{
+ if (event->feat.feat_id < HEADER_LAST_FEATURE)
+ return perf_event__process_feature(tool, event, session);
+ return 0;
+}
+
#ifdef HAVE_AUXTRACE_SUPPORT
static int perf_script__process_auxtrace_info(struct perf_tool *tool,
union perf_event *event,
@@ -3088,7 +3097,7 @@ int cmd_script(int argc, const char **argv)
.attr = process_attr,
.event_update = perf_event__process_event_update,
.tracing_data = perf_event__process_tracing_data,
- .feature = perf_event__process_feature,
+ .feature = process_feature_event,
.build_id = perf_event__process_build_id,
.id_index = perf_event__process_id_index,
.auxtrace_info = perf_script__process_auxtrace_info,
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 59fcc790c865..653ff65aa2c3 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -3464,7 +3464,7 @@ int perf_event__process_feature(struct perf_tool *tool,
pr_warning("invalid record type %d in pipe-mode\n", type);
return 0;
}
- if (feat == HEADER_RESERVED || feat > HEADER_LAST_FEATURE) {
+ if (feat == HEADER_RESERVED || feat >= HEADER_LAST_FEATURE) {
pr_warning("invalid record type %d in pipe-mode\n", type);
return -1;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [GIT PULL 00/19] perf/urgent fixes for 4.18
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (18 preceding siblings ...)
2018-06-25 17:40 ` [PATCH 19/19] perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] Arnaldo Carvalho de Melo
@ 2018-06-25 20:26 ` Arnaldo Carvalho de Melo
2018-06-26 6:46 ` Ingo Molnar
20 siblings, 0 replies; 22+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-25 20:26 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
Ankit Nautiyal, Boqun Feng, Christoph Hellwig, Daniel Borkmann,
David Ahern, David S . Miller, Eric Leblond, Hangbin Liu,
Heiko Carstens, Hendrik Brueckner, Jin Yao, Jiri Olsa,
Kim Phillips
Em Mon, Jun 25, 2018 at 02:40:26PM -0300, Arnaldo Carvalho de Melo escreveu:
> Test results:
> The first ones are container (docker) based builds of tools/perf with
> and without libelf support. Where clang is available, it is also used
> to build perf with/without libelf, and building with LIBCLANGLLVM=1
> (built-in clang) with gcc and clang when clang and its devel libraries
> are installed.
> The objtool and samples/bpf/ builds are disabled now that I'm switching from
> using the sources in a local volume to fetching them from a http server to
> build it inside the container, to make it easier to build in a container cluster.
> Those will come back later.
> Several are cross builds, the ones with -x-ARCH and the android one, and those
> may not have all the features built, due to lack of multi-arch devel packages,
> available and being used so far on just a few, like
> debian:experimental-x-{arm64,mipsel}.
> # dm
> 1 alpine:3.4 : Ok gcc (Alpine 5.3.0) 5.3.0
> 2 alpine:3.5 : Ok gcc (Alpine 6.2.1) 6.2.1 20160822
> 3 alpine:3.6 : Ok gcc (Alpine 6.3.0) 6.3.0
> 4 alpine:3.7 : Ok gcc (Alpine 6.4.0) 6.4.0
> 5 alpine:edge : Ok gcc (Alpine 6.4.0) 6.4.0
> 6 amazonlinux:1 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
> 7 amazonlinux:2 : Ok gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
> 8 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
> 9 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
> 10 centos:5 : Ok gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
> 11 centos:6 : Ok gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
> 12 centos:7 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
> 13 debian:7 : Ok gcc (Debian 4.7.2-5) 4.7.2
> 14 debian:8 : Ok gcc (Debian 4.9.2-10+deb8u1) 4.9.2
> 15 debian:9 : Ok gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> 16 debian:experimental : Ok gcc (Debian 7.3.0-19) 7.3.0
> 17 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
> 18 debian:experimental-x-mips : Ok mips-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
> 19 debian:experimental-x-mips64 : Ok mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
> 20 debian:experimental-x-mipsel : Ok mipsel-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
> 21 fedora:20 : Ok gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
> 22 fedora:21 : Ok gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
> 23 fedora:22 : Ok gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
> 24 fedora:23 : Ok gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
> <stopped due to a power outage>
Ok, just for completeness sake:
# dm from fedora:24
25 fedora:24 : Ok gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
26 fedora:24-x-ARC-uClibc : Ok arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
27 fedora:25 : Ok gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
28 fedora:26 : Ok gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
29 fedora:27 : Ok gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
30 fedora:28 : Ok gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
31 fedora:rawhide : Ok gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
32 gentoo-stage3-amd64:latest : Ok gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
33 mageia:5 : Ok gcc (GCC) 4.9.2
34 mageia:6 : Ok gcc (Mageia 5.5.0-1.mga6) 5.5.0
35 opensuse:42.1 : Ok gcc (SUSE Linux) 4.8.5
36 opensuse:42.2 : Ok gcc (SUSE Linux) 4.8.5
37 opensuse:42.3 : Ok gcc (SUSE Linux) 4.8.5
38 opensuse:tumbleweed : Ok gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
39 oraclelinux:6 : Ok gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
40 oraclelinux:7 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
41 ubuntu:12.04.5 : Ok gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
42 ubuntu:14.04.4 : Ok gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
43 ubuntu:14.04.4-x-linaro-arm64 : Ok aarch64-linux-gnu-gcc (Linaro GCC 5.4-2017.05) 5.4.1 20170404
44 ubuntu:15.04 : Ok gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
45 ubuntu:16.04 : Ok gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
46 ubuntu:16.04-x-arm : Ok arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
47 ubuntu:16.04-x-arm64 : Ok aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
48 ubuntu:16.04-x-powerpc : Ok powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
49 ubuntu:16.04-x-powerpc64 : Ok powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
50 ubuntu:16.04-x-powerpc64el : Ok powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
51 ubuntu:16.04-x-s390 : Ok s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
52 ubuntu:16.10 : Ok gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
53 ubuntu:17.04 : Ok gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
54 ubuntu:17.10 : Ok gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
55 ubuntu:18.04 : Ok gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [GIT PULL 00/19] perf/urgent fixes for 4.18
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
` (19 preceding siblings ...)
2018-06-25 20:26 ` [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
@ 2018-06-26 6:46 ` Ingo Molnar
20 siblings, 0 replies; 22+ messages in thread
From: Ingo Molnar @ 2018-06-26 6:46 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Alexander Shishkin, Alexei Starovoitov, Andi Kleen,
Ankit Nautiyal, Boqun Feng, Christoph Hellwig, Daniel Borkmann,
David Ahern, David S . Miller, Eric Leblond, Hangbin Liu,
Heiko Carstens, Hendrik Brueckner, Jin Yao, Jiri Olsa,
Kim Phillips
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> Test results at the end of this message, as usual.
>
> The following changes since commit 57d6a7938a8fc6cee8420b40ca244220b41721f5:
>
> perf/core: Move the inline keyword at the beginning of the function declaration (2018-06-22 11:07:47 +0200)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.18-20180625
>
> for you to fetch changes up to 92ead7ee30c80f8852d28735cbcb9d79bc85f715:
>
> perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] (2018-06-25 11:59:37 -0300)
>
> ----------------------------------------------------------------
> perf/urgent fixes:
>
> perf bench: (Jiri Olsa):
>
> . Fix NUMA report output code handling of less than 1s runtimes.
>
> perf script: (Ravi Bangoria)
>
> . Add missing output fields in a 'perf script -h' hint.
>
> . Fix crash because of missing evsel->priv.
>
> . Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE], which
> is just a end of features header marker.
>
> perf stat: (Thomas Richter)
>
> . Remove duplicate event counting
>
> perf test:
>
> . Wire parsing error handling in 'parse events' test (Jiri Olsa)
>
> . Fix 'session topology' test on s/390 (Thomas Richter)
>
> eBPF: (Yonghong Song)
>
> . Fix a clang 7.0 compilation error when building perf linking
> with libclang
>
> intel-pt: (Adrian Hunter)
>
> . Fix packet decoding of CYC packets.
>
> Copies of kernel files: (Arnaldo Carvalho de Melo)
>
> . Synchronize drm/drm.h UAPI
>
> . Update x86's syscall_64.tbl, adding support for 'io_pgetevents' and 'rseq'
> in 'perf trace'.
>
> . Update powerpc uapi/asm/unistd.h, adding support for the 'rseq' syscall.
>
> . Update if_link.h and bpf.h, no effect on tool features.
>
> PowerPC: (Sandipan Das)
>
> . Fix crash if callchain is empty.
>
> s/390: (Thomas Richter)
>
> . Support random socked_id assignment in the perf header.
>
> . Support s390 random socket_id assignment in perf.data file.
>
> . Make PMU alias definitions taken from sysfs and JSON files comparable
> by normalizing them wrt spaces and newlines.
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Adrian Hunter (1):
> perf intel-pt: Fix packet decoding of CYC packets
>
> Arnaldo Carvalho de Melo (5):
> tools headers uapi: Synchronize drm/drm.h
> perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq'
> tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall
> tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT}
> tools include uapi: Synchronize bpf.h with the kernel
>
> Jiri Olsa (3):
> perf tests: Add event parsing error handling to parse events test
> perf tests: Add valid callback for parse-events test
> perf bench: Fix numa report output code
>
> Ravi Bangoria (3):
> perf script: Add missing output fields in a hint
> perf script: Fix crash because of missing evsel->priv
> perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE]
>
> Sandipan Das (1):
> perf report powerpc: Fix crash if callchain is empty
>
> Thomas Richter (5):
> perf record: Support s390 random socket_id assignment
> perf test session topology: Fix test on s390
> perf alias: Remove trailing newline when reading sysfs files
> perf alias: Rebuild alias expression string to make it comparable
> perf stat: Remove duplicate event counting
>
> Yonghong Song (1):
> perf tools: Fix a clang 7.0 compilation error
>
> tools/arch/powerpc/include/uapi/asm/unistd.h | 1 +
> tools/include/uapi/drm/drm.h | 7 ++
> tools/include/uapi/linux/bpf.h | 2 +-
> tools/include/uapi/linux/if_link.h | 2 +
> tools/perf/arch/powerpc/util/skip-callchain-idx.c | 2 +-
> tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 +
> tools/perf/bench/numa.c | 5 +-
> tools/perf/builtin-annotate.c | 11 ++-
> tools/perf/builtin-report.c | 3 +-
> tools/perf/builtin-script.c | 30 ++++++-
> tools/perf/tests/parse-events.c | 25 ++++--
> tools/perf/tests/topology.c | 1 +
> tools/perf/util/c++/clang.cpp | 11 ++-
> tools/perf/util/header.c | 12 ++-
> .../util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +-
> tools/perf/util/pmu.c | 99 +++++++++++++++++++++-
> 16 files changed, 194 insertions(+), 21 deletions(-)
Pulled, thanks a lot Arnaldo!
Note that I've applied the trivial header sync patch below on top of it to reduce
the number of build time warnings.
There's one warning left:
Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
Which is a bit more involved as it requires the introduction of x86/asm/mcsafe_test.h
on the tooling side.
Thanks,
Ingo
======================>
From 32fdbd90cc03f01d452138bab4d8a120873d6acf Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@kernel.org>
Date: Tue, 26 Jun 2018 08:43:14 +0200
Subject: [PATCH] tools/headers: Pick up latest kernel ABIs
Sync KVM ABI additions and x86 CPU features additions - neither of which
has any impact on the tooling build.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/arch/arm/include/uapi/asm/kvm.h | 1 +
tools/arch/arm64/include/uapi/asm/kvm.h | 1 +
tools/arch/powerpc/include/uapi/asm/kvm.h | 1 +
tools/arch/x86/include/asm/cpufeatures.h | 2 ++
tools/include/uapi/linux/kvm.h | 1 +
5 files changed, 6 insertions(+)
diff --git a/tools/arch/arm/include/uapi/asm/kvm.h b/tools/arch/arm/include/uapi/asm/kvm.h
index caae4843cb70..16e006f708ca 100644
--- a/tools/arch/arm/include/uapi/asm/kvm.h
+++ b/tools/arch/arm/include/uapi/asm/kvm.h
@@ -91,6 +91,7 @@ struct kvm_regs {
#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
#define KVM_VGIC_ITS_ADDR_TYPE 4
+#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5
#define KVM_VGIC_V3_DIST_SIZE SZ_64K
#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h
index 04b3256f8e6d..4e76630dd655 100644
--- a/tools/arch/arm64/include/uapi/asm/kvm.h
+++ b/tools/arch/arm64/include/uapi/asm/kvm.h
@@ -91,6 +91,7 @@ struct kvm_regs {
#define KVM_VGIC_V3_ADDR_TYPE_DIST 2
#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3
#define KVM_VGIC_ITS_ADDR_TYPE 4
+#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5
#define KVM_VGIC_V3_DIST_SIZE SZ_64K
#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K)
diff --git a/tools/arch/powerpc/include/uapi/asm/kvm.h b/tools/arch/powerpc/include/uapi/asm/kvm.h
index 833ed9a16adf..1b32b56a03d3 100644
--- a/tools/arch/powerpc/include/uapi/asm/kvm.h
+++ b/tools/arch/powerpc/include/uapi/asm/kvm.h
@@ -633,6 +633,7 @@ struct kvm_ppc_cpu_char {
#define KVM_REG_PPC_PSSCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbd)
#define KVM_REG_PPC_DEC_EXPIRY (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbe)
+#define KVM_REG_PPC_ONLINE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xbf)
/* Transactional Memory checkpointed state:
* This is all GPRs, all VSX regs and a subset of SPRs
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index fb00a2fca990..5701f5cecd31 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -282,7 +282,9 @@
#define X86_FEATURE_AMD_IBPB (13*32+12) /* "" Indirect Branch Prediction Barrier */
#define X86_FEATURE_AMD_IBRS (13*32+14) /* "" Indirect Branch Restricted Speculation */
#define X86_FEATURE_AMD_STIBP (13*32+15) /* "" Single Thread Indirect Branch Predictors */
+#define X86_FEATURE_AMD_SSBD (13*32+24) /* "" Speculative Store Bypass Disable */
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */
+#define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */
/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 39e364c70caf..b6270a3b38e9 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -948,6 +948,7 @@ struct kvm_ppc_resize_hpt {
#define KVM_CAP_S390_BPB 152
#define KVM_CAP_GET_MSR_FEATURES 153
#define KVM_CAP_HYPERV_EVENTFD 154
+#define KVM_CAP_HYPERV_TLBFLUSH 155
#ifdef KVM_CAP_IRQ_ROUTING
^ permalink raw reply related [flat|nested] 22+ messages in thread
end of thread, other threads:[~2018-06-26 6:46 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 17:40 [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 01/19] perf record: Support s390 random socket_id assignment Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 02/19] perf test session topology: Fix test on s390 Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 03/19] perf report powerpc: Fix crash if callchain is empty Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 04/19] perf tests: Add event parsing error handling to parse events test Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 05/19] perf tests: Add valid callback for parse-events test Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 06/19] perf intel-pt: Fix packet decoding of CYC packets Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 07/19] tools headers uapi: Synchronize drm/drm.h Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 08/19] perf tools: Update x86's syscall_64.tbl, adding 'io_pgetevents' and 'rseq' Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 09/19] tools include powerpc: Update arch/powerpc/include/uapi/asm/unistd.h copy to get 'rseq' syscall Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 10/19] tools include uapi: Update if_link.h to pick IFLA_{BRPORT_ISOLATED,VXLAN_TTL_INHERIT} Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 11/19] tools include uapi: Synchronize bpf.h with the kernel Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 12/19] perf tools: Fix a clang 7.0 compilation error Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 13/19] perf alias: Remove trailing newline when reading sysfs files Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 14/19] perf alias: Rebuild alias expression string to make it comparable Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 15/19] perf stat: Remove duplicate event counting Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 16/19] perf bench: Fix numa report output code Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 17/19] perf script: Add missing output fields in a hint Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 18/19] perf script: Fix crash because of missing evsel->priv Arnaldo Carvalho de Melo
2018-06-25 17:40 ` [PATCH 19/19] perf tools: Fix crash caused by accessing feat_ops[HEADER_LAST_FEATURE] Arnaldo Carvalho de Melo
2018-06-25 20:26 ` [GIT PULL 00/19] perf/urgent fixes for 4.18 Arnaldo Carvalho de Melo
2018-06-26 6:46 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).