* [GIT PULL 0/9] perf/core improvements and fixes
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Alexander Shishkin, Alexis Berlemont, Al Viro, Colin King,
David Ahern, David Howells, Hemant Kumar, Jan Stancek, Jiri Olsa,
Kan Liang, kernel-janitors, Krister Johansen,
Luis Claudio Gonçalves, Masami Hiramatsu, Michael Ellerman,
Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
Wang Nan, Yao Jin, Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
Test results at the end of this message, as usual.
The following changes since commit 3906a13a6b4e78fbc0def03a808f091f0dff1b44:
Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-28 07:44:43 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170331
for you to fetch changes up to fd5cead23f54697310bd565aa2a23ae5128080a0:
perf trace: Beautify statx syscall 'flag' and 'mask' arguments (2017-03-31 14:42:31 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
New features:
- Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo)
e.g.:
System wide strace like session:
# trace -e statx
16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
36050.891 ( 0.007 ms): statx/4576 statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
^C#
User visible:
- Handle unpaired raw_syscalls:sys_exit events in 'perf trace', i.e. we
shouldn't try to calculate duration or print the timestamp for a missing
matching raw_syscalls:sys_enter (Arnaldo Carvalho de Melo)
- Do not print "cycles: 0" in perf report LBR lines in platforms not
supporting 'cycles', such as Intel's Broadwell (Jin Yao)
- Handle missing $HOME env var (Jiri Olsa)
- Map 8-bit registers (al, bl, etc), not supported in uprobes_events, to
the next best thing (ax, bx, etc) supported (Ravi Bangoria)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
perf tools: Remove support for command aliases
perf trace: Handle unpaired raw_syscalls:sys_exit event
tools include uapi: Grab copies of stat.h and fcntl.h
perf trace: Beautify statx syscall 'flag' and 'mask' arguments
Colin Ian King (1):
perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
Jin Yao (1):
perf report: Drop cycles 0 for LBR print
Jiri Olsa (1):
perf tools: Do not fail in case of empty HOME env variable
Ravi Bangoria (2):
perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
perf/sdt/x86: Move OP parser to tools/perf/arch/x86/
tools/include/linux/types.h | 1 +
tools/include/uapi/linux/fcntl.h | 72 +++++++++
tools/include/uapi/linux/stat.h | 176 ++++++++++++++++++++
tools/perf/Build | 1 +
tools/perf/MANIFEST | 2 +
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 +
tools/perf/arch/x86/util/perf_regs.c | 187 ++++++++++++++++++----
tools/perf/builtin-help.c | 13 --
tools/perf/builtin-trace.c | 57 ++++---
tools/perf/check-headers.sh | 2 +
tools/perf/perf.c | 97 +----------
tools/perf/trace/beauty/Build | 1 +
tools/perf/trace/beauty/beauty.h | 24 +++
tools/perf/trace/beauty/statx.c | 72 +++++++++
tools/perf/util/Build | 1 -
tools/perf/util/alias.c | 78 ---------
tools/perf/util/cache.h | 1 -
tools/perf/util/callchain.c | 111 ++++++++-----
tools/perf/util/config.c | 54 ++++---
tools/perf/util/help-unknown-cmd.c | 8 +-
tools/perf/util/hist.c | 2 +-
tools/perf/util/perf_regs.c | 6 +-
tools/perf/util/perf_regs.h | 11 +-
tools/perf/util/probe-file.c | 132 +++++----------
24 files changed, 707 insertions(+), 403 deletions(-)
create mode 100644 tools/include/uapi/linux/fcntl.h
create mode 100644 tools/include/uapi/linux/stat.h
create mode 100644 tools/perf/trace/beauty/Build
create mode 100644 tools/perf/trace/beauty/beauty.h
create mode 100644 tools/perf/trace/beauty/statx.c
delete mode 100644 tools/perf/util/alias.c
Test results:
The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.
For this specific pull request the samples/bpf/ was disabled, as 'make headers_install'
is failing with the following error, in this case in fedora:rawhide:
INSTALL usr/include/uapi/ (0 file)
/git/linux/scripts/Makefile.headersinst:62: *** Missing generated UAPI file ./arch/x86/include/generated/uapi/asm/unistd_32.h. Stop.
make[1]: *** [/git/linux/Makefile:1151: headers_install] Error 2
make[1]: Leaving directory '/tmp/build/linux'
make: *** [Makefile:152: sub-make] Error 2
make: Leaving directory '/git/linux'
I'll investigate later, perf and objtool builds just fine, with clang and gcc.
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
2 alpine:3.5: Ok
3 alpine:edge: Ok
4 android-ndk:r12b-arm: Ok
5 archlinux:latest: Ok
6 centos:5: Ok
7 centos:6: Ok
8 centos:7: Ok
9 debian:7: Ok
10 debian:8: Ok
11 debian:9: Ok
12 debian:experimental: Ok
13 debian:experimental-x-arm64: Ok
14 debian:experimental-x-mips: Ok
15 debian:experimental-x-mips64: Ok
16 debian:experimental-x-mipsel: Ok
17 fedora:20: Ok
18 fedora:21: Ok
19 fedora:22: Ok
20 fedora:23: Ok
21 fedora:24: Ok
22 fedora:24-x-ARC-uClibc: Ok
23 fedora:25: Ok
24 fedora:rawhide: Ok
25 mageia:5: Ok
26 opensuse:13.2: Ok
27 opensuse:42.1: Ok
28 opensuse:tumbleweed: Ok
29 ubuntu:12.04.5: Ok
30 ubuntu:14.04.4: Ok
31 ubuntu:14.04.4-x-linaro-arm64: Ok
32 ubuntu:15.10: Ok
33 ubuntu:16.04: Ok
34 ubuntu:16.04-x-arm: Ok
35 ubuntu:16.04-x-arm64: Ok
36 ubuntu:16.04-x-powerpc: Ok
37 ubuntu:16.04-x-powerpc64: Ok
38 ubuntu:16.04-x-s390: Ok
39 ubuntu:16.10: Ok
40 ubuntu:17.04: Ok
#
# uname -a
Linux jouet 4.11.0-rc2+ #5 SMP Mon Mar 20 18:12:29 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
# 'perf test tsc' already fixed by peterz in tip
# 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: Parse event definition strings : Ok
6: Simple expression parser : Ok
7: PERF_RECORD_* events & perf_sample fields : Ok
8: Parse perf pmu format : Ok
9: DSO data read : Ok
10: DSO data cache : Ok
11: DSO data reopen : Ok
12: Roundtrip evsel->name : Ok
13: Parse sched tracepoints fields : Ok
14: syscalls:sys_enter_openat event fields : Ok
15: Setup struct perf_event_attr : Ok
16: Match and link multiple hists : Ok
17: 'import perf' in python : Ok
18: Breakpoint overflow signal handler : Ok
19: Breakpoint overflow sampling : Ok
20: Number of exit events of a simple workload : Ok
21: Software clock events period values : Ok
22: Object code reading : Ok
23: Sample parsing : Ok
24: Use a dummy software event to keep tracking: Ok
25: Parse with no sample_id_all bit set : Ok
26: Filter hist entries : Ok
27: Lookup mmap thread : Ok
28: Share thread mg : Ok
29: Sort output of hist entries : Ok
30: Cumulate child hist entries : Ok
31: Track with sched_switch : Ok
32: Filter fds with revents mask in a fdarray : Ok
33: Add fd to a fdarray, making it autogrow : Ok
34: kmod_path__parse : Ok
35: Thread map : Ok
36: LLVM search and compile :
36.1: Basic BPF llvm compile : Ok
36.2: kbuild searching : Ok
36.3: Compile source for BPF prologue generation: Ok
36.4: Compile source for BPF relocation : Ok
37: Session topology : Ok
38: BPF filter :
38.1: Basic BPF filtering : Ok
38.2: BPF pinning : Ok
38.3: BPF prologue generation : Ok
38.4: BPF relocation checker : Ok
39: Synthesize thread map : Ok
40: Remove thread map : Ok
41: Synthesize cpu map : Ok
42: Synthesize stat config : Ok
43: Synthesize stat : Ok
44: Synthesize stat round : Ok
45: Synthesize attr update : Ok
46: Event times : Ok
47: Read backward ring buffer : Ok
48: Print cpu map : Ok
49: Probe SDT events : Ok
50: is_printable_array : Ok
51: Print bitmap : Ok
52: perf hooks : Ok
53: builtin clang support : Skip (not compiled in)
54: unit_number__scnprintf : Ok
55: x86 rdpmc : Ok
56: Convert perf time to TSC : FAILED!
57: DWARF unwind : Ok
58: x86 instruction decoder - new instructions : Ok
59: Intel cqm nmi context read : Skip
$ make -C tools/perf build-test
make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
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_no_gtk2_O: make NO_GTK2=1
make_no_newt_O: make NO_NEWT=1
make_debug_O: make DEBUG=1
make_no_backtrace_O: make NO_BACKTRACE=1
make_with_clangllvm_O: make LIBCLANGLLVM=1
make_tags_O: make tags
make_no_demangle_O: make NO_DEMANGLE=1
make_install_bin_O: make install-bin
make_no_libpython_O: make NO_LIBPYTHON=1
make_no_slang_O: make NO_SLANG=1
make_no_auxtrace_O: make NO_AUXTRACE=1
make_util_pmu_bison_o_O: make util/pmu-bison.o
make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
make_no_libbpf_O: make NO_LIBBPF=1
make_with_babeltrace_O: make LIBBABELTRACE=1
make_util_map_o_O: make util/map.o
make_static_O: make LDFLAGS=-static
make_help_O: make help
make_pure_O: make
make_perf_o_O: make perf.o
make_no_libnuma_O: make NO_LIBNUMA=1
make_no_libperl_O: make NO_LIBPERL=1
make_no_libunwind_O: make NO_LIBUNWIND=1
make_no_libbionic_O: make NO_LIBBIONIC=1
make_doc_O: make doc
make_no_libelf_O: make NO_LIBELF=1
make_clean_all_O: make clean all
make_install_prefix_O: make install prefix=/tmp/krava
make_no_libaudit_O: make NO_LIBAUDIT=1
make_install_O: make install
make_install_prefix_slash_O: make install prefix=/tmp/krava/
OK
make: Leaving directory '/home/acme/git/linux/tools/perf'
$
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Alexander Shishkin, Alexis Berlemont, Al Viro, Colin King,
David Ahern, David Howells, Hemant Kumar, Jan Stancek, Jiri Olsa,
Kan Liang, kernel-janitors, Krister Johansen,
Luis Claudio Gonçalves, Masami Hiramatsu, Michael Ellerman,
Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
Wang Nan, Yao Jin, Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
Test results at the end of this message, as usual.
The following changes since commit 3906a13a6b4e78fbc0def03a808f091f0dff1b44:
Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-28 07:44:43 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170331
for you to fetch changes up to fd5cead23f54697310bd565aa2a23ae5128080a0:
perf trace: Beautify statx syscall 'flag' and 'mask' arguments (2017-03-31 14:42:31 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
New features:
- Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo)
e.g.:
System wide strace like session:
# trace -e statx
16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
36050.891 ( 0.007 ms): statx/4576 statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
^C#
User visible:
- Handle unpaired raw_syscalls:sys_exit events in 'perf trace', i.e. we
shouldn't try to calculate duration or print the timestamp for a missing
matching raw_syscalls:sys_enter (Arnaldo Carvalho de Melo)
- Do not print "cycles: 0" in perf report LBR lines in platforms not
supporting 'cycles', such as Intel's Broadwell (Jin Yao)
- Handle missing $HOME env var (Jiri Olsa)
- Map 8-bit registers (al, bl, etc), not supported in uprobes_events, to
the next best thing (ax, bx, etc) supported (Ravi Bangoria)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (4):
perf tools: Remove support for command aliases
perf trace: Handle unpaired raw_syscalls:sys_exit event
tools include uapi: Grab copies of stat.h and fcntl.h
perf trace: Beautify statx syscall 'flag' and 'mask' arguments
Colin Ian King (1):
perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
Jin Yao (1):
perf report: Drop cycles 0 for LBR print
Jiri Olsa (1):
perf tools: Do not fail in case of empty HOME env variable
Ravi Bangoria (2):
perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
perf/sdt/x86: Move OP parser to tools/perf/arch/x86/
tools/include/linux/types.h | 1 +
tools/include/uapi/linux/fcntl.h | 72 +++++++++
tools/include/uapi/linux/stat.h | 176 ++++++++++++++++++++
tools/perf/Build | 1 +
tools/perf/MANIFEST | 2 +
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 +
tools/perf/arch/x86/util/perf_regs.c | 187 ++++++++++++++++++----
tools/perf/builtin-help.c | 13 --
tools/perf/builtin-trace.c | 57 ++++---
tools/perf/check-headers.sh | 2 +
tools/perf/perf.c | 97 +----------
tools/perf/trace/beauty/Build | 1 +
tools/perf/trace/beauty/beauty.h | 24 +++
tools/perf/trace/beauty/statx.c | 72 +++++++++
tools/perf/util/Build | 1 -
tools/perf/util/alias.c | 78 ---------
tools/perf/util/cache.h | 1 -
tools/perf/util/callchain.c | 111 ++++++++-----
tools/perf/util/config.c | 54 ++++---
tools/perf/util/help-unknown-cmd.c | 8 +-
tools/perf/util/hist.c | 2 +-
tools/perf/util/perf_regs.c | 6 +-
tools/perf/util/perf_regs.h | 11 +-
tools/perf/util/probe-file.c | 132 +++++----------
24 files changed, 707 insertions(+), 403 deletions(-)
create mode 100644 tools/include/uapi/linux/fcntl.h
create mode 100644 tools/include/uapi/linux/stat.h
create mode 100644 tools/perf/trace/beauty/Build
create mode 100644 tools/perf/trace/beauty/beauty.h
create mode 100644 tools/perf/trace/beauty/statx.c
delete mode 100644 tools/perf/util/alias.c
Test results:
The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.
For this specific pull request the samples/bpf/ was disabled, as 'make headers_install'
is failing with the following error, in this case in fedora:rawhide:
INSTALL usr/include/uapi/ (0 file)
/git/linux/scripts/Makefile.headersinst:62: *** Missing generated UAPI file ./arch/x86/include/generated/uapi/asm/unistd_32.h. Stop.
make[1]: *** [/git/linux/Makefile:1151: headers_install] Error 2
make[1]: Leaving directory '/tmp/build/linux'
make: *** [Makefile:152: sub-make] Error 2
make: Leaving directory '/git/linux'
I'll investigate later, perf and objtool builds just fine, with clang and gcc.
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
2 alpine:3.5: Ok
3 alpine:edge: Ok
4 android-ndk:r12b-arm: Ok
5 archlinux:latest: Ok
6 centos:5: Ok
7 centos:6: Ok
8 centos:7: Ok
9 debian:7: Ok
10 debian:8: Ok
11 debian:9: Ok
12 debian:experimental: Ok
13 debian:experimental-x-arm64: Ok
14 debian:experimental-x-mips: Ok
15 debian:experimental-x-mips64: Ok
16 debian:experimental-x-mipsel: Ok
17 fedora:20: Ok
18 fedora:21: Ok
19 fedora:22: Ok
20 fedora:23: Ok
21 fedora:24: Ok
22 fedora:24-x-ARC-uClibc: Ok
23 fedora:25: Ok
24 fedora:rawhide: Ok
25 mageia:5: Ok
26 opensuse:13.2: Ok
27 opensuse:42.1: Ok
28 opensuse:tumbleweed: Ok
29 ubuntu:12.04.5: Ok
30 ubuntu:14.04.4: Ok
31 ubuntu:14.04.4-x-linaro-arm64: Ok
32 ubuntu:15.10: Ok
33 ubuntu:16.04: Ok
34 ubuntu:16.04-x-arm: Ok
35 ubuntu:16.04-x-arm64: Ok
36 ubuntu:16.04-x-powerpc: Ok
37 ubuntu:16.04-x-powerpc64: Ok
38 ubuntu:16.04-x-s390: Ok
39 ubuntu:16.10: Ok
40 ubuntu:17.04: Ok
#
# uname -a
Linux jouet 4.11.0-rc2+ #5 SMP Mon Mar 20 18:12:29 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
# 'perf test tsc' already fixed by peterz in tip
# 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: Parse event definition strings : Ok
6: Simple expression parser : Ok
7: PERF_RECORD_* events & perf_sample fields : Ok
8: Parse perf pmu format : Ok
9: DSO data read : Ok
10: DSO data cache : Ok
11: DSO data reopen : Ok
12: Roundtrip evsel->name : Ok
13: Parse sched tracepoints fields : Ok
14: syscalls:sys_enter_openat event fields : Ok
15: Setup struct perf_event_attr : Ok
16: Match and link multiple hists : Ok
17: 'import perf' in python : Ok
18: Breakpoint overflow signal handler : Ok
19: Breakpoint overflow sampling : Ok
20: Number of exit events of a simple workload : Ok
21: Software clock events period values : Ok
22: Object code reading : Ok
23: Sample parsing : Ok
24: Use a dummy software event to keep tracking: Ok
25: Parse with no sample_id_all bit set : Ok
26: Filter hist entries : Ok
27: Lookup mmap thread : Ok
28: Share thread mg : Ok
29: Sort output of hist entries : Ok
30: Cumulate child hist entries : Ok
31: Track with sched_switch : Ok
32: Filter fds with revents mask in a fdarray : Ok
33: Add fd to a fdarray, making it autogrow : Ok
34: kmod_path__parse : Ok
35: Thread map : Ok
36: LLVM search and compile :
36.1: Basic BPF llvm compile : Ok
36.2: kbuild searching : Ok
36.3: Compile source for BPF prologue generation: Ok
36.4: Compile source for BPF relocation : Ok
37: Session topology : Ok
38: BPF filter :
38.1: Basic BPF filtering : Ok
38.2: BPF pinning : Ok
38.3: BPF prologue generation : Ok
38.4: BPF relocation checker : Ok
39: Synthesize thread map : Ok
40: Remove thread map : Ok
41: Synthesize cpu map : Ok
42: Synthesize stat config : Ok
43: Synthesize stat : Ok
44: Synthesize stat round : Ok
45: Synthesize attr update : Ok
46: Event times : Ok
47: Read backward ring buffer : Ok
48: Print cpu map : Ok
49: Probe SDT events : Ok
50: is_printable_array : Ok
51: Print bitmap : Ok
52: perf hooks : Ok
53: builtin clang support : Skip (not compiled in)
54: unit_number__scnprintf : Ok
55: x86 rdpmc : Ok
56: Convert perf time to TSC : FAILED!
57: DWARF unwind : Ok
58: x86 instruction decoder - new instructions : Ok
59: Intel cqm nmi context read : Skip
$ make -C tools/perf build-test
make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
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_no_gtk2_O: make NO_GTK2=1
make_no_newt_O: make NO_NEWT=1
make_debug_O: make DEBUG=1
make_no_backtrace_O: make NO_BACKTRACE=1
make_with_clangllvm_O: make LIBCLANGLLVM=1
make_tags_O: make tags
make_no_demangle_O: make NO_DEMANGLE=1
make_install_bin_O: make install-bin
make_no_libpython_O: make NO_LIBPYTHON=1
make_no_slang_O: make NO_SLANG=1
make_no_auxtrace_O: make NO_AUXTRACE=1
make_util_pmu_bison_o_O: make util/pmu-bison.o
make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
make_no_libbpf_O: make NO_LIBBPF=1
make_with_babeltrace_O: make LIBBABELTRACE=1
make_util_map_o_O: make util/map.o
make_static_O: make LDFLAGS=-static
make_help_O: make help
make_pure_O: make
make_perf_o_O: make perf.o
make_no_libnuma_O: make NO_LIBNUMA=1
make_no_libperl_O: make NO_LIBPERL=1
make_no_libunwind_O: make NO_LIBUNWIND=1
make_no_libbionic_O: make NO_LIBBIONIC=1
make_doc_O: make doc
make_no_libelf_O: make NO_LIBELF=1
make_clean_all_O: make clean all
make_install_prefix_O: make install prefix=/tmp/krava
make_no_libaudit_O: make NO_LIBAUDIT=1
make_install_O: make install
make_install_prefix_slash_O: make install prefix=/tmp/krava/
OK
make: Leaving directory '/home/acme/git/linux/tools/perf'
$
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 1/9] perf tools: Remove support for command aliases
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
David Ahern, Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
This came from 'git', but isn't documented anywhere in
tools/perf/Documentation/, looks like baggage we can do without, ditch
it.
Cc: Adrian Hunter <adrian.hunter@intel.com>
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: http://lkml.kernel.org/n/tip-e7uwkn60t4hmlnwj99ba4t2s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-help.c | 13 -----
tools/perf/perf.c | 97 +++-----------------------------------
tools/perf/util/Build | 1 -
tools/perf/util/alias.c | 78 ------------------------------
tools/perf/util/cache.h | 1 -
tools/perf/util/help-unknown-cmd.c | 8 +---
6 files changed, 8 insertions(+), 190 deletions(-)
delete mode 100644 tools/perf/util/alias.c
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 7ae238929e95..1eec96a0fa67 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -301,12 +301,6 @@ void list_common_cmds_help(void)
}
}
-static int is_perf_command(const char *s)
-{
- return is_in_cmdlist(&main_cmds, s) ||
- is_in_cmdlist(&other_cmds, s);
-}
-
static const char *cmd_to_page(const char *perf_cmd)
{
char *s;
@@ -446,7 +440,6 @@ int cmd_help(int argc, const char **argv)
"perf help [--all] [--man|--web|--info] [command]",
NULL
};
- const char *alias;
int rc;
load_command_list("perf-", &main_cmds, &other_cmds);
@@ -472,12 +465,6 @@ int cmd_help(int argc, const char **argv)
return 0;
}
- alias = alias_lookup(argv[0]);
- if (alias && !is_perf_command(argv[0])) {
- printf("`perf %s' is aliased to `%s'\n", argv[0], alias);
- return 0;
- }
-
switch (help_format) {
case HELP_FORMAT_MAN:
rc = show_man_page(argv[0]);
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 4b283d18e158..9217f2227f3d 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -267,71 +267,6 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
return handled;
}
-static int handle_alias(int *argcp, const char ***argv)
-{
- int envchanged = 0, ret = 0, saved_errno = errno;
- int count, option_count;
- const char **new_argv;
- const char *alias_command;
- char *alias_string;
-
- alias_command = (*argv)[0];
- alias_string = alias_lookup(alias_command);
- if (alias_string) {
- if (alias_string[0] == '!') {
- if (*argcp > 1) {
- struct strbuf buf;
-
- if (strbuf_init(&buf, PATH_MAX) < 0 ||
- strbuf_addstr(&buf, alias_string) < 0 ||
- sq_quote_argv(&buf, (*argv) + 1,
- PATH_MAX) < 0)
- die("Failed to allocate memory.");
- free(alias_string);
- alias_string = buf.buf;
- }
- ret = system(alias_string + 1);
- if (ret >= 0 && WIFEXITED(ret) &&
- WEXITSTATUS(ret) != 127)
- exit(WEXITSTATUS(ret));
- die("Failed to run '%s' when expanding alias '%s'",
- alias_string + 1, alias_command);
- }
- count = split_cmdline(alias_string, &new_argv);
- if (count < 0)
- die("Bad alias.%s string", alias_command);
- option_count = handle_options(&new_argv, &count, &envchanged);
- if (envchanged)
- die("alias '%s' changes environment variables\n"
- "You can use '!perf' in the alias to do this.",
- alias_command);
- memmove(new_argv - option_count, new_argv,
- count * sizeof(char *));
- new_argv -= option_count;
-
- if (count < 1)
- die("empty alias for %s", alias_command);
-
- if (!strcmp(alias_command, new_argv[0]))
- die("recursive alias: %s", alias_command);
-
- new_argv = realloc(new_argv, sizeof(char *) *
- (count + *argcp + 1));
- /* insert after command name */
- memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
- new_argv[count + *argcp] = NULL;
-
- *argv = new_argv;
- *argcp += count - 1;
-
- ret = 1;
- }
-
- errno = saved_errno;
-
- return ret;
-}
-
#define RUN_SETUP (1<<0)
#define USE_PAGER (1<<1)
@@ -455,25 +390,12 @@ static void execv_dashed_external(const char **argv)
static int run_argv(int *argcp, const char ***argv)
{
- int done_alias = 0;
-
- while (1) {
- /* See if it's an internal command */
- handle_internal_command(*argcp, *argv);
-
- /* .. then try the external ones */
- execv_dashed_external(*argv);
+ /* See if it's an internal command */
+ handle_internal_command(*argcp, *argv);
- /* It could be an alias -- this works around the insanity
- * of overriding "perf log" with "perf show" by having
- * alias.log = show
- */
- if (done_alias || !handle_alias(argcp, argv))
- break;
- done_alias = 1;
- }
-
- return done_alias;
+ /* .. then try the external ones */
+ execv_dashed_external(*argv);
+ return 0;
}
static void pthread__block_sigwinch(void)
@@ -606,17 +528,12 @@ int main(int argc, const char **argv)
while (1) {
static int done_help;
- int was_alias = run_argv(&argc, &argv);
+
+ run_argv(&argc, &argv);
if (errno != ENOENT)
break;
- if (was_alias) {
- fprintf(stderr, "Expansion of alias '%s' failed; "
- "'%s' is not a perf-command\n",
- cmd, argv[0]);
- goto out;
- }
if (!done_help) {
cmd = argv[0] = help_unknown_cmd(cmd);
done_help = 1;
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 2ae92da613dd..5c0ea11a8f0a 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -1,4 +1,3 @@
-libperf-y += alias.o
libperf-y += annotate.o
libperf-y += block-range.o
libperf-y += build-id.o
diff --git a/tools/perf/util/alias.c b/tools/perf/util/alias.c
deleted file mode 100644
index 6455471d9cd1..000000000000
--- a/tools/perf/util/alias.c
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "cache.h"
-#include "util.h"
-#include "config.h"
-
-static const char *alias_key;
-static char *alias_val;
-
-static int alias_lookup_cb(const char *k, const char *v,
- void *cb __maybe_unused)
-{
- if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
- if (!v)
- return config_error_nonbool(k);
- alias_val = strdup(v);
- return 0;
- }
- return 0;
-}
-
-char *alias_lookup(const char *alias)
-{
- alias_key = alias;
- alias_val = NULL;
- perf_config(alias_lookup_cb, NULL);
- return alias_val;
-}
-
-int split_cmdline(char *cmdline, const char ***argv)
-{
- int src, dst, count = 0, size = 16;
- char quoted = 0;
-
- *argv = malloc(sizeof(char*) * size);
-
- /* split alias_string */
- (*argv)[count++] = cmdline;
- for (src = dst = 0; cmdline[src];) {
- char c = cmdline[src];
- if (!quoted && isspace(c)) {
- cmdline[dst++] = 0;
- while (cmdline[++src]
- && isspace(cmdline[src]))
- ; /* skip */
- if (count >= size) {
- size += 16;
- *argv = realloc(*argv, sizeof(char*) * size);
- }
- (*argv)[count++] = cmdline + dst;
- } else if (!quoted && (c == '\'' || c == '"')) {
- quoted = c;
- src++;
- } else if (c == quoted) {
- quoted = 0;
- src++;
- } else {
- if (c == '\\' && quoted != '\'') {
- src++;
- c = cmdline[src];
- if (!c) {
- zfree(argv);
- return error("cmdline ends with \\");
- }
- }
- cmdline[dst++] = c;
- src++;
- }
- }
-
- cmdline[dst] = 0;
-
- if (quoted) {
- zfree(argv);
- return error("unclosed quote");
- }
-
- return count;
-}
-
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 512c0c83fbc6..0328f297a748 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -15,7 +15,6 @@
#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
-char *alias_lookup(const char *alias);
int split_cmdline(char *cmdline, const char ***argv);
#define alloc_nr(x) (((x)+16)*3/2)
diff --git a/tools/perf/util/help-unknown-cmd.c b/tools/perf/util/help-unknown-cmd.c
index 2821f8d77e52..34201440ac03 100644
--- a/tools/perf/util/help-unknown-cmd.c
+++ b/tools/perf/util/help-unknown-cmd.c
@@ -6,16 +6,12 @@
#include "levenshtein.h"
static int autocorrect;
-static struct cmdnames aliases;
static int perf_unknown_cmd_config(const char *var, const char *value,
void *cb __maybe_unused)
{
if (!strcmp(var, "help.autocorrect"))
autocorrect = perf_config_int(var,value);
- /* Also use aliases for command lookup */
- if (!prefixcmp(var, "alias."))
- add_cmdname(&aliases, var + 6, strlen(var + 6));
return 0;
}
@@ -59,14 +55,12 @@ const char *help_unknown_cmd(const char *cmd)
memset(&main_cmds, 0, sizeof(main_cmds));
memset(&other_cmds, 0, sizeof(main_cmds));
- memset(&aliases, 0, sizeof(aliases));
perf_config(perf_unknown_cmd_config, NULL);
load_command_list("perf-", &main_cmds, &other_cmds);
- if (add_cmd_list(&main_cmds, &aliases) < 0 ||
- add_cmd_list(&main_cmds, &other_cmds) < 0) {
+ if (add_cmd_list(&main_cmds, &other_cmds) < 0) {
fprintf(stderr, "ERROR: Failed to allocate command list for unknown command.\n");
goto end;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 2/9] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
(?)
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Ravi Bangoria, Alexander Shishkin,
Alexis Berlemont, Hemant Kumar, Michael Ellerman, Naveen N . Rao,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
I found couple of events using al, bl, cl and dl registers for argument.
These are not directly accepted by uprobe_events and thus needs to be
mapped to ax, bx, cx and dx respectively.
Few ex,
/usr/bin/qemu-system-s390x
css_adapter_interrupt: 1@%bl
css_chpid_add: 1@%cl 1@%sil 1@%dl
dma_bdrv_io: 8@%rbx 8@%rbp -8@%r14 1@%al
/usr/bin/postgres
buffer__read__done: ... -1@-bash -1@%al
buffer__read__start: ... -1@%al
I don't find any sdt events using ah, bh,... registers. But I also don't
see any reason to not use them, so there might be rare events using
these registers, and if so, perf should have a renaming logic for them
too.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170328094754.3156-2-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/x86/util/perf_regs.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c
index d8a8dcf761f7..fa1fd196837d 100644
--- a/tools/perf/arch/x86/util/perf_regs.c
+++ b/tools/perf/arch/x86/util/perf_regs.c
@@ -40,12 +40,20 @@ struct sdt_name_reg {
static const struct sdt_name_reg sdt_reg_renamings[] = {
SDT_NAME_REG(eax, ax),
SDT_NAME_REG(rax, ax),
+ SDT_NAME_REG(al, ax),
+ SDT_NAME_REG(ah, ax),
SDT_NAME_REG(ebx, bx),
SDT_NAME_REG(rbx, bx),
+ SDT_NAME_REG(bl, bx),
+ SDT_NAME_REG(bh, bx),
SDT_NAME_REG(ecx, cx),
SDT_NAME_REG(rcx, cx),
+ SDT_NAME_REG(cl, cx),
+ SDT_NAME_REG(ch, cx),
SDT_NAME_REG(edx, dx),
SDT_NAME_REG(rdx, dx),
+ SDT_NAME_REG(dl, dx),
+ SDT_NAME_REG(dh, dx),
SDT_NAME_REG(esi, si),
SDT_NAME_REG(rsi, si),
SDT_NAME_REG(sil, si),
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 3/9] perf/sdt/x86: Move OP parser to tools/perf/arch/x86/
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Ravi Bangoria, Alexander Shishkin,
Alexis Berlemont, Hemant Kumar, Michael Ellerman, Naveen N . Rao,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
SDT marker argument is in N@OP format. N is the size of argument and OP
is the actual assembly operand. OP is arch dependent component and hence
it's parsing logic also should be placed under tools/perf/arch/.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170328094754.3156-3-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/x86/util/perf_regs.c | 179 ++++++++++++++++++++++++++++-------
tools/perf/util/perf_regs.c | 6 +-
tools/perf/util/perf_regs.h | 11 ++-
tools/perf/util/probe-file.c | 132 ++++++++------------------
4 files changed, 194 insertions(+), 134 deletions(-)
diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c
index fa1fd196837d..3bf3548c5e2d 100644
--- a/tools/perf/arch/x86/util/perf_regs.c
+++ b/tools/perf/arch/x86/util/perf_regs.c
@@ -1,8 +1,10 @@
#include <string.h>
+#include <regex.h>
#include "../../perf.h"
#include "../../util/util.h"
#include "../../util/perf_regs.h"
+#include "../../util/debug.h"
const struct sample_reg sample_reg_masks[] = {
SMPL_REG(AX, PERF_REG_X86_AX),
@@ -37,7 +39,7 @@ struct sdt_name_reg {
#define SDT_NAME_REG(n, m) {.sdt_name = "%" #n, .uprobe_name = "%" #m}
#define SDT_NAME_REG_END {.sdt_name = NULL, .uprobe_name = NULL}
-static const struct sdt_name_reg sdt_reg_renamings[] = {
+static const struct sdt_name_reg sdt_reg_tbl[] = {
SDT_NAME_REG(eax, ax),
SDT_NAME_REG(rax, ax),
SDT_NAME_REG(al, ax),
@@ -95,45 +97,158 @@ static const struct sdt_name_reg sdt_reg_renamings[] = {
SDT_NAME_REG_END,
};
-int sdt_rename_register(char **pdesc, char *old_name)
+/*
+ * Perf only supports OP which is in +/-NUM(REG) form.
+ * Here plus-minus sign, NUM and parenthesis are optional,
+ * only REG is mandatory.
+ *
+ * SDT events also supports indirect addressing mode with a
+ * symbol as offset, scaled mode and constants in OP. But
+ * perf does not support them yet. Below are few examples.
+ *
+ * OP with scaled mode:
+ * (%rax,%rsi,8)
+ * 10(%ras,%rsi,8)
+ *
+ * OP with indirect addressing mode:
+ * check_action(%rip)
+ * mp_+52(%rip)
+ * 44+mp_(%rip)
+ *
+ * OP with constant values:
+ * $0
+ * $123
+ * $-1
+ */
+#define SDT_OP_REGEX "^([+\\-]?)([0-9]*)(\\(?)(%[a-z][a-z0-9]+)(\\)?)$"
+
+static regex_t sdt_op_regex;
+
+static int sdt_init_op_regex(void)
{
- const struct sdt_name_reg *rnames = sdt_reg_renamings;
- char *new_desc, *old_desc = *pdesc;
- size_t prefix_len, sdt_len, uprobe_len, old_desc_len, offset;
- int ret = -1;
-
- while (ret != 0 && rnames->sdt_name != NULL) {
- sdt_len = strlen(rnames->sdt_name);
- ret = strncmp(old_name, rnames->sdt_name, sdt_len);
- rnames += !!ret;
- }
+ static int initialized;
+ int ret = 0;
- if (rnames->sdt_name == NULL)
+ if (initialized)
return 0;
- sdt_len = strlen(rnames->sdt_name);
- uprobe_len = strlen(rnames->uprobe_name);
- old_desc_len = strlen(old_desc) + 1;
+ ret = regcomp(&sdt_op_regex, SDT_OP_REGEX, REG_EXTENDED);
+ if (ret < 0) {
+ pr_debug4("Regex compilation error.\n");
+ return ret;
+ }
- new_desc = zalloc(old_desc_len + uprobe_len - sdt_len);
- if (new_desc == NULL)
- return -1;
+ initialized = 1;
+ return 0;
+}
- /* Copy the chars before the register name (at least '%') */
- prefix_len = old_name - old_desc;
- memcpy(new_desc, old_desc, prefix_len);
+/*
+ * Max x86 register name length is 5(ex: %r15d). So, 6th char
+ * should always contain NULL. This helps to find register name
+ * length using strlen, insted of maintaing one more variable.
+ */
+#define SDT_REG_NAME_SIZE 6
- /* Copy the new register name */
- memcpy(new_desc + prefix_len, rnames->uprobe_name, uprobe_len);
+/*
+ * The uprobe parser does not support all gas register names;
+ * so, we have to replace them (ex. for x86_64: %rax -> %ax).
+ * Note: If register does not require renaming, just copy
+ * paste as it is, but don't leave it empty.
+ */
+static void sdt_rename_register(char *sdt_reg, int sdt_len, char *uprobe_reg)
+{
+ int i = 0;
- /* Copy the chars after the register name (if need be) */
- offset = prefix_len + sdt_len;
- if (offset < old_desc_len)
- memcpy(new_desc + prefix_len + uprobe_len,
- old_desc + offset, old_desc_len - offset);
+ for (i = 0; sdt_reg_tbl[i].sdt_name != NULL; i++) {
+ if (!strncmp(sdt_reg_tbl[i].sdt_name, sdt_reg, sdt_len)) {
+ strcpy(uprobe_reg, sdt_reg_tbl[i].uprobe_name);
+ return;
+ }
+ }
- free(old_desc);
- *pdesc = new_desc;
+ strncpy(uprobe_reg, sdt_reg, sdt_len);
+}
- return 0;
+int arch_sdt_arg_parse_op(char *old_op, char **new_op)
+{
+ char new_reg[SDT_REG_NAME_SIZE] = {0};
+ int new_len = 0, ret;
+ /*
+ * rm[0]: +/-NUM(REG)
+ * rm[1]: +/-
+ * rm[2]: NUM
+ * rm[3]: (
+ * rm[4]: REG
+ * rm[5]: )
+ */
+ regmatch_t rm[6];
+ /*
+ * Max prefix length is 2 as it may contains sign(+/-)
+ * and displacement 0 (Both sign and displacement 0 are
+ * optional so it may be empty). Use one more character
+ * to hold last NULL so that strlen can be used to find
+ * prefix length, instead of maintaing one more variable.
+ */
+ char prefix[3] = {0};
+
+ ret = sdt_init_op_regex();
+ if (ret < 0)
+ return ret;
+
+ /*
+ * If unsupported OR does not match with regex OR
+ * register name too long, skip it.
+ */
+ if (strchr(old_op, ',') || strchr(old_op, '$') ||
+ regexec(&sdt_op_regex, old_op, 6, rm, 0) ||
+ rm[4].rm_eo - rm[4].rm_so > SDT_REG_NAME_SIZE) {
+ pr_debug4("Skipping unsupported SDT argument: %s\n", old_op);
+ return SDT_ARG_SKIP;
+ }
+
+ /*
+ * Prepare prefix.
+ * If SDT OP has parenthesis but does not provide
+ * displacement, add 0 for displacement.
+ * SDT Uprobe Prefix
+ * -----------------------------
+ * +24(%rdi) +24(%di) +
+ * 24(%rdi) +24(%di) +
+ * %rdi %di
+ * (%rdi) +0(%di) +0
+ * -80(%rbx) -80(%bx) -
+ */
+ if (rm[3].rm_so != rm[3].rm_eo) {
+ if (rm[1].rm_so != rm[1].rm_eo)
+ prefix[0] = *(old_op + rm[1].rm_so);
+ else if (rm[2].rm_so != rm[2].rm_eo)
+ prefix[0] = '+';
+ else
+ strncpy(prefix, "+0", 2);
+ }
+
+ /* Rename register */
+ sdt_rename_register(old_op + rm[4].rm_so, rm[4].rm_eo - rm[4].rm_so,
+ new_reg);
+
+ /* Prepare final OP which should be valid for uprobe_events */
+ new_len = strlen(prefix) +
+ (rm[2].rm_eo - rm[2].rm_so) +
+ (rm[3].rm_eo - rm[3].rm_so) +
+ strlen(new_reg) +
+ (rm[5].rm_eo - rm[5].rm_so) +
+ 1; /* NULL */
+
+ *new_op = zalloc(new_len);
+ if (!*new_op)
+ return -ENOMEM;
+
+ scnprintf(*new_op, new_len, "%.*s%.*s%.*s%.*s%.*s",
+ strlen(prefix), prefix,
+ (int)(rm[2].rm_eo - rm[2].rm_so), old_op + rm[2].rm_so,
+ (int)(rm[3].rm_eo - rm[3].rm_so), old_op + rm[3].rm_so,
+ strlen(new_reg), new_reg,
+ (int)(rm[5].rm_eo - rm[5].rm_so), old_op + rm[5].rm_so);
+
+ return SDT_ARG_VALID;
}
diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c
index a37e5934aa2a..b2ae039eff85 100644
--- a/tools/perf/util/perf_regs.c
+++ b/tools/perf/util/perf_regs.c
@@ -6,10 +6,10 @@ const struct sample_reg __weak sample_reg_masks[] = {
SMPL_REG_END
};
-int __weak sdt_rename_register(char **pdesc __maybe_unused,
- char *old_name __maybe_unused)
+int __weak arch_sdt_arg_parse_op(char *old_op __maybe_unused,
+ char **new_op __maybe_unused)
{
- return 0;
+ return SDT_ARG_SKIP;
}
#ifdef HAVE_PERF_REGS_SUPPORT
diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
index 7544a157e159..32b37d19dcc3 100644
--- a/tools/perf/util/perf_regs.h
+++ b/tools/perf/util/perf_regs.h
@@ -15,11 +15,12 @@ struct sample_reg {
extern const struct sample_reg sample_reg_masks[];
-/*
- * The table sdt_reg_renamings is used for adjusting gcc/gas-generated
- * registers before filling the uprobe tracer interface.
- */
-int sdt_rename_register(char **pdesc, char *old_name);
+enum {
+ SDT_ARG_VALID = 0,
+ SDT_ARG_SKIP,
+};
+
+int arch_sdt_arg_parse_op(char *old_op, char **new_op);
#ifdef HAVE_PERF_REGS_SUPPORT
#include <perf_regs.h>
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index d741634cbfc0..88714dec8912 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -694,10 +694,29 @@ static const char * const type_to_suffix[] = {
"", ":u8", ":u16", "", ":u32", "", "", "", ":u64"
};
+/*
+ * Isolate the string number and convert it into a decimal value;
+ * this will be an index to get suffix of the uprobe name (defining
+ * the type)
+ */
+static int sdt_arg_parse_size(char *n_ptr, const char **suffix)
+{
+ long type_idx;
+
+ type_idx = strtol(n_ptr, NULL, 10);
+ if (type_idx < -8 || type_idx > 8) {
+ pr_debug4("Failed to get a valid sdt type\n");
+ return -1;
+ }
+
+ *suffix = type_to_suffix[type_idx + 8];
+ return 0;
+}
+
static int synthesize_sdt_probe_arg(struct strbuf *buf, int i, const char *arg)
{
- char *tmp, *desc = strdup(arg);
- const char *prefix = "", *suffix = "";
+ char *op, *desc = strdup(arg), *new_op = NULL;
+ const char *suffix = "";
int ret = -1;
if (desc == NULL) {
@@ -705,112 +724,37 @@ static int synthesize_sdt_probe_arg(struct strbuf *buf, int i, const char *arg)
return ret;
}
- tmp = strchr(desc, '@');
- if (tmp) {
- long type_idx;
- /*
- * Isolate the string number and convert it into a
- * binary value; this will be an index to get suffix
- * of the uprobe name (defining the type)
- */
- tmp[0] = '\0';
- type_idx = strtol(desc, NULL, 10);
- /* Check that the conversion went OK */
- if (type_idx == LONG_MIN || type_idx == LONG_MAX) {
- pr_debug4("Failed to parse sdt type\n");
- goto error;
- }
- /* Check that the converted value is OK */
- if (type_idx < -8 || type_idx > 8) {
- pr_debug4("Failed to get a valid sdt type\n");
- goto error;
- }
- suffix = type_to_suffix[type_idx + 8];
- /* Get rid of the sdt prefix which is now useless */
- tmp++;
- memmove(desc, tmp, strlen(tmp) + 1);
- }
-
/*
- * The uprobe tracer format does not support all the
- * addressing modes (notably: in x86 the scaled mode); so, we
- * detect ',' characters, if there is just one, there is no
- * use converting the sdt arg into a uprobe one.
+ * Argument is in N@OP format. N is size of the argument and OP is
+ * the actual assembly operand. N can be omitted; in that case
+ * argument is just OP(without @).
*/
- if (strchr(desc, ',')) {
- pr_debug4("Skipping unsupported SDT argument; %s\n", desc);
- goto out;
- }
+ op = strchr(desc, '@');
+ if (op) {
+ op[0] = '\0';
+ op++;
- /*
- * If the argument addressing mode is indirect, we must check
- * a few things...
- */
- tmp = strchr(desc, '(');
- if (tmp) {
- int j;
-
- /*
- * ...if the addressing mode is indirect with a
- * positive offset (ex.: "1608(%ax)"), we need to add
- * a '+' prefix so as to be compliant with uprobe
- * format.
- */
- if (desc[0] != '+' && desc[0] != '-')
- prefix = "+";
-
- /*
- * ...or if the addressing mode is indirect with a symbol
- * as offset, the argument will not be supported by
- * the uprobe tracer format; so, let's skip this one.
- */
- for (j = 0; j < tmp - desc; j++) {
- if (desc[j] != '+' && desc[j] != '-' &&
- !isdigit(desc[j])) {
- pr_debug4("Skipping unsupported SDT argument; "
- "%s\n", desc);
- goto out;
- }
- }
+ if (sdt_arg_parse_size(desc, &suffix))
+ goto error;
+ } else {
+ op = desc;
}
- /*
- * The uprobe tracer format does not support constants; if we
- * find one in the current argument, let's skip the argument.
- */
- if (strchr(desc, '$')) {
- pr_debug4("Skipping unsupported SDT argument; %s\n", desc);
- goto out;
- }
+ ret = arch_sdt_arg_parse_op(op, &new_op);
- /*
- * The uprobe parser does not support all gas register names;
- * so, we have to replace them (ex. for x86_64: %rax -> %ax);
- * the loop below looks for the register names (starting with
- * a '%' and tries to perform the needed renamings.
- */
- tmp = strchr(desc, '%');
- while (tmp) {
- size_t offset = tmp - desc;
+ if (ret < 0)
+ goto error;
- ret = sdt_rename_register(&desc, desc + offset);
+ if (ret == SDT_ARG_VALID) {
+ ret = strbuf_addf(buf, " arg%d=%s%s", i + 1, new_op, suffix);
if (ret < 0)
goto error;
-
- /*
- * The desc pointer might have changed; so, let's not
- * try to reuse tmp for next lookup
- */
- tmp = strchr(desc + offset + 1, '%');
}
- if (strbuf_addf(buf, " arg%d=%s%s%s", i + 1, prefix, desc, suffix) < 0)
- goto error;
-
-out:
ret = 0;
error:
free(desc);
+ free(new_op);
return ret;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 4/9] perf report: Drop cycles 0 for LBR print
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Jin Yao, Jiri Olsa, Kan Liang, Arnaldo Carvalho de Melo
From: Jin Yao <yao.jin@linux.intel.com>
For some platforms, for example Broadwell, it doesn't support cycles
for LBR. But the perf always prints cycles:0, it's not necessary.
The patch refactors the LBR info print code and drops the cycles:0.
For example: perf report --branch-history --no-children --stdio
On Broadwell:
--0.91%--__random_r random_r.c:394 (iterations:2)
__random_r random_r.c:360 (predicted:0.0%)
__random_r random_r.c:380 (predicted:0.0%)
__random_r random_r.c:357
On Skylake:
--1.07%--main div.c:39 (predicted:52.4% cycles:1 iterations:17)
main div.c:44 (predicted:52.4% cycles:1)
main div.c:42 (cycles:2)
compute_flag div.c:28 (cycles:2)
compute_flag div.c:27 (cycles:1)
rand rand.c:28 (cycles:1)
rand rand.c:28 (cycles:1)
__random random.c:298 (cycles:1)
__random random.c:297 (cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (cycles:1)
Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/r/1489046786-10061-1-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/callchain.c | 111 +++++++++++++++++++++++++++++---------------
1 file changed, 74 insertions(+), 37 deletions(-)
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index d78776a20e80..3cea1fb5404b 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1105,63 +1105,100 @@ int callchain_branch_counts(struct callchain_root *root,
cycles_count);
}
-static int callchain_counts_printf(FILE *fp, char *bf, int bfsize,
- u64 branch_count, u64 predicted_count,
- u64 abort_count, u64 cycles_count,
- u64 iter_count, u64 samples_count)
+static int counts_str_build(char *bf, int bfsize,
+ u64 branch_count, u64 predicted_count,
+ u64 abort_count, u64 cycles_count,
+ u64 iter_count, u64 samples_count)
{
double predicted_percent = 0.0;
const char *null_str = "";
char iter_str[32];
- char *str;
- u64 cycles = 0;
-
- if (branch_count == 0) {
- if (fp)
- return fprintf(fp, " (calltrace)");
+ char cycle_str[32];
+ char *istr, *cstr;
+ u64 cycles;
+ if (branch_count == 0)
return scnprintf(bf, bfsize, " (calltrace)");
- }
+
+ cycles = cycles_count / branch_count;
if (iter_count && samples_count) {
- scnprintf(iter_str, sizeof(iter_str),
- ", iterations:%" PRId64 "",
- iter_count / samples_count);
- str = iter_str;
+ if (cycles > 0)
+ scnprintf(iter_str, sizeof(iter_str),
+ " iterations:%" PRId64 "",
+ iter_count / samples_count);
+ else
+ scnprintf(iter_str, sizeof(iter_str),
+ "iterations:%" PRId64 "",
+ iter_count / samples_count);
+ istr = iter_str;
+ } else
+ istr = (char *)null_str;
+
+ if (cycles > 0) {
+ scnprintf(cycle_str, sizeof(cycle_str),
+ "cycles:%" PRId64 "", cycles);
+ cstr = cycle_str;
} else
- str = (char *)null_str;
+ cstr = (char *)null_str;
predicted_percent = predicted_count * 100.0 / branch_count;
- cycles = cycles_count / branch_count;
- if ((predicted_percent >= 100.0) && (abort_count == 0)) {
- if (fp)
- return fprintf(fp, " (cycles:%" PRId64 "%s)",
- cycles, str);
+ if ((predicted_count == branch_count) && (abort_count == 0)) {
+ if ((cycles > 0) || (istr != (char *)null_str))
+ return scnprintf(bf, bfsize, " (%s%s)", cstr, istr);
+ else
+ return scnprintf(bf, bfsize, "%s", (char *)null_str);
+ }
- return scnprintf(bf, bfsize, " (cycles:%" PRId64 "%s)",
- cycles, str);
+ if ((predicted_count < branch_count) && (abort_count == 0)) {
+ if ((cycles > 0) || (istr != (char *)null_str))
+ return scnprintf(bf, bfsize,
+ " (predicted:%.1f%% %s%s)",
+ predicted_percent, cstr, istr);
+ else {
+ return scnprintf(bf, bfsize,
+ " (predicted:%.1f%%)",
+ predicted_percent);
+ }
}
- if ((predicted_percent < 100.0) && (abort_count == 0)) {
- if (fp)
- return fprintf(fp,
- " (predicted:%.1f%%, cycles:%" PRId64 "%s)",
- predicted_percent, cycles, str);
+ if ((predicted_count == branch_count) && (abort_count > 0)) {
+ if ((cycles > 0) || (istr != (char *)null_str))
+ return scnprintf(bf, bfsize,
+ " (abort:%" PRId64 " %s%s)",
+ abort_count, cstr, istr);
+ else
+ return scnprintf(bf, bfsize,
+ " (abort:%" PRId64 ")",
+ abort_count);
+ }
+ if ((cycles > 0) || (istr != (char *)null_str))
return scnprintf(bf, bfsize,
- " (predicted:%.1f%%, cycles:%" PRId64 "%s)",
- predicted_percent, cycles, str);
- }
+ " (predicted:%.1f%% abort:%" PRId64 " %s%s)",
+ predicted_percent, abort_count, cstr, istr);
+
+ return scnprintf(bf, bfsize,
+ " (predicted:%.1f%% abort:%" PRId64 ")",
+ predicted_percent, abort_count);
+}
+
+static int callchain_counts_printf(FILE *fp, char *bf, int bfsize,
+ u64 branch_count, u64 predicted_count,
+ u64 abort_count, u64 cycles_count,
+ u64 iter_count, u64 samples_count)
+{
+ char str[128];
+
+ counts_str_build(str, sizeof(str), branch_count,
+ predicted_count, abort_count, cycles_count,
+ iter_count, samples_count);
if (fp)
- return fprintf(fp,
- " (predicted:%.1f%%, abort:%" PRId64 ", cycles:%" PRId64 "%s)",
- predicted_percent, abort_count, cycles, str);
+ return fprintf(fp, "%s", str);
- return scnprintf(bf, bfsize,
- " (predicted:%.1f%%, abort:%" PRId64 ", cycles:%" PRId64 "%s)",
- predicted_percent, abort_count, cycles, str);
+ return scnprintf(bf, bfsize, "%s", str);
}
int callchain_list_counts__printf_value(struct callchain_node *node,
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 5/9] perf trace: Handle unpaired raw_syscalls:sys_exit event
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
David Ahern, Jiri Olsa, Luis Claudio Gonçalves,
Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Which may happen when we start a tracing session and a thread is waiting
for something like "poll" to return, in which case we better print "?"
both for the syscall entry timestamp and for the duration.
E.g.:
Tracing existing mutt session:
# perf trace -p `pidof mutt`
? ( ? ): mutt/17135 ... [continued]: poll()) = 1
0.027 ( 0.013 ms): mutt/17135 read(buf: 0x7ffcb3c42cef, count: 1) = 1
0.047 ( 0.008 ms): mutt/17135 poll(ufds: 0x7ffcb3c42c50, nfds: 1, timeout_msecs: 1000) = 1
0.059 ( 0.008 ms): mutt/17135 read(buf: 0x7ffcb3c42cef, count: 1) = 1
<SNIP>
Before it would print a large number because we'd do:
ttrace->entry_time - trace->base_time
And entry_time would be 0, while base_time would be the timestamp for
the first event 'perf trace' reads, oops.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Claudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-wbcb93ofva2qdjd5ltn5eeqq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 43 ++++++++++++++++++++++++++++++++++---------
1 file changed, 34 insertions(+), 9 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c88f9f215e6f..7379792a6504 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -821,12 +821,21 @@ struct syscall {
void **arg_parm;
};
-static size_t fprintf_duration(unsigned long t, FILE *fp)
+/*
+ * We need to have this 'calculated' boolean because in some cases we really
+ * don't know what is the duration of a syscall, for instance, when we start
+ * a session and some threads are waiting for a syscall to finish, say 'poll',
+ * in which case all we can do is to print "( ? ) for duration and for the
+ * start timestamp.
+ */
+static size_t fprintf_duration(unsigned long t, bool calculated, FILE *fp)
{
double duration = (double)t / NSEC_PER_MSEC;
size_t printed = fprintf(fp, "(");
- if (duration >= 1.0)
+ if (!calculated)
+ printed += fprintf(fp, " ? ");
+ else if (duration >= 1.0)
printed += color_fprintf(fp, PERF_COLOR_RED, "%6.3f ms", duration);
else if (duration >= 0.01)
printed += color_fprintf(fp, PERF_COLOR_YELLOW, "%6.3f ms", duration);
@@ -1028,13 +1037,27 @@ static bool trace__filter_duration(struct trace *trace, double t)
return t < (trace->duration_filter * NSEC_PER_MSEC);
}
-static size_t trace__fprintf_tstamp(struct trace *trace, u64 tstamp, FILE *fp)
+static size_t __trace__fprintf_tstamp(struct trace *trace, u64 tstamp, FILE *fp)
{
double ts = (double)(tstamp - trace->base_time) / NSEC_PER_MSEC;
return fprintf(fp, "%10.3f ", ts);
}
+/*
+ * We're handling tstamp=0 as an undefined tstamp, i.e. like when we are
+ * using ttrace->entry_time for a thread that receives a sys_exit without
+ * first having received a sys_enter ("poll" issued before tracing session
+ * starts, lost sys_enter exit due to ring buffer overflow).
+ */
+static size_t trace__fprintf_tstamp(struct trace *trace, u64 tstamp, FILE *fp)
+{
+ if (tstamp > 0)
+ return __trace__fprintf_tstamp(trace, tstamp, fp);
+
+ return fprintf(fp, " ? ");
+}
+
static bool done = false;
static bool interrupted = false;
@@ -1045,10 +1068,10 @@ static void sig_handler(int sig)
}
static size_t trace__fprintf_entry_head(struct trace *trace, struct thread *thread,
- u64 duration, u64 tstamp, FILE *fp)
+ u64 duration, bool duration_calculated, u64 tstamp, FILE *fp)
{
size_t printed = trace__fprintf_tstamp(trace, tstamp, fp);
- printed += fprintf_duration(duration, fp);
+ printed += fprintf_duration(duration, duration_calculated, fp);
if (trace->multiple_threads) {
if (trace->show_comm)
@@ -1450,7 +1473,7 @@ static int trace__printf_interrupted_entry(struct trace *trace, struct perf_samp
duration = sample->time - ttrace->entry_time;
- printed = trace__fprintf_entry_head(trace, trace->current, duration, ttrace->entry_time, trace->output);
+ printed = trace__fprintf_entry_head(trace, trace->current, duration, true, ttrace->entry_time, trace->output);
printed += fprintf(trace->output, "%-70s) ...\n", ttrace->entry_str);
ttrace->entry_pending = false;
@@ -1497,7 +1520,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
if (sc->is_exit) {
if (!(trace->duration_filter || trace->summary_only || trace->min_stack)) {
- trace__fprintf_entry_head(trace, thread, 1, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, false, ttrace->entry_time, trace->output);
fprintf(trace->output, "%-70s)\n", ttrace->entry_str);
}
} else {
@@ -1545,6 +1568,7 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
{
long ret;
u64 duration = 0;
+ bool duration_calculated = false;
struct thread *thread;
int id = perf_evsel__sc_tp_uint(evsel, id, sample), err = -1, callchain_ret = 0;
struct syscall *sc = trace__syscall_info(trace, evsel, id);
@@ -1573,6 +1597,7 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
duration = sample->time - ttrace->entry_time;
if (trace__filter_duration(trace, duration))
goto out;
+ duration_calculated = true;
} else if (trace->duration_filter)
goto out;
@@ -1588,7 +1613,7 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
if (trace->summary_only)
goto out;
- trace__fprintf_entry_head(trace, thread, duration, ttrace->entry_time, trace->output);
+ trace__fprintf_entry_head(trace, thread, duration, duration_calculated, ttrace->entry_time, trace->output);
if (ttrace->entry_pending) {
fprintf(trace->output, "%-70s", ttrace->entry_str);
@@ -1855,7 +1880,7 @@ static int trace__pgfault(struct trace *trace,
thread__find_addr_location(thread, sample->cpumode, MAP__FUNCTION,
sample->ip, &al);
- trace__fprintf_entry_head(trace, thread, 0, sample->time, trace->output);
+ trace__fprintf_entry_head(trace, thread, 0, true, sample->time, trace->output);
fprintf(trace->output, "%sfault [",
evsel->attr.config == PERF_COUNT_SW_PAGE_FAULTS_MAJ ?
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 6/9] perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Colin Ian King, Alexander Shishkin, Jiri Olsa,
Namhyung Kim, Krister Johansen, Peter Zijlstra, kernel-janitors,
Arnaldo Carvalho de Melo
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in pr_debug message.
Signed-off-by: Colin King <colin.king@canonical.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/20170330095440.19444-1-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 3c4d4d00cb2c..61bf304206fd 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -2459,7 +2459,7 @@ int parse_filter_percentage(const struct option *opt __maybe_unused,
else if (!strcmp(arg, "absolute"))
symbol_conf.filter_relative = false;
else {
- pr_debug("Invalud percentage: %s\n", arg);
+ pr_debug("Invalid percentage: %s\n", arg);
return -1;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 6/9] perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Colin Ian King, Alexander Shishkin, Jiri Olsa,
Namhyung Kim, Krister Johansen, Peter Zijlstra, kernel-janitors,
Arnaldo Carvalho de Melo
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in pr_debug message.
Signed-off-by: Colin King <colin.king@canonical.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/20170330095440.19444-1-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 3c4d4d00cb2c..61bf304206fd 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -2459,7 +2459,7 @@ int parse_filter_percentage(const struct option *opt __maybe_unused,
else if (!strcmp(arg, "absolute"))
symbol_conf.filter_relative = false;
else {
- pr_debug("Invalud percentage: %s\n", arg);
+ pr_debug("Invalid percentage: %s\n", arg);
return -1;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 7/9] tools include uapi: Grab copies of stat.h and fcntl.h
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (6 preceding siblings ...)
(?)
@ 2017-04-01 2:10 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
David Ahern, Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
We will need it to build tools/perf/trace/beauty/statx.h.
Cc: Adrian Hunter <adrian.hunter@intel.com>
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: http://lkml.kernel.org/n/tip-nin41ve2fa63lrfbdr6x57yr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/linux/types.h | 1 +
tools/include/uapi/linux/fcntl.h | 72 ++++++++++++++++
tools/include/uapi/linux/stat.h | 176 +++++++++++++++++++++++++++++++++++++++
tools/perf/MANIFEST | 2 +
| 2 +
5 files changed, 253 insertions(+)
create mode 100644 tools/include/uapi/linux/fcntl.h
create mode 100644 tools/include/uapi/linux/stat.h
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index c24b3e3ae296..77a28a26a670 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -7,6 +7,7 @@
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
#include <asm/types.h>
+#include <asm/posix_types.h>
struct page;
struct kmem_cache;
diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h
new file mode 100644
index 000000000000..813afd6eee71
--- /dev/null
+++ b/tools/include/uapi/linux/fcntl.h
@@ -0,0 +1,72 @@
+#ifndef _UAPI_LINUX_FCNTL_H
+#define _UAPI_LINUX_FCNTL_H
+
+#include <asm/fcntl.h>
+
+#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
+#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
+
+/*
+ * Cancel a blocking posix lock; internal use only until we expose an
+ * asynchronous lock api to userspace:
+ */
+#define F_CANCELLK (F_LINUX_SPECIFIC_BASE + 5)
+
+/* Create a file descriptor with FD_CLOEXEC set. */
+#define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
+
+/*
+ * Request nofications on a directory.
+ * See below for events that may be notified.
+ */
+#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
+
+/*
+ * Set and get of pipe page size array
+ */
+#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
+#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
+
+/*
+ * Set/Get seals
+ */
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+
+/*
+ * Types of seals
+ */
+#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
+#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
+#define F_SEAL_GROW 0x0004 /* prevent file from growing */
+#define F_SEAL_WRITE 0x0008 /* prevent writes */
+/* (1U << 31) is reserved for signed error codes */
+
+/*
+ * Types of directory notifications that may be requested.
+ */
+#define DN_ACCESS 0x00000001 /* File accessed */
+#define DN_MODIFY 0x00000002 /* File modified */
+#define DN_CREATE 0x00000004 /* File created */
+#define DN_DELETE 0x00000008 /* File removed */
+#define DN_RENAME 0x00000010 /* File renamed */
+#define DN_ATTRIB 0x00000020 /* File changed attibutes */
+#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
+
+#define AT_FDCWD -100 /* Special value used to indicate
+ openat should use the current
+ working directory. */
+#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
+#define AT_REMOVEDIR 0x200 /* Remove directory instead of
+ unlinking file. */
+#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
+#define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal */
+#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
+
+#define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */
+#define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */
+#define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
+#define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
+
+
+#endif /* _UAPI_LINUX_FCNTL_H */
diff --git a/tools/include/uapi/linux/stat.h b/tools/include/uapi/linux/stat.h
new file mode 100644
index 000000000000..51a6b86e3700
--- /dev/null
+++ b/tools/include/uapi/linux/stat.h
@@ -0,0 +1,176 @@
+#ifndef _UAPI_LINUX_STAT_H
+#define _UAPI_LINUX_STAT_H
+
+#include <linux/types.h>
+
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+
+#define S_IFMT 00170000
+#define S_IFSOCK 0140000
+#define S_IFLNK 0120000
+#define S_IFREG 0100000
+#define S_IFBLK 0060000
+#define S_IFDIR 0040000
+#define S_IFCHR 0020000
+#define S_IFIFO 0010000
+#define S_ISUID 0004000
+#define S_ISGID 0002000
+#define S_ISVTX 0001000
+
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+
+#define S_IRWXU 00700
+#define S_IRUSR 00400
+#define S_IWUSR 00200
+#define S_IXUSR 00100
+
+#define S_IRWXG 00070
+#define S_IRGRP 00040
+#define S_IWGRP 00020
+#define S_IXGRP 00010
+
+#define S_IRWXO 00007
+#define S_IROTH 00004
+#define S_IWOTH 00002
+#define S_IXOTH 00001
+
+#endif
+
+/*
+ * Timestamp structure for the timestamps in struct statx.
+ *
+ * tv_sec holds the number of seconds before (negative) or after (positive)
+ * 00:00:00 1st January 1970 UTC.
+ *
+ * tv_nsec holds a number of nanoseconds before (0..-999,999,999 if tv_sec is
+ * negative) or after (0..999,999,999 if tv_sec is positive) the tv_sec time.
+ *
+ * Note that if both tv_sec and tv_nsec are non-zero, then the two values must
+ * either be both positive or both negative.
+ *
+ * __reserved is held in case we need a yet finer resolution.
+ */
+struct statx_timestamp {
+ __s64 tv_sec;
+ __s32 tv_nsec;
+ __s32 __reserved;
+};
+
+/*
+ * Structures for the extended file attribute retrieval system call
+ * (statx()).
+ *
+ * The caller passes a mask of what they're specifically interested in as a
+ * parameter to statx(). What statx() actually got will be indicated in
+ * st_mask upon return.
+ *
+ * For each bit in the mask argument:
+ *
+ * - if the datum is not supported:
+ *
+ * - the bit will be cleared, and
+ *
+ * - the datum will be set to an appropriate fabricated value if one is
+ * available (eg. CIFS can take a default uid and gid), otherwise
+ *
+ * - the field will be cleared;
+ *
+ * - otherwise, if explicitly requested:
+ *
+ * - the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is
+ * set or if the datum is considered out of date, and
+ *
+ * - the field will be filled in and the bit will be set;
+ *
+ * - otherwise, if not requested, but available in approximate form without any
+ * effort, it will be filled in anyway, and the bit will be set upon return
+ * (it might not be up to date, however, and no attempt will be made to
+ * synchronise the internal state first);
+ *
+ * - otherwise the field and the bit will be cleared before returning.
+ *
+ * Items in STATX_BASIC_STATS may be marked unavailable on return, but they
+ * will have values installed for compatibility purposes so that stat() and
+ * co. can be emulated in userspace.
+ */
+struct statx {
+ /* 0x00 */
+ __u32 stx_mask; /* What results were written [uncond] */
+ __u32 stx_blksize; /* Preferred general I/O size [uncond] */
+ __u64 stx_attributes; /* Flags conveying information about the file [uncond] */
+ /* 0x10 */
+ __u32 stx_nlink; /* Number of hard links */
+ __u32 stx_uid; /* User ID of owner */
+ __u32 stx_gid; /* Group ID of owner */
+ __u16 stx_mode; /* File mode */
+ __u16 __spare0[1];
+ /* 0x20 */
+ __u64 stx_ino; /* Inode number */
+ __u64 stx_size; /* File size */
+ __u64 stx_blocks; /* Number of 512-byte blocks allocated */
+ __u64 __spare1[1];
+ /* 0x40 */
+ struct statx_timestamp stx_atime; /* Last access time */
+ struct statx_timestamp stx_btime; /* File creation time */
+ struct statx_timestamp stx_ctime; /* Last attribute change time */
+ struct statx_timestamp stx_mtime; /* Last data modification time */
+ /* 0x80 */
+ __u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */
+ __u32 stx_rdev_minor;
+ __u32 stx_dev_major; /* ID of device containing file [uncond] */
+ __u32 stx_dev_minor;
+ /* 0x90 */
+ __u64 __spare2[14]; /* Spare space for future expansion */
+ /* 0x100 */
+};
+
+/*
+ * Flags to be stx_mask
+ *
+ * Query request/result mask for statx() and struct statx::stx_mask.
+ *
+ * These bits should be set in the mask argument of statx() to request
+ * particular items when calling statx().
+ */
+#define STATX_TYPE 0x00000001U /* Want/got stx_mode & S_IFMT */
+#define STATX_MODE 0x00000002U /* Want/got stx_mode & ~S_IFMT */
+#define STATX_NLINK 0x00000004U /* Want/got stx_nlink */
+#define STATX_UID 0x00000008U /* Want/got stx_uid */
+#define STATX_GID 0x00000010U /* Want/got stx_gid */
+#define STATX_ATIME 0x00000020U /* Want/got stx_atime */
+#define STATX_MTIME 0x00000040U /* Want/got stx_mtime */
+#define STATX_CTIME 0x00000080U /* Want/got stx_ctime */
+#define STATX_INO 0x00000100U /* Want/got stx_ino */
+#define STATX_SIZE 0x00000200U /* Want/got stx_size */
+#define STATX_BLOCKS 0x00000400U /* Want/got stx_blocks */
+#define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
+#define STATX_BTIME 0x00000800U /* Want/got stx_btime */
+#define STATX_ALL 0x00000fffU /* All currently supported flags */
+
+/*
+ * Attributes to be found in stx_attributes
+ *
+ * These give information about the features or the state of a file that might
+ * be of use to ordinary userspace programs such as GUIs or ls rather than
+ * specialised tools.
+ *
+ * Note that the flags marked [I] correspond to generic FS_IOC_FLAGS
+ * semantically. Where possible, the numerical value is picked to correspond
+ * also.
+ */
+#define STATX_ATTR_COMPRESSED 0x00000004 /* [I] File is compressed by the fs */
+#define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */
+#define STATX_ATTR_APPEND 0x00000020 /* [I] File is append-only */
+#define STATX_ATTR_NODUMP 0x00000040 /* [I] File is not to be dumped */
+#define STATX_ATTR_ENCRYPTED 0x00000800 /* [I] File requires key to decrypt in fs */
+
+#define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */
+
+
+#endif /* _UAPI_LINUX_STAT_H */
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index 28648c09dcd6..89018c7311a4 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -73,9 +73,11 @@ tools/include/uapi/asm-generic/mman-common.h
tools/include/uapi/asm-generic/mman.h
tools/include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf_common.h
+tools/include/uapi/linux/fcntl.h
tools/include/uapi/linux/hw_breakpoint.h
tools/include/uapi/linux/mman.h
tools/include/uapi/linux/perf_event.h
+tools/include/uapi/linux/stat.h
tools/include/linux/poison.h
tools/include/linux/rbtree.h
tools/include/linux/rbtree_augmented.h
--git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index c747bfd7f14d..83fe2202382e 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -1,7 +1,9 @@
#!/bin/sh
HEADERS='
+include/uapi/linux/fcntl.h
include/uapi/linux/perf_event.h
+include/uapi/linux/stat.h
include/linux/hash.h
include/uapi/linux/hw_breakpoint.h
arch/x86/include/asm/disabled-features.h
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 8/9] perf tools: Do not fail in case of empty HOME env variable
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (7 preceding siblings ...)
(?)
@ 2017-04-01 2:11 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:11 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Jiri Olsa, Jiri Olsa, David Ahern, Namhyung Kim,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@redhat.com>
Currently we fail in the following case:
$ unset HOME
$ ./perf record ls
$ echo $?
255
It's because the config code init fails due to a missing HOME variable
value. Fix this by skipping the user config init if there's no HOME
variable value.
Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170330144637.7468-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/config.c | 54 +++++++++++++++++++++++++++---------------------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 0c7d5a4975cd..7b01d59076d3 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -627,6 +627,8 @@ static int perf_config_set__init(struct perf_config_set *set)
{
int ret = -1;
const char *home = NULL;
+ char *user_config;
+ struct stat st;
/* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
if (config_exclusive_filename)
@@ -637,35 +639,41 @@ static int perf_config_set__init(struct perf_config_set *set)
}
home = getenv("HOME");
- if (perf_config_global() && home) {
- char *user_config = strdup(mkpath("%s/.perfconfig", home));
- struct stat st;
- if (user_config == NULL) {
- warning("Not enough memory to process %s/.perfconfig, "
- "ignoring it.", home);
- goto out;
- }
+ /*
+ * Skip reading user config if:
+ * - there is no place to read it from (HOME)
+ * - we are asked not to (PERF_CONFIG_NOGLOBAL=1)
+ */
+ if (!home || !*home || !perf_config_global())
+ return 0;
- if (stat(user_config, &st) < 0) {
- if (errno == ENOENT)
- ret = 0;
- goto out_free;
- }
+ user_config = strdup(mkpath("%s/.perfconfig", home));
+ if (user_config == NULL) {
+ warning("Not enough memory to process %s/.perfconfig, "
+ "ignoring it.", home);
+ goto out;
+ }
+
+ if (stat(user_config, &st) < 0) {
+ if (errno == ENOENT)
+ ret = 0;
+ goto out_free;
+ }
- ret = 0;
+ ret = 0;
- if (st.st_uid && (st.st_uid != geteuid())) {
- warning("File %s not owned by current user or root, "
- "ignoring it.", user_config);
- goto out_free;
- }
+ if (st.st_uid && (st.st_uid != geteuid())) {
+ warning("File %s not owned by current user or root, "
+ "ignoring it.", user_config);
+ goto out_free;
+ }
+
+ if (st.st_size)
+ ret = perf_config_from_file(collect_config, user_config, set);
- if (st.st_size)
- ret = perf_config_from_file(collect_config, user_config, set);
out_free:
- free(user_config);
- }
+ free(user_config);
out:
return ret;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* [PATCH 9/9] perf trace: Beautify statx syscall 'flag' and 'mask' arguments
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
` (8 preceding siblings ...)
(?)
@ 2017-04-01 2:11 ` Arnaldo Carvalho de Melo
-1 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-01 2:11 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Al Viro,
David Ahern, David Howells, Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To test it, build samples/statx/test_statx, which I did as:
$ make headers_install
$ cc -I ~/git/linux/usr/include samples/statx/test-statx.c -o /tmp/statx
And then use perf trace on it:
# perf trace -e statx /tmp/statx /etc/passwd
statx(/etc/passwd) = 0
results=7ff
Size: 3496 Blocks: 8 IO Block: 4096 regular file
Device: fd:00 Inode: 280156 Links: 1
Access: (0644/-rw-r--r--) Uid: 0 Gid: 0
Access: 2017-03-29 16:01:01.650073438-0300
Modify: 2017-03-10 16:25:14.156479354-0300
Change: 2017-03-10 16:25:14.171479328-0300
0.000 ( 0.007 ms): statx/30648 statx(dfd: CWD, filename: 0x7ef503f4, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff7ef4eb10) = 0
#
Using the test-stat.c options to change the mask:
# perf trace -e statx /tmp/statx -O /etc/passwd > /dev/null
0.000 ( 0.008 ms): statx/30745 statx(dfd: CWD, filename: 0x3a0753f4, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffd3a0735c0) = 0
#
# perf trace -e statx /tmp/statx -A /etc/passwd > /dev/null
0.000 ( 0.010 ms): statx/30757 statx(dfd: CWD, filename: 0xa94e63f4, flags: SYMLINK_NOFOLLOW|NO_AUTOMOUNT, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffea94e49d0) = 0
#
# trace --no-inherit -e statx /tmp/statx -F /etc/passwd > /dev/null
0.000 ( 0.011 ms): statx(dfd: CWD, filename: 0x3b02d3f3, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffd3b02c850) = 0
#
# trace --no-inherit -e statx /tmp/statx -F -L /etc/passwd > /dev/null
0.000 ( 0.008 ms): statx(dfd: CWD, filename: 0x15cff3f3, flags: STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff15cfdda0) = 0
#
# trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null
0.000 ( 0.009 ms): statx(dfd: CWD, filename: 0xfa37f3f3, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffffa37da20) = 0
#
Adding a probe to get the filename collected as well:
# perf probe 'vfs_getname=getname_flags:72 pathname=result->name:string'
Added new event:
probe:vfs_getname (on getname_flags:72 with pathname=result->name:string)
You can now use it in all perf tools, such as:
perf record -e probe:vfs_getname -aR sleep 1
# trace --no-inherit -e statx /tmp/statx -D -O /etc/passwd > /dev/null
0.169 ( 0.007 ms): statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
#
Same technique could be used to collect and beautify the result put in
the 'buffer' argument.
Finally do a system wide 'perf trace' session looking for any use of statx,
then run the test proggie with various flags:
# trace -e statx
16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
33064.447 ( 0.011 ms): statx/4569 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW|STATX_FORCE_SYNC, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffc5484c790) = 0
36050.891 ( 0.023 ms): statx/4576 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: BTIME, buffer: 0x7ffeb18b66e0) = 0
38039.889 ( 0.023 ms): statx/4584 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7fff1db0ea90) = 0
^C#
This one also starts moving the beautifiers from files directly included
in builtin-trace.c to separate objects + a beauty.h header with
prototypes, so that we can add test cases in tools/perf/tests/ to fire
syscalls with various arguments and then get them intercepted as
syscalls:sys_enter_foo or raw_syscalls:sys_enter + sys_exit to then
format and check that the formatted output is the one we expect.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-xvzw8eynffvez5czyzidhrno@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Build | 1 +
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 +
tools/perf/builtin-trace.c | 14 ++---
tools/perf/trace/beauty/Build | 1 +
tools/perf/trace/beauty/beauty.h | 24 ++++++++
tools/perf/trace/beauty/statx.c | 72 +++++++++++++++++++++++
6 files changed, 104 insertions(+), 9 deletions(-)
create mode 100644 tools/perf/trace/beauty/Build
create mode 100644 tools/perf/trace/beauty/beauty.h
create mode 100644 tools/perf/trace/beauty/statx.c
diff --git a/tools/perf/Build b/tools/perf/Build
index 9b79f8d7db50..bd8eeb60533c 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -50,5 +50,6 @@ libperf-y += util/
libperf-y += arch/
libperf-y += ui/
libperf-y += scripts/
+libperf-y += trace/beauty/
gtk-y += ui/gtk/
diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
index e93ef0b38db8..5aef183e2f85 100644
--- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
+++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
@@ -338,6 +338,7 @@
329 common pkey_mprotect sys_pkey_mprotect
330 common pkey_alloc sys_pkey_alloc
331 common pkey_free sys_pkey_free
+332 common statx sys_statx
#
# x32-specific system call numbers start at 512 to avoid cache impact
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 7379792a6504..fce278d5fada 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -31,6 +31,7 @@
#include "util/intlist.h"
#include "util/thread_map.h"
#include "util/stat.h"
+#include "trace/beauty/beauty.h"
#include "trace-event.h"
#include "util/parse-events.h"
#include "util/bpf-loader.h"
@@ -267,15 +268,6 @@ static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void
({ struct syscall_tp *fields = evsel->priv; \
fields->name.pointer(&fields->name, sample); })
-struct syscall_arg {
- unsigned long val;
- struct thread *thread;
- struct trace *trace;
- void *parm;
- u8 idx;
- u8 mask;
-};
-
struct strarray {
int offset;
int nr_entries;
@@ -771,6 +763,10 @@ static struct syscall_fmt {
.arg_parm = { [0] = &strarray__socket_families, /* family */ }, },
{ .name = "stat", .errmsg = true, .alias = "newstat", },
{ .name = "statfs", .errmsg = true, },
+ { .name = "statx", .errmsg = true,
+ .arg_scnprintf = { [0] = SCA_FDAT, /* flags */
+ [2] = SCA_STATX_FLAGS, /* flags */
+ [3] = SCA_STATX_MASK, /* mask */ }, },
{ .name = "swapoff", .errmsg = true,
.arg_scnprintf = { [0] = SCA_FILENAME, /* specialfile */ }, },
{ .name = "swapon", .errmsg = true,
diff --git a/tools/perf/trace/beauty/Build b/tools/perf/trace/beauty/Build
new file mode 100644
index 000000000000..be95ac6ce845
--- /dev/null
+++ b/tools/perf/trace/beauty/Build
@@ -0,0 +1 @@
+libperf-y += statx.o
diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h
new file mode 100644
index 000000000000..cf50be3f17a4
--- /dev/null
+++ b/tools/perf/trace/beauty/beauty.h
@@ -0,0 +1,24 @@
+#ifndef _PERF_TRACE_BEAUTY_H
+#define _PERF_TRACE_BEAUTY_H
+
+#include <linux/types.h>
+
+struct trace;
+struct thread;
+
+struct syscall_arg {
+ unsigned long val;
+ struct thread *thread;
+ struct trace *trace;
+ void *parm;
+ u8 idx;
+ u8 mask;
+};
+
+size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg);
+#define SCA_STATX_FLAGS syscall_arg__scnprintf_statx_flags
+
+size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg);
+#define SCA_STATX_MASK syscall_arg__scnprintf_statx_mask
+
+#endif /* _PERF_TRACE_BEAUTY_H */
diff --git a/tools/perf/trace/beauty/statx.c b/tools/perf/trace/beauty/statx.c
new file mode 100644
index 000000000000..5643b692af4c
--- /dev/null
+++ b/tools/perf/trace/beauty/statx.c
@@ -0,0 +1,72 @@
+/*
+ * trace/beauty/statx.c
+ *
+ * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
+ *
+ * Released under the GPL v2. (and only v2, not any later version)
+ */
+
+#include "trace/beauty/beauty.h"
+#include <linux/kernel.h>
+#include <sys/types.h>
+#include <uapi/linux/fcntl.h>
+#include <uapi/linux/stat.h>
+
+size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg)
+{
+ int printed = 0, flags = arg->val;
+
+ if (flags == 0)
+ return scnprintf(bf, size, "SYNC_AS_STAT");
+#define P_FLAG(n) \
+ if (flags & AT_##n) { \
+ printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \
+ flags &= ~AT_##n; \
+ }
+
+ P_FLAG(SYMLINK_NOFOLLOW);
+ P_FLAG(REMOVEDIR);
+ P_FLAG(SYMLINK_FOLLOW);
+ P_FLAG(NO_AUTOMOUNT);
+ P_FLAG(EMPTY_PATH);
+ P_FLAG(STATX_FORCE_SYNC);
+ P_FLAG(STATX_DONT_SYNC);
+
+#undef P_FLAG
+
+ if (flags)
+ printed += scnprintf(bf + printed, size - printed, "%s%#x", printed ? "|" : "", flags);
+
+ return printed;
+}
+
+size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg)
+{
+ int printed = 0, flags = arg->val;
+
+#define P_FLAG(n) \
+ if (flags & STATX_##n) { \
+ printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \
+ flags &= ~STATX_##n; \
+ }
+
+ P_FLAG(TYPE);
+ P_FLAG(MODE);
+ P_FLAG(NLINK);
+ P_FLAG(UID);
+ P_FLAG(GID);
+ P_FLAG(ATIME);
+ P_FLAG(MTIME);
+ P_FLAG(CTIME);
+ P_FLAG(INO);
+ P_FLAG(SIZE);
+ P_FLAG(BLOCKS);
+ P_FLAG(BTIME);
+
+#undef P_FLAG
+
+ if (flags)
+ printed += scnprintf(bf + printed, size - printed, "%s%#x", printed ? "|" : "", flags);
+
+ return printed;
+}
--
2.9.3
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
@ 2017-04-01 10:44 ` Ingo Molnar
-1 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2017-04-01 10:44 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
Alexis Berlemont, Al Viro, Colin King, David Ahern,
David Howells, Hemant Kumar, Jan Stancek, Jiri Olsa, Kan Liang,
kernel-janitors, Krister Johansen, Luis Claudio Gonçalves,
Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
Peter Zijlstra, Ravi Bangoria, Wang Nan, Yao Jin,
Arnaldo Carvalho de Melo
* 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 3906a13a6b4e78fbc0def03a808f091f0dff1b44:
>
> Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-28 07:44:43 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170331
>
> for you to fetch changes up to fd5cead23f54697310bd565aa2a23ae5128080a0:
>
> perf trace: Beautify statx syscall 'flag' and 'mask' arguments (2017-03-31 14:42:31 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> New features:
>
> - Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo)
>
> e.g.:
>
> System wide strace like session:
>
> # trace -e statx
> 16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
> 36050.891 ( 0.007 ms): statx/4576 statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
> ^C#
>
> User visible:
>
> - Handle unpaired raw_syscalls:sys_exit events in 'perf trace', i.e. we
> shouldn't try to calculate duration or print the timestamp for a missing
> matching raw_syscalls:sys_enter (Arnaldo Carvalho de Melo)
>
> - Do not print "cycles: 0" in perf report LBR lines in platforms not
> supporting 'cycles', such as Intel's Broadwell (Jin Yao)
>
> - Handle missing $HOME env var (Jiri Olsa)
>
> - Map 8-bit registers (al, bl, etc), not supported in uprobes_events, to
> the next best thing (ax, bx, etc) supported (Ravi Bangoria)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
> perf tools: Remove support for command aliases
> perf trace: Handle unpaired raw_syscalls:sys_exit event
> tools include uapi: Grab copies of stat.h and fcntl.h
> perf trace: Beautify statx syscall 'flag' and 'mask' arguments
>
> Colin Ian King (1):
> perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
>
> Jin Yao (1):
> perf report: Drop cycles 0 for LBR print
>
> Jiri Olsa (1):
> perf tools: Do not fail in case of empty HOME env variable
>
> Ravi Bangoria (2):
> perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
> perf/sdt/x86: Move OP parser to tools/perf/arch/x86/
>
> tools/include/linux/types.h | 1 +
> tools/include/uapi/linux/fcntl.h | 72 +++++++++
> tools/include/uapi/linux/stat.h | 176 ++++++++++++++++++++
> tools/perf/Build | 1 +
> tools/perf/MANIFEST | 2 +
> tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 +
> tools/perf/arch/x86/util/perf_regs.c | 187 ++++++++++++++++++----
> tools/perf/builtin-help.c | 13 --
> tools/perf/builtin-trace.c | 57 ++++---
> tools/perf/check-headers.sh | 2 +
> tools/perf/perf.c | 97 +----------
> tools/perf/trace/beauty/Build | 1 +
> tools/perf/trace/beauty/beauty.h | 24 +++
> tools/perf/trace/beauty/statx.c | 72 +++++++++
> tools/perf/util/Build | 1 -
> tools/perf/util/alias.c | 78 ---------
> tools/perf/util/cache.h | 1 -
> tools/perf/util/callchain.c | 111 ++++++++-----
> tools/perf/util/config.c | 54 ++++---
> tools/perf/util/help-unknown-cmd.c | 8 +-
> tools/perf/util/hist.c | 2 +-
> tools/perf/util/perf_regs.c | 6 +-
> tools/perf/util/perf_regs.h | 11 +-
> tools/perf/util/probe-file.c | 132 +++++----------
> 24 files changed, 707 insertions(+), 403 deletions(-)
> create mode 100644 tools/include/uapi/linux/fcntl.h
> create mode 100644 tools/include/uapi/linux/stat.h
> create mode 100644 tools/perf/trace/beauty/Build
> create mode 100644 tools/perf/trace/beauty/beauty.h
> create mode 100644 tools/perf/trace/beauty/statx.c
> delete mode 100644 tools/perf/util/alias.c
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
@ 2017-04-01 10:44 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2017-04-01 10:44 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
Alexis Berlemont, Al Viro, Colin King, David Ahern,
David Howells, Hemant Kumar, Jan Stancek, Jiri Olsa, Kan Liang,
kernel-janitors, Krister Johansen, Luis Claudio Gonçalves,
Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
Peter Zijlstra, Ravi Bangoria, Wang Nan, Yao Jin,
Arnaldo Carvalho de Melo
* 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 3906a13a6b4e78fbc0def03a808f091f0dff1b44:
>
> Merge tag 'perf-core-for-mingo-4.12-20170327' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-28 07:44:43 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170331
>
> for you to fetch changes up to fd5cead23f54697310bd565aa2a23ae5128080a0:
>
> perf trace: Beautify statx syscall 'flag' and 'mask' arguments (2017-03-31 14:42:31 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> New features:
>
> - Beautify the statx syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo)
>
> e.g.:
>
> System wide strace like session:
>
> # trace -e statx
> 16612.967 ( 0.028 ms): statx/4562 statx(dfd: CWD, filename: /tmp/statx, flags: SYMLINK_NOFOLLOW, mask: TYPE|MODE|NLINK|UID|GID|ATIME|MTIME|CTIME|INO|SIZE|BLOCKS|BTIME, buffer: 0x7ffef195d660) = 0
> 36050.891 ( 0.007 ms): statx/4576 statx(dfd: CWD, filename: /etc/passwd, flags: SYMLINK_NOFOLLOW|STATX_DONT_SYNC, mask: BTIME, buffer: 0x7ffda9bf50f0) = 0
> ^C#
>
> User visible:
>
> - Handle unpaired raw_syscalls:sys_exit events in 'perf trace', i.e. we
> shouldn't try to calculate duration or print the timestamp for a missing
> matching raw_syscalls:sys_enter (Arnaldo Carvalho de Melo)
>
> - Do not print "cycles: 0" in perf report LBR lines in platforms not
> supporting 'cycles', such as Intel's Broadwell (Jin Yao)
>
> - Handle missing $HOME env var (Jiri Olsa)
>
> - Map 8-bit registers (al, bl, etc), not supported in uprobes_events, to
> the next best thing (ax, bx, etc) supported (Ravi Bangoria)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
> perf tools: Remove support for command aliases
> perf trace: Handle unpaired raw_syscalls:sys_exit event
> tools include uapi: Grab copies of stat.h and fcntl.h
> perf trace: Beautify statx syscall 'flag' and 'mask' arguments
>
> Colin Ian King (1):
> perf utils: Fix spelling mistake: "Invalud" -> "Invalid"
>
> Jin Yao (1):
> perf report: Drop cycles 0 for LBR print
>
> Jiri Olsa (1):
> perf tools: Do not fail in case of empty HOME env variable
>
> Ravi Bangoria (2):
> perf/sdt/x86: Add renaming logic for (missing) 8 bit registers
> perf/sdt/x86: Move OP parser to tools/perf/arch/x86/
>
> tools/include/linux/types.h | 1 +
> tools/include/uapi/linux/fcntl.h | 72 +++++++++
> tools/include/uapi/linux/stat.h | 176 ++++++++++++++++++++
> tools/perf/Build | 1 +
> tools/perf/MANIFEST | 2 +
> tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 +
> tools/perf/arch/x86/util/perf_regs.c | 187 ++++++++++++++++++----
> tools/perf/builtin-help.c | 13 --
> tools/perf/builtin-trace.c | 57 ++++---
> tools/perf/check-headers.sh | 2 +
> tools/perf/perf.c | 97 +----------
> tools/perf/trace/beauty/Build | 1 +
> tools/perf/trace/beauty/beauty.h | 24 +++
> tools/perf/trace/beauty/statx.c | 72 +++++++++
> tools/perf/util/Build | 1 -
> tools/perf/util/alias.c | 78 ---------
> tools/perf/util/cache.h | 1 -
> tools/perf/util/callchain.c | 111 ++++++++-----
> tools/perf/util/config.c | 54 ++++---
> tools/perf/util/help-unknown-cmd.c | 8 +-
> tools/perf/util/hist.c | 2 +-
> tools/perf/util/perf_regs.c | 6 +-
> tools/perf/util/perf_regs.h | 11 +-
> tools/perf/util/probe-file.c | 132 +++++----------
> 24 files changed, 707 insertions(+), 403 deletions(-)
> create mode 100644 tools/include/uapi/linux/fcntl.h
> create mode 100644 tools/include/uapi/linux/stat.h
> create mode 100644 tools/perf/trace/beauty/Build
> create mode 100644 tools/perf/trace/beauty/beauty.h
> create mode 100644 tools/perf/trace/beauty/statx.c
> delete mode 100644 tools/perf/util/alias.c
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2015-12-11 14:22 Arnaldo Carvalho de Melo
@ 2015-12-14 8:32 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2015-12-14 8:32 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Brendan Gregg,
David Ahern, David S . Miller, Jiri Olsa, Masami Hiramatsu,
Namhyung Kim, Peter Zijlstra, pi3orama, Wang Nan, Zefan Li,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit e7a7865cc0da306542db0b9205cb0a467f59e33d:
>
> perf symbols: Fix dso__load_sym to put dso (2015-12-10 16:29:32 -0300)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to 93b0ba3c60da89043ce2b9f601cd2b3da408903b:
>
> perf tools: Clear struct machine during machine__init() (2015-12-11 09:32:41 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> User visible:
>
> - Fix 'perf top' annotation in --stdio (Namhyung Kim)
>
> - Support hw breakpoint events (mem:0xAddress) in the default output mode in
> 'perf script' (Wang Nan)
>
> Infrastructure:
>
> - Do not hold the hists lock while emitting one specific warning (Namhyung Kim)
>
> - Fetch map names from correct strtab, worked so far because llvm/clang
> uses just one string table (Wang Nan)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Namhyung Kim (4):
> perf top: Do not convert address for perf_top__record_precise_ip()
> perf top: Access hists->lock only if needed
> perf top: Fix annotation on --stdio
> perf top: Cleanup condition in perf_top__record_precise_ip()
>
> Wang Nan (5):
> tools lib bpf: Check return value of strdup when reading map names
> tools lib bpf: Fetch map names from correct strtab
> perf data: Add u32_hex data type
> perf script: Add support for PERF_TYPE_BREAKPOINT
> perf tools: Clear struct machine during machine__init()
>
> tools/lib/bpf/libbpf.c | 24 +++++++++++++-----
> tools/perf/builtin-script.c | 14 +++++++++++
> tools/perf/builtin-top.c | 52 +++++++++++++++++----------------------
> tools/perf/util/data-convert-bt.c | 2 ++
> tools/perf/util/machine.c | 1 +
> 5 files changed, 57 insertions(+), 36 deletions(-)
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2015-12-11 14:22 Arnaldo Carvalho de Melo
2015-12-14 8:32 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-12-11 14:22 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Alexei Starovoitov, Brendan Gregg, David Ahern, David S . Miller,
Jiri Olsa, Masami Hiramatsu, Namhyung Kim, Peter Zijlstra,
pi3orama, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit e7a7865cc0da306542db0b9205cb0a467f59e33d:
perf symbols: Fix dso__load_sym to put dso (2015-12-10 16:29:32 -0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to 93b0ba3c60da89043ce2b9f601cd2b3da408903b:
perf tools: Clear struct machine during machine__init() (2015-12-11 09:32:41 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Fix 'perf top' annotation in --stdio (Namhyung Kim)
- Support hw breakpoint events (mem:0xAddress) in the default output mode in
'perf script' (Wang Nan)
Infrastructure:
- Do not hold the hists lock while emitting one specific warning (Namhyung Kim)
- Fetch map names from correct strtab, worked so far because llvm/clang
uses just one string table (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Namhyung Kim (4):
perf top: Do not convert address for perf_top__record_precise_ip()
perf top: Access hists->lock only if needed
perf top: Fix annotation on --stdio
perf top: Cleanup condition in perf_top__record_precise_ip()
Wang Nan (5):
tools lib bpf: Check return value of strdup when reading map names
tools lib bpf: Fetch map names from correct strtab
perf data: Add u32_hex data type
perf script: Add support for PERF_TYPE_BREAKPOINT
perf tools: Clear struct machine during machine__init()
tools/lib/bpf/libbpf.c | 24 +++++++++++++-----
tools/perf/builtin-script.c | 14 +++++++++++
tools/perf/builtin-top.c | 52 +++++++++++++++++----------------------
tools/perf/util/data-convert-bt.c | 2 ++
tools/perf/util/machine.c | 1 +
5 files changed, 57 insertions(+), 36 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2015-09-23 1:57 Arnaldo Carvalho de Melo
@ 2015-09-23 7:45 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2015-09-23 7:45 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Borislav Petkov,
Brendan Gregg, Daniel Borkmann, David Ahern, Frederic Weisbecker,
He Kuang, H . Peter Anvin, Jiri Olsa, Kaixu Xia,
Masami Hiramatsu, Matt Fleming, Milian Wolff, Namhyung Kim,
Paul Mackerras, Peter Zijlstra, pi3orama, Raphael Beamonte,
Stephane Eranian, Steven Rostedt, Thomas Gleixner, Vinson Lee,
Wang Nan, Zefan Li, Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 96f3eda67fcf2598e9d2794398e0e7ab35138ea6:
>
> perf/x86/intel: Fix static checker warning in lbr enable (2015-09-18 09:24:57 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to e803cf97a4f90d31bcc2c9a1ea20fe9cdc12b2f9:
>
> perf record: Synthesize COMM event for a command line workload (2015-09-22 22:43:12 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> User visible:
>
> - Fix a segfault in 'perf probe' when removing uprobe events (Masami Hiramatsu)
>
> - Synthesize COMM event for workloads started from the command line in 'perf
> record' so that we can have the pid->comm mapping before we get the real
> PERF_RECORD_COMM switching from perf to the workload (Namhyung Kim)
>
> - Fix build tools/vm/ due to removal of tools/lib/api/fs/debugfs.h
> (Arnaldo Carvalho de Melo)
>
> Developer stuff:
>
> - Fix the make tarball targets by including the recently added err.h header in
> the perf MANIFEST file (Jiri Olsa)
>
> - Don't assume that the event parser returns a non empty evlist (Wang Nan)
>
> - Add way to disambiguate feature detection state files, needed to use
> tools/build feature detection for multiple components in a single O= output
> dir, which will be the case with tools/perf/ and tools/lib/bpf/
> (Arnaldo Carvalho de Melo)
>
> - Fixup FEATURE_{TESTS,DISPLAY} inversion in tools/lib/bpf/ (Arnaldo Carvalho de Melo)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
> tools build: Fixup feature detection display function name
> tools lib bpf: Fix up FEATURE_{TESTS,DISPLAY} usage
> tools build: Allow setting the feature detection user
> tools lib bpf: Use FEATURE_USER to allow building in the same dir as perf
> tools vm: Fix build due to removal of tools/lib/api/fs/debugfs.h
>
> Jiri Olsa (1):
> perf tools: Add include/err.h into MANIFEST
>
> Masami Hiramatsu (1):
> perf probe: Fix a segfault when removing uprobe events
>
> Namhyung Kim (1):
> perf record: Synthesize COMM event for a command line workload
>
> Wang Nan (1):
> perf tools: Don't assume that the parser returns non empty evsel list
>
> tools/build/Makefile.feature | 9 +++++----
> tools/lib/bpf/Makefile | 5 +++--
> tools/perf/MANIFEST | 1 +
> tools/perf/builtin-probe.c | 7 +++++--
> tools/perf/builtin-record.c | 15 ++++++++++++++-
> tools/perf/util/event.c | 2 +-
> tools/perf/util/event.h | 5 +++++
> tools/perf/util/parse-events.c | 16 ++++++++++++++++
> tools/vm/page-types.c | 6 +++---
> 9 files changed, 53 insertions(+), 13 deletions(-)
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2015-09-23 1:57 Arnaldo Carvalho de Melo
2015-09-23 7:45 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-23 1:57 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Alexei Starovoitov, Borislav Petkov, Brendan Gregg,
Daniel Borkmann, David Ahern, Frederic Weisbecker, He Kuang,
H . Peter Anvin, Jiri Olsa, Kaixu Xia, Masami Hiramatsu,
Matt Fleming, Milian Wolff, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, pi3orama, Raphael Beamonte, Stephane Eranian,
Steven Rostedt, Thomas Gleixner, Vinson Lee, Wang Nan, Zefan Li,
Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 96f3eda67fcf2598e9d2794398e0e7ab35138ea6:
perf/x86/intel: Fix static checker warning in lbr enable (2015-09-18 09:24:57 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to e803cf97a4f90d31bcc2c9a1ea20fe9cdc12b2f9:
perf record: Synthesize COMM event for a command line workload (2015-09-22 22:43:12 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Fix a segfault in 'perf probe' when removing uprobe events (Masami Hiramatsu)
- Synthesize COMM event for workloads started from the command line in 'perf
record' so that we can have the pid->comm mapping before we get the real
PERF_RECORD_COMM switching from perf to the workload (Namhyung Kim)
- Fix build tools/vm/ due to removal of tools/lib/api/fs/debugfs.h
(Arnaldo Carvalho de Melo)
Developer stuff:
- Fix the make tarball targets by including the recently added err.h header in
the perf MANIFEST file (Jiri Olsa)
- Don't assume that the event parser returns a non empty evlist (Wang Nan)
- Add way to disambiguate feature detection state files, needed to use
tools/build feature detection for multiple components in a single O= output
dir, which will be the case with tools/perf/ and tools/lib/bpf/
(Arnaldo Carvalho de Melo)
- Fixup FEATURE_{TESTS,DISPLAY} inversion in tools/lib/bpf/ (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
tools build: Fixup feature detection display function name
tools lib bpf: Fix up FEATURE_{TESTS,DISPLAY} usage
tools build: Allow setting the feature detection user
tools lib bpf: Use FEATURE_USER to allow building in the same dir as perf
tools vm: Fix build due to removal of tools/lib/api/fs/debugfs.h
Jiri Olsa (1):
perf tools: Add include/err.h into MANIFEST
Masami Hiramatsu (1):
perf probe: Fix a segfault when removing uprobe events
Namhyung Kim (1):
perf record: Synthesize COMM event for a command line workload
Wang Nan (1):
perf tools: Don't assume that the parser returns non empty evsel list
tools/build/Makefile.feature | 9 +++++----
tools/lib/bpf/Makefile | 5 +++--
tools/perf/MANIFEST | 1 +
tools/perf/builtin-probe.c | 7 +++++--
tools/perf/builtin-record.c | 15 ++++++++++++++-
tools/perf/util/event.c | 2 +-
tools/perf/util/event.h | 5 +++++
tools/perf/util/parse-events.c | 16 ++++++++++++++++
tools/vm/page-types.c | 6 +++---
9 files changed, 53 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2015-08-21 16:10 Arnaldo Carvalho de Melo
@ 2015-08-22 6:47 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2015-08-22 6:47 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Borislav Petkov,
Brendan Gregg, Daniel Borkmann, David Ahern, Dean Nelson,
Frederic Weisbecker, He Kuang, Jiri Olsa, Kaixu Xia, Li Zhang,
Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, pi3orama,
Stephane Eranian, Sukadev Bhattiprolu, Wang Nan, Zefan Li,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 82819ffb42fb45197bacf3223191deca31d3eb91:
>
> perf/x86/msr: Fix the MSR driver build (2015-08-21 08:17:01 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to 1c0bd0e891aaed0219010bfe79b32e1b0b82d662:
>
> perf probe: Try to use symbol table if searching debug info failed (2015-08-21 12:57:20 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> User visible:
>
> - Fix segfault using 'perf script --show-mmap-events', affects
> only current perf/core (Adrian Hunter).
>
> - /proc/kcore requires CAP_SYS_RAWIO message too noisy, make it
> debug only (Adrian Hunter)
>
> - Fix Intel PT timestamp handling (Adrian Hunter)
>
> - Add Intel BTS support, with a call-graph script to show it and
> PT in use in a GUI using 'perf script' python scripting with
> postgresql and Qt (Adrian Hunter)
>
> - Add checks for returned EVENT_ERROR type in libtraceevent, fixing
> a bug that surfaced on arm64 systems (Dean Nelson)
>
> - Fallback to using kallsyms when libdw fails to handle a vmlinux file,
> that can happen, for instance, when perf is statically linked and
> then libdw fails to load libebl_{arch}.so (Wang Nan)
>
> Infrastructure:
>
> - Initialize reference counts in map__clone() (Arnaldo Carvalho de Melo)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Adrian Hunter (6):
> perf script: Fix segfault using --show-mmap-events
> perf tools: /proc/kcore requires CAP_SYS_RAWIO message too noisy
> perf tools: Fix Intel PT timestamp handling
> perf tools: Add Intel BTS support
> perf tools: Put itrace options into an asciidoc include
> perf tools: Add example call-graph script
>
> Arnaldo Carvalho de Melo (1):
> perf tools: Initialize reference counts in map__clone()
>
> Dean Nelson (1):
> tools lib traceevent: Add checks for returned EVENT_ERROR type
>
> Wang Nan (1):
> perf probe: Try to use symbol table if searching debug info failed
>
> tools/lib/traceevent/event-parse.c | 9 +
> tools/perf/Documentation/intel-bts.txt | 86 ++
> tools/perf/Documentation/itrace.txt | 22 +
> tools/perf/Documentation/perf-inject.txt | 23 +-
> tools/perf/Documentation/perf-report.txt | 23 +-
> tools/perf/Documentation/perf-script.txt | 23 +-
> tools/perf/arch/x86/util/Build | 1 +
> tools/perf/arch/x86/util/auxtrace.c | 49 +-
> tools/perf/arch/x86/util/intel-bts.c | 458 ++++++++++
> tools/perf/arch/x86/util/pmu.c | 3 +
> .../scripts/python/call-graph-from-postgresql.py | 327 ++++++++
> tools/perf/scripts/python/export-to-postgresql.py | 47 ++
> tools/perf/util/Build | 1 +
> tools/perf/util/annotate.c | 1 +
> tools/perf/util/auxtrace.c | 3 +
> tools/perf/util/auxtrace.h | 1 +
> tools/perf/util/evlist.c | 2 +-
> tools/perf/util/intel-bts.c | 933 +++++++++++++++++++++
> tools/perf/util/intel-bts.h | 43 +
> tools/perf/util/intel-pt.c | 2 +-
> tools/perf/util/map.c | 13 +-
> tools/perf/util/pmu.c | 4 -
> tools/perf/util/probe-event.c | 7 +-
> tools/perf/util/symbol.c | 4 +-
> 24 files changed, 2004 insertions(+), 81 deletions(-)
> create mode 100644 tools/perf/Documentation/intel-bts.txt
> create mode 100644 tools/perf/Documentation/itrace.txt
> create mode 100644 tools/perf/arch/x86/util/intel-bts.c
> create mode 100644 tools/perf/scripts/python/call-graph-from-postgresql.py
> create mode 100644 tools/perf/util/intel-bts.c
> create mode 100644 tools/perf/util/intel-bts.h
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2015-08-21 16:10 Arnaldo Carvalho de Melo
2015-08-22 6:47 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-21 16:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Alexei Starovoitov, Borislav Petkov, Brendan Gregg,
Daniel Borkmann, David Ahern, Dean Nelson, Frederic Weisbecker,
He Kuang, Jiri Olsa, Kaixu Xia, Li Zhang, Masami Hiramatsu,
Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
Sukadev Bhattiprolu, Wang Nan, Zefan Li,
Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 82819ffb42fb45197bacf3223191deca31d3eb91:
perf/x86/msr: Fix the MSR driver build (2015-08-21 08:17:01 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to 1c0bd0e891aaed0219010bfe79b32e1b0b82d662:
perf probe: Try to use symbol table if searching debug info failed (2015-08-21 12:57:20 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Fix segfault using 'perf script --show-mmap-events', affects
only current perf/core (Adrian Hunter).
- /proc/kcore requires CAP_SYS_RAWIO message too noisy, make it
debug only (Adrian Hunter)
- Fix Intel PT timestamp handling (Adrian Hunter)
- Add Intel BTS support, with a call-graph script to show it and
PT in use in a GUI using 'perf script' python scripting with
postgresql and Qt (Adrian Hunter)
- Add checks for returned EVENT_ERROR type in libtraceevent, fixing
a bug that surfaced on arm64 systems (Dean Nelson)
- Fallback to using kallsyms when libdw fails to handle a vmlinux file,
that can happen, for instance, when perf is statically linked and
then libdw fails to load libebl_{arch}.so (Wang Nan)
Infrastructure:
- Initialize reference counts in map__clone() (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Adrian Hunter (6):
perf script: Fix segfault using --show-mmap-events
perf tools: /proc/kcore requires CAP_SYS_RAWIO message too noisy
perf tools: Fix Intel PT timestamp handling
perf tools: Add Intel BTS support
perf tools: Put itrace options into an asciidoc include
perf tools: Add example call-graph script
Arnaldo Carvalho de Melo (1):
perf tools: Initialize reference counts in map__clone()
Dean Nelson (1):
tools lib traceevent: Add checks for returned EVENT_ERROR type
Wang Nan (1):
perf probe: Try to use symbol table if searching debug info failed
tools/lib/traceevent/event-parse.c | 9 +
tools/perf/Documentation/intel-bts.txt | 86 ++
tools/perf/Documentation/itrace.txt | 22 +
tools/perf/Documentation/perf-inject.txt | 23 +-
tools/perf/Documentation/perf-report.txt | 23 +-
tools/perf/Documentation/perf-script.txt | 23 +-
tools/perf/arch/x86/util/Build | 1 +
tools/perf/arch/x86/util/auxtrace.c | 49 +-
tools/perf/arch/x86/util/intel-bts.c | 458 ++++++++++
tools/perf/arch/x86/util/pmu.c | 3 +
.../scripts/python/call-graph-from-postgresql.py | 327 ++++++++
tools/perf/scripts/python/export-to-postgresql.py | 47 ++
tools/perf/util/Build | 1 +
tools/perf/util/annotate.c | 1 +
tools/perf/util/auxtrace.c | 3 +
tools/perf/util/auxtrace.h | 1 +
tools/perf/util/evlist.c | 2 +-
tools/perf/util/intel-bts.c | 933 +++++++++++++++++++++
tools/perf/util/intel-bts.h | 43 +
tools/perf/util/intel-pt.c | 2 +-
tools/perf/util/map.c | 13 +-
tools/perf/util/pmu.c | 4 -
tools/perf/util/probe-event.c | 7 +-
tools/perf/util/symbol.c | 4 +-
24 files changed, 2004 insertions(+), 81 deletions(-)
create mode 100644 tools/perf/Documentation/intel-bts.txt
create mode 100644 tools/perf/Documentation/itrace.txt
create mode 100644 tools/perf/arch/x86/util/intel-bts.c
create mode 100644 tools/perf/scripts/python/call-graph-from-postgresql.py
create mode 100644 tools/perf/util/intel-bts.c
create mode 100644 tools/perf/util/intel-bts.h
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2015-08-10 20:56 Arnaldo Carvalho de Melo
@ 2015-08-12 10:18 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2015-08-12 10:18 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
David Ahern, Frederic Weisbecker, Jiri Olsa, Kan Liang,
Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit f1d800bf615b84ca253af372d2dac8cdef743a20:
>
> Merge tag 'perf-ebpf-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-08 10:05:17 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to 4605bb55b91449a1a953a51f0334d3bc02351adb:
>
> perf evlist: Be more specific on -F/--freq (2015-08-10 17:20:26 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> User visible:
>
> - Introduce 'srcfile' sort key: (Andi Kleen)
>
> # perf record -F 10000 usleep 1
> # perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
> <SNIP>
> # Overhead Source File
> 26.49% copy_page_64.S
> 5.49% signal.c
> 0.51% msr.h
> #
>
> It can be combined with other fields, for instance, experiment with
> '-s srcfile,symbol'.
>
> There are some oddities in some distros and with some specific DSOs, being
> investigated, so your mileage may vary.
>
> - Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)
>
> - Support per-event 'freq' term: (Namhyung Kim)
>
> $ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
> $ perf evlist -F
> cpu/instructions,freq=1234/: sample_freq=1234
> cycles: sample_period=1000
> $
>
> Infrastructure:
>
> - Move perf_counts struct and functions into separate object (Jiri Olsa)
>
> - Unset perf_event_attr::freq when period term is set (Jiri Olsa)
>
> - Move callchain option parsing code to util.c (Kan Liang)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Andi Kleen (2):
> perf tools: Support full source file paths for srcline
> perf report: Add support for srcfile sort key
>
> Arnaldo Carvalho de Melo (2):
> perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
> perf hists: Update the column width for the "srcline" sort key
>
> Jiri Olsa (2):
> perf stat: Move perf_counts struct and functions into separate object
> perf tools: Unset perf_event_attr::freq when period term is set
>
> Kan Liang (1):
> perf callchain: Move option parsing code to util.c
>
> Namhyung Kim (2):
> perf record: Support per-event freq term
> perf evlist: Be more specific on -F/--freq
>
> tools/perf/Documentation/perf-record.txt | 1 +
> tools/perf/Documentation/perf-report.txt | 4 ++
> tools/perf/Documentation/perf-script.txt | 3 ++
> tools/perf/builtin-report.c | 2 +
> tools/perf/builtin-script.c | 2 +
> tools/perf/builtin-stat.c | 1 +
> tools/perf/util/Build | 1 +
> tools/perf/util/callchain.c | 89 +------------------------------
> tools/perf/util/callchain.h | 1 +
> tools/perf/util/counts.c | 52 ++++++++++++++++++
> tools/perf/util/counts.h | 37 +++++++++++++
> tools/perf/util/evsel.c | 14 ++++-
> tools/perf/util/evsel.h | 4 +-
> tools/perf/util/hist.c | 9 ++++
> tools/perf/util/hist.h | 1 +
> tools/perf/util/parse-events.c | 6 +++
> tools/perf/util/parse-events.h | 1 +
> tools/perf/util/parse-events.l | 1 +
> tools/perf/util/pmu.c | 2 +-
> tools/perf/util/python-ext-sources | 2 +-
> tools/perf/util/sort.c | 52 ++++++++++++++++++
> tools/perf/util/sort.h | 2 +
> tools/perf/util/srcline.c | 6 ++-
> tools/perf/util/stat.c | 49 -----------------
> tools/perf/util/stat.h | 30 -----------
> tools/perf/util/util.c | 90 ++++++++++++++++++++++++++++++++
> tools/perf/util/util.h | 3 ++
> 27 files changed, 292 insertions(+), 173 deletions(-)
> create mode 100644 tools/perf/util/counts.c
> create mode 100644 tools/perf/util/counts.h
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2015-08-10 20:56 Arnaldo Carvalho de Melo
2015-08-12 10:18 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-10 20:56 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
Jiri Olsa, Kan Liang, Namhyung Kim, Peter Zijlstra,
Stephane Eranian, Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit f1d800bf615b84ca253af372d2dac8cdef743a20:
Merge tag 'perf-ebpf-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-08 10:05:17 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to 4605bb55b91449a1a953a51f0334d3bc02351adb:
perf evlist: Be more specific on -F/--freq (2015-08-10 17:20:26 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Introduce 'srcfile' sort key: (Andi Kleen)
# perf record -F 10000 usleep 1
# perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
<SNIP>
# Overhead Source File
26.49% copy_page_64.S
5.49% signal.c
0.51% msr.h
#
It can be combined with other fields, for instance, experiment with
'-s srcfile,symbol'.
There are some oddities in some distros and with some specific DSOs, being
investigated, so your mileage may vary.
- Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)
- Support per-event 'freq' term: (Namhyung Kim)
$ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
$ perf evlist -F
cpu/instructions,freq=1234/: sample_freq=1234
cycles: sample_period=1000
$
Infrastructure:
- Move perf_counts struct and functions into separate object (Jiri Olsa)
- Unset perf_event_attr::freq when period term is set (Jiri Olsa)
- Move callchain option parsing code to util.c (Kan Liang)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Andi Kleen (2):
perf tools: Support full source file paths for srcline
perf report: Add support for srcfile sort key
Arnaldo Carvalho de Melo (2):
perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
perf hists: Update the column width for the "srcline" sort key
Jiri Olsa (2):
perf stat: Move perf_counts struct and functions into separate object
perf tools: Unset perf_event_attr::freq when period term is set
Kan Liang (1):
perf callchain: Move option parsing code to util.c
Namhyung Kim (2):
perf record: Support per-event freq term
perf evlist: Be more specific on -F/--freq
tools/perf/Documentation/perf-record.txt | 1 +
tools/perf/Documentation/perf-report.txt | 4 ++
tools/perf/Documentation/perf-script.txt | 3 ++
tools/perf/builtin-report.c | 2 +
tools/perf/builtin-script.c | 2 +
tools/perf/builtin-stat.c | 1 +
tools/perf/util/Build | 1 +
tools/perf/util/callchain.c | 89 +------------------------------
tools/perf/util/callchain.h | 1 +
tools/perf/util/counts.c | 52 ++++++++++++++++++
tools/perf/util/counts.h | 37 +++++++++++++
tools/perf/util/evsel.c | 14 ++++-
tools/perf/util/evsel.h | 4 +-
tools/perf/util/hist.c | 9 ++++
tools/perf/util/hist.h | 1 +
tools/perf/util/parse-events.c | 6 +++
tools/perf/util/parse-events.h | 1 +
tools/perf/util/parse-events.l | 1 +
tools/perf/util/pmu.c | 2 +-
tools/perf/util/python-ext-sources | 2 +-
tools/perf/util/sort.c | 52 ++++++++++++++++++
tools/perf/util/sort.h | 2 +
tools/perf/util/srcline.c | 6 ++-
tools/perf/util/stat.c | 49 -----------------
tools/perf/util/stat.h | 30 -----------
tools/perf/util/util.c | 90 ++++++++++++++++++++++++++++++++
tools/perf/util/util.h | 3 ++
27 files changed, 292 insertions(+), 173 deletions(-)
create mode 100644 tools/perf/util/counts.c
create mode 100644 tools/perf/util/counts.h
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2014-06-19 16:38 Jiri Olsa
0 siblings, 0 replies; 45+ messages in thread
From: Jiri Olsa @ 2014-06-19 16:38 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
David Ahern, Frederic Weisbecker, Jan Kiszka, Jiri Olsa,
Namhyung Kim, Paul Mackerras, Peter Zijlstra, Simon Que,
Steven Rostedt
hi Ingo,
please consider pulling
thanks,
jirka
The following changes since commit 4ba96195051be30160af6d5f5f83f9a055ab1f23:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-06-13 08:19:06 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
for you to fetch changes up to 26d664a30d08002ac0a4dbd09217ea084da07bc9:
perf symbols: Get kernel start address by symbol name (2014-06-19 18:18:38 +0200)
----------------------------------------------------------------
perf/core improvements and fixes:
. Updates from trace-cmd for traceevent plugin_kvm plus args cleanup (Steven Rostedt)
. Fix kernel start address lookup in report code (Simon Que)
. Fix segfault in cumulative.callchain report (Jiri Olsa)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
----------------------------------------------------------------
Jan Kiszka (3):
tools lib traceevent: Report unknown VMX exit reasons with code
tools lib traceevent: Factor out print_exit_reason in kvm plugin
tools lib traceevent: Fix and cleanup kvm_nested_vmexit tracepoints
Jiri Olsa (1):
perf tools: Fix segfault in cumulative.callchain report
Simon Que (1):
perf symbols: Get kernel start address by symbol name
Steven Rostedt (3):
tools lib traceevent: Fix format in plugin_kvm
tools lib traceevent: Clean up format of args in cfg80211 plugin
tools lib traceevent: Clean up format of args in jbd2 plugin
Steven Rostedt (Red Hat) (1):
tools lib traceevent: Add back in kvm plugins nested_vmexit events
tools/lib/traceevent/plugin_cfg80211.c | 3 +-
tools/lib/traceevent/plugin_jbd2.c | 6 ++--
tools/lib/traceevent/plugin_kvm.c | 64 +++++++++++++++++++++++++++++-----
tools/perf/ui/browsers/hists.c | 21 ++++++++---
tools/perf/util/machine.c | 54 ++++++++++++----------------
5 files changed, 97 insertions(+), 51 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2014-06-03 20:36 Jiri Olsa
@ 2014-06-05 8:45 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2014-06-05 8:45 UTC (permalink / raw)
To: Jiri Olsa
Cc: linux-kernel, Adrian Hunter, Arnaldo Carvalho de Melo,
Arnaldo Carvalho de Melo, Cody P Schafer, Corey Ashford,
David Ahern, David Binderman, Dianfang Zhang, Don Zickus,
Frederic Weisbecker, Jean Delvare, Jianyu Zhan, Mike Galbraith,
Namhyung Kim, Paul Mackerras, Peter Zijlstra, Peter Zijlstra,
Sebastian Andrzej Siewior, Stephane Eranian, Sukadev Bhattiprolu
* Jiri Olsa <jolsa@kernel.org> wrote:
> hi Ingo,
> please consider pulling
>
> thanks,
> jirka
>
>
> The following changes since commit 9b261365dd73a5014b49033327ad881708e81f33:
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-06-03 20:22:40 +0200)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
>
> for you to fetch changes up to fc9cabeabf42d76854059e7bce81a02645e7e5ca:
>
> perf tools: Fix 'make help' message error (2014-06-03 21:35:12 +0200)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes:
>
> . Warn the user when trace command is not available (Arnaldo Carvalho de Melo)
>
> . Add warning when disabling perl scripting support due to missing devel files (Arnaldo Carvalho de Melo)
>
> . Consider header files outside perf directory in tags target (Sebastian Andrzej Siewior)
>
> . Allow overriding sysfs and proc finding with env var (Cody P Schafer)
>
> . Fix "==" into "=" in ui_browser__warning assignment (zhangdianfang)
>
> . Factor elide bool handling in sort code (Jiri Olsa)
>
> . Fix poll return value propagation (Jiri Olsa)
>
> . Fix 'make help' message error (Jianyu Zhan)
>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
> perf trace: Warn the user when not available
> perf tools: Add warning when disabling perl scripting support due to missing devel files
>
> Cody P Schafer (1):
> perf tools: Allow overriding sysfs and proc finding with env var
>
> Jianyu Zhan (1):
> perf tools: Fix 'make help' message error
>
> Jiri Olsa (3):
> perf tools: Remove elide setup for SORT_MODE__MEMORY mode
> perf tools: Move elide bool into perf_hpp_fmt struct
> perf record: Fix poll return value propagation
>
> Sebastian Andrzej Siewior (1):
> perf tools: Consider header files outside perf directory in tags target
>
> zhangdianfang (1):
> perf tools: Fix "==" into "=" in ui_browser__warning assignment
>
> tools/lib/api/fs/fs.c | 43 ++++++++++++++++-
> tools/perf/Makefile.perf | 13 ++++--
> tools/perf/builtin-record.c | 6 ++-
> tools/perf/config/Makefile | 3 +-
> tools/perf/perf.c | 8 +++-
> tools/perf/ui/browser.c | 2 +-
> tools/perf/ui/browsers/hists.c | 8 ++--
> tools/perf/util/hist.h | 8 +++-
> tools/perf/util/sort.c | 103 ++++++++++++++++++++++-------------------
> tools/perf/util/sort.h | 2 +-
> 10 files changed, 132 insertions(+), 64 deletions(-)
Pulled, thanks a lot Jiri!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2014-06-03 20:36 Jiri Olsa
2014-06-05 8:45 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Jiri Olsa @ 2014-06-03 20:36 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Adrian Hunter, Arnaldo Carvalho de Melo,
Arnaldo Carvalho de Melo, Cody P Schafer, Corey Ashford,
David Ahern, David Binderman, Dianfang Zhang, Don Zickus,
Frederic Weisbecker, Jean Delvare, Jianyu Zhan, Jiri Olsa,
Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
Peter Zijlstra, Sebastian Andrzej Siewior, Stephane Eranian,
Sukadev Bhattiprolu
hi Ingo,
please consider pulling
thanks,
jirka
The following changes since commit 9b261365dd73a5014b49033327ad881708e81f33:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-06-03 20:22:40 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
for you to fetch changes up to fc9cabeabf42d76854059e7bce81a02645e7e5ca:
perf tools: Fix 'make help' message error (2014-06-03 21:35:12 +0200)
----------------------------------------------------------------
perf/core improvements and fixes:
. Warn the user when trace command is not available (Arnaldo Carvalho de Melo)
. Add warning when disabling perl scripting support due to missing devel files (Arnaldo Carvalho de Melo)
. Consider header files outside perf directory in tags target (Sebastian Andrzej Siewior)
. Allow overriding sysfs and proc finding with env var (Cody P Schafer)
. Fix "==" into "=" in ui_browser__warning assignment (zhangdianfang)
. Factor elide bool handling in sort code (Jiri Olsa)
. Fix poll return value propagation (Jiri Olsa)
. Fix 'make help' message error (Jianyu Zhan)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
perf trace: Warn the user when not available
perf tools: Add warning when disabling perl scripting support due to missing devel files
Cody P Schafer (1):
perf tools: Allow overriding sysfs and proc finding with env var
Jianyu Zhan (1):
perf tools: Fix 'make help' message error
Jiri Olsa (3):
perf tools: Remove elide setup for SORT_MODE__MEMORY mode
perf tools: Move elide bool into perf_hpp_fmt struct
perf record: Fix poll return value propagation
Sebastian Andrzej Siewior (1):
perf tools: Consider header files outside perf directory in tags target
zhangdianfang (1):
perf tools: Fix "==" into "=" in ui_browser__warning assignment
tools/lib/api/fs/fs.c | 43 ++++++++++++++++-
tools/perf/Makefile.perf | 13 ++++--
tools/perf/builtin-record.c | 6 ++-
tools/perf/config/Makefile | 3 +-
tools/perf/perf.c | 8 +++-
tools/perf/ui/browser.c | 2 +-
tools/perf/ui/browsers/hists.c | 8 ++--
tools/perf/util/hist.h | 8 +++-
tools/perf/util/sort.c | 103 ++++++++++++++++++++++-------------------
tools/perf/util/sort.h | 2 +-
10 files changed, 132 insertions(+), 64 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2014-05-28 13:20 Jiri Olsa
0 siblings, 0 replies; 45+ messages in thread
From: Jiri Olsa @ 2014-05-28 13:20 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Adrian Hunter, Arnaldo Carvalho de Melo,
Cody P Schafer, David Ahern, Don Zickus, Frederic Weisbecker,
Javi Merino, Jiri Olsa, Mike Galbraith, Namhyung Kim,
Paul Mackerras, Peter Zijlstra, Sebastian Andrzej Siewior,
Stephane Eranian, Steven Rostedt, Sukadev Bhattiprolu
hi Ingo,
please consider pulling
thanks,
jirka
The following changes since commit e450f90e8c7d0bf70519223c1b848446ae63f313:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-05-22 11:37:40 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
for you to fetch changes up to 34cfec19bd8496279d283498b97069d9a0f7e130:
tools lib traceevent: Added support for __get_bitmask() macro (2014-05-28 15:08:26 +0200)
----------------------------------------------------------------
perf/core improvements and fixes:
. Added support for __get_bitmask() macro to traceevent library (Steven Rostedt)
. Allow overriding sysfs and proc finding with env var (Cody P Schafer)
. Consider header files outside perf directory in tags target (Sebastian Andrzej Siewior)
. Add warning when disabling perl scripting support due to missing devel files (Arnaldo Carvalho de Melo)
. Warn the user when trace command is not available (Arnaldo Carvalho de Melo)
. Pass protection and flags bits through mmap2 interface (Peter Zijlstra)
. Update perf tool mmap2 interface with protection and flag bits (Don Zickus)
. Re-enable mmap interface (Don Zickus)
. Add mem-mode documentation to report command (Don Zickus)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
perf trace: Warn the user when not available
perf tools: Add warning when disabling perl scripting support due to missing devel files
Cody P Schafer (1):
perf tools: Allow overriding sysfs and proc finding with env var
Don Zickus (3):
Revert "perf: Disable PERF_RECORD_MMAP2 support"
perf tools: Update mmap2 interface with protection and flag bits
perf report: Add mem-mode documentation to report command
Peter Zijlstra (1):
perf: Pass protection and flags bits through mmap2 interface
Sebastian Andrzej Siewior (1):
perf tools: Consider header files outside perf directory in tags target
Steven Rostedt (Red Hat) (1):
tools lib traceevent: Added support for __get_bitmask() macro
include/uapi/linux/perf_event.h | 1 +
kernel/events/core.c | 37 ++++++-
tools/lib/api/fs/fs.c | 43 +++++++-
tools/lib/traceevent/event-parse.c | 113 +++++++++++++++++++++
tools/lib/traceevent/event-parse.h | 7 ++
tools/perf/Documentation/perf-report.txt | 22 ++++
tools/perf/Makefile.perf | 9 +-
tools/perf/config/Makefile | 1 +
tools/perf/perf.c | 8 +-
tools/perf/tests/dwarf-unwind.c | 2 +-
tools/perf/util/event.c | 59 +++++++----
tools/perf/util/event.h | 2 +
tools/perf/util/evsel.c | 1 +
tools/perf/util/machine.c | 4 +-
tools/perf/util/map.c | 4 +-
tools/perf/util/map.h | 4 +-
.../perf/util/scripting-engines/trace-event-perl.c | 1 +
.../util/scripting-engines/trace-event-python.c | 1 +
18 files changed, 286 insertions(+), 33 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-30 8:21 ` Peter Zijlstra
@ 2012-10-30 9:14 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2012-10-30 9:14 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo, linux-kernel, Andrew Vagin,
Borislav Petkov, David Howells, Frederic Weisbecker, Jiri Olsa,
Namhyung Kim, Paul Mackerras, Stephane Eranian, Steven Rostedt
* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Tue, 2012-10-30 at 09:18 +0100, Ingo Molnar wrote:
> > > > The optimal way, I guess, would be to have some cache file
> > > > with the results of such feature tests, that would be created
> > > > and then used till the build fails using its findings, which
> > > > would trigger a new feature check round, followed by an
> > > > automatic rebuild.
I did not write that.
I think making the feature tests parallel would be enough to
speed it all up - caching brings in a new set of problems. The
tests are mostly independent and the feature test makefile rules
could be parallelized like the object file rules.
> autoconf!! ;-)
>
> /me runs
hey, we build perf much faster than autoconf's 'configure'
script finishes running ;-)
Thanks,
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-30 8:18 ` Ingo Molnar
@ 2012-10-30 8:21 ` Peter Zijlstra
2012-10-30 9:14 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Peter Zijlstra @ 2012-10-30 8:21 UTC (permalink / raw)
To: Ingo Molnar
Cc: Arnaldo Carvalho de Melo, linux-kernel, Andrew Vagin,
Borislav Petkov, David Howells, Frederic Weisbecker, Jiri Olsa,
Namhyung Kim, Paul Mackerras, Stephane Eranian, Steven Rostedt
On Tue, 2012-10-30 at 09:18 +0100, Ingo Molnar wrote:
> > > The optimal way, I guess, would be to have some cache file
> > > with the results of such feature tests, that would be created
> > > and then used till the build fails using its findings, which
> > > would trigger a new feature check round, followed by an
> > > automatic rebuild.
autoconf!! ;-)
/me runs
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-27 13:19 ` Ingo Molnar
@ 2012-10-30 8:18 ` Ingo Molnar
2012-10-30 8:21 ` Peter Zijlstra
0 siblings, 1 reply; 45+ messages in thread
From: Ingo Molnar @ 2012-10-30 8:18 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Steven Rostedt
* Ingo Molnar <mingo@kernel.org> wrote:
>
> * Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
>
> > Em Fri, Oct 26, 2012 at 04:54:51PM +0200, Ingo Molnar escreveu:
> > > * Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> > > > . Makefile improvements from Namhyung Kim.
> > >
> > > These are really useful: there used to be a couple of
> > > seconds of wait time at the beginning of every perf build -
> > > these are now nicely explained with the various CHK entries.
> >
> > The optimal way, I guess, would be to have some cache file
> > with the results of such feature tests, that would be created
> > and then used till the build fails using its findings, which
> > would trigger a new feature check round, followed by an
> > automatic rebuild.
> >
> > That would be tricky because we would have to have an
> > automated way of discovering if the build failed due to
> > missing packages or if it failed due to some ordinary coding
> > mistake.
>
> The feature tests aren't a big problem right now - but making
> it *visible* is really useful. It also tells us which feature
> test fails, etc.
Btw., there's another thing that would be nice in addition to
simplifying the PERF-VERSION-GEN script: to be able to run the
CHK tests in parallel, like the object file runes.
Right now the CHK tests are serialized and they take several
seconds to build and run. A parallel make rule would reduce
that to about a second I think.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 15:31 ` Namhyung Kim
2012-10-26 15:34 ` Borislav Petkov
@ 2012-10-27 17:12 ` stephane eranian
1 sibling, 0 replies; 45+ messages in thread
From: stephane eranian @ 2012-10-27 17:12 UTC (permalink / raw)
To: Namhyung Kim
Cc: David Ahern, Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Steven Rostedt, arnaldo.melo, Arnaldo Carvalho de Melo
On Fri, Oct 26, 2012 at 5:31 PM, Namhyung Kim <namhyung@kernel.org> wrote:
> 2012-10-26 (금), 09:06 -0600, David Ahern:
>> On 10/26/12 8:54 AM, Ingo Molnar wrote:
>> >> perf/core improvements:
>> >>
>> >> . perf inject changes to allow showing where a task sleeps, from Andrew Vagin.
>> >>
>> >> . Makefile improvements from Namhyung Kim.
>> >
>> > These are really useful: there used to be a couple of seconds of
>> > wait time at the beginning of every perf build - these are now
>> > nicely explained with the various CHK entries.
>
> Kudos to Jiri who did the real work!
>
>>
>> PERF-VERSION-GEN and specifically the git commands are the cause of more
>> delay than the config checks, especially when doing the build in a VM
>> with the kernel source on an NFS mount.
>
> And I see a strange delay when compiling builtin-sched.o. After
> building perf tools, I deleted builtin-{sched,test,script}.o to rebuild
> the only since they are largest ones.
>
Yes, I see that delay on copiling builtin-sched.c on my IVB system.
Don't know why it takes a significant number of seconds to compile
this file. It did not use to be like that a few revisions back. It takes
about 8 seconds on my OC'd IVB (> 4GHz). I don't see much code
in that file.
> namhyung@leonhard:perf$ ls -lS *.c | head -3
> -rw-r--r-- 1 namhyung namhyung 45522 2012-10-27 00:20 builtin-sched.c
> -rw-r--r-- 1 namhyung namhyung 36372 2012-10-27 00:20 builtin-test.c
> -rw-r--r-- 1 namhyung namhyung 35555 2012-10-27 00:20 builtin-script.c
>
> namhyung@leonhard:perf$ rm builtin-{sched,test,script}.o
>
>
> And then building each file with time command shows this:
>
> namhyung@leonhard:perf$ time make builtin-script.o &> /dev/null
>
> real 0m4.577s
> user 0m2.755s
> sys 0m1.655s
>
> namhyung@leonhard:perf$ time make builtin-test.o &> /dev/null
>
> real 0m4.486s
> user 0m2.707s
> sys 0m1.658s
>
> namhyung@leonhard:perf$ time make builtin-sched.o &> /dev/null
>
> real 0m16.936s
> user 0m15.157s
> sys 0m1.635s
>
> You can see it easily when building perf without -j option. But I have
> no idea why it takes so long..
>
> Thanks,
> Namhyung
>
>
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-27 9:16 ` Namhyung Kim
@ 2012-10-27 14:29 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-27 14:29 UTC (permalink / raw)
To: Namhyung Kim
Cc: Borislav Petkov, David Ahern, Ingo Molnar, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt
Em Sat, Oct 27, 2012 at 06:16:31PM +0900, Namhyung Kim escreveu:
> 2012-10-26 (금), 19:20 +0200, Borislav Petkov:
> > On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:
> > > Right, perf'ing perf is a favourite pastime, right?
> >
> > Sure, can I get "perfing perf" on a T-shirt please?
>
> Well, guys, this is not perfing perf. It's about perfing make and/or
> gcc. Anyway I'd also like to get a "perfing perf" T-shirt. ;)
Well, building perf faster will allow us to perf perf faster. ;-)
- Arnaldo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 17:05 ` Arnaldo Carvalho de Melo
@ 2012-10-27 13:19 ` Ingo Molnar
2012-10-30 8:18 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Ingo Molnar @ 2012-10-27 13:19 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Steven Rostedt
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Em Fri, Oct 26, 2012 at 04:54:51PM +0200, Ingo Molnar escreveu:
> > * Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> > > . Makefile improvements from Namhyung Kim.
> >
> > These are really useful: there used to be a couple of
> > seconds of wait time at the beginning of every perf build -
> > these are now nicely explained with the various CHK entries.
>
> The optimal way, I guess, would be to have some cache file
> with the results of such feature tests, that would be created
> and then used till the build fails using its findings, which
> would trigger a new feature check round, followed by an
> automatic rebuild.
>
> That would be tricky because we would have to have an
> automated way of discovering if the build failed due to
> missing packages or if it failed due to some ordinary coding
> mistake.
The feature tests aren't a big problem right now - but making it
*visible* is really useful. It also tells us which feature test
fails, etc.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 17:20 ` Borislav Petkov
@ 2012-10-27 9:16 ` Namhyung Kim
2012-10-27 14:29 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 45+ messages in thread
From: Namhyung Kim @ 2012-10-27 9:16 UTC (permalink / raw)
To: Borislav Petkov
Cc: Arnaldo Carvalho de Melo, David Ahern, Ingo Molnar, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt
2012-10-26 (금), 19:20 +0200, Borislav Petkov:
> On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:
> > Right, perf'ing perf is a favourite pastime, right?
>
> Sure, can I get "perfing perf" on a T-shirt please?
Well, guys, this is not perfing perf. It's about perfing make and/or
gcc. Anyway I'd also like to get a "perfing perf" T-shirt. ;)
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 16:31 ` Arnaldo Carvalho de Melo
@ 2012-10-26 17:20 ` Borislav Petkov
2012-10-27 9:16 ` Namhyung Kim
0 siblings, 1 reply; 45+ messages in thread
From: Borislav Petkov @ 2012-10-26 17:20 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Namhyung Kim, David Ahern, Ingo Molnar, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt
On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote:
> Right, perf'ing perf is a favourite pastime, right?
Sure, can I get "perfing perf" on a T-shirt please?
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 14:54 ` Ingo Molnar
2012-10-26 15:06 ` David Ahern
@ 2012-10-26 17:05 ` Arnaldo Carvalho de Melo
2012-10-27 13:19 ` Ingo Molnar
1 sibling, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-26 17:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Steven Rostedt
Em Fri, Oct 26, 2012 at 04:54:51PM +0200, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> > . Makefile improvements from Namhyung Kim.
>
> These are really useful: there used to be a couple of seconds of
> wait time at the beginning of every perf build - these are now
> nicely explained with the various CHK entries.
The optimal way, I guess, would be to have some cache file with the
results of such feature tests, that would be created and then used till
the build fails using its findings, which would trigger a new feature
check round, followed by an automatic rebuild.
That would be tricky because we would have to have an automated way of
discovering if the build failed due to missing packages or if it failed
due to some ordinary coding mistake.
- Arnaldo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 15:34 ` Borislav Petkov
@ 2012-10-26 16:31 ` Arnaldo Carvalho de Melo
2012-10-26 17:20 ` Borislav Petkov
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-26 16:31 UTC (permalink / raw)
To: Borislav Petkov, Namhyung Kim, David Ahern, Ingo Molnar,
linux-kernel, Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt
Em Fri, Oct 26, 2012 at 05:34:32PM +0200, Borislav Petkov escreveu:
> On Sat, Oct 27, 2012 at 12:31:42AM +0900, Namhyung Kim wrote:
> > You can see it easily when building perf without -j option. But I have
> > no idea why it takes so long..
> Well, you can trace that workload with perf itself, no, and see the
> hotspots.
Right, perf'ing perf is a favourite pastime, right?
- Arnaldo
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 15:31 ` Namhyung Kim
@ 2012-10-26 15:34 ` Borislav Petkov
2012-10-26 16:31 ` Arnaldo Carvalho de Melo
2012-10-27 17:12 ` stephane eranian
1 sibling, 1 reply; 45+ messages in thread
From: Borislav Petkov @ 2012-10-26 15:34 UTC (permalink / raw)
To: Namhyung Kim
Cc: David Ahern, Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt, arnaldo.melo,
Arnaldo Carvalho de Melo
On Sat, Oct 27, 2012 at 12:31:42AM +0900, Namhyung Kim wrote:
> And I see a strange delay when compiling builtin-sched.o. After
> building perf tools, I deleted builtin-{sched,test,script}.o to rebuild
> the only since they are largest ones.
>
> namhyung@leonhard:perf$ ls -lS *.c | head -3
> -rw-r--r-- 1 namhyung namhyung 45522 2012-10-27 00:20 builtin-sched.c
> -rw-r--r-- 1 namhyung namhyung 36372 2012-10-27 00:20 builtin-test.c
> -rw-r--r-- 1 namhyung namhyung 35555 2012-10-27 00:20 builtin-script.c
>
> namhyung@leonhard:perf$ rm builtin-{sched,test,script}.o
>
>
> And then building each file with time command shows this:
>
> namhyung@leonhard:perf$ time make builtin-script.o &> /dev/null
>
> real 0m4.577s
> user 0m2.755s
> sys 0m1.655s
>
> namhyung@leonhard:perf$ time make builtin-test.o &> /dev/null
>
> real 0m4.486s
> user 0m2.707s
> sys 0m1.658s
>
> namhyung@leonhard:perf$ time make builtin-sched.o &> /dev/null
>
> real 0m16.936s
> user 0m15.157s
> sys 0m1.635s
>
> You can see it easily when building perf without -j option. But I have
> no idea why it takes so long..
Well, you can trace that workload with perf itself, no, and see the
hotspots.
:-)
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 15:06 ` David Ahern
@ 2012-10-26 15:31 ` Namhyung Kim
2012-10-26 15:34 ` Borislav Petkov
2012-10-27 17:12 ` stephane eranian
0 siblings, 2 replies; 45+ messages in thread
From: Namhyung Kim @ 2012-10-26 15:31 UTC (permalink / raw)
To: David Ahern
Cc: Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel,
Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Paul Mackerras, Peter Zijlstra,
Stephane Eranian, Steven Rostedt, arnaldo.melo,
Arnaldo Carvalho de Melo
2012-10-26 (금), 09:06 -0600, David Ahern:
> On 10/26/12 8:54 AM, Ingo Molnar wrote:
> >> perf/core improvements:
> >>
> >> . perf inject changes to allow showing where a task sleeps, from Andrew Vagin.
> >>
> >> . Makefile improvements from Namhyung Kim.
> >
> > These are really useful: there used to be a couple of seconds of
> > wait time at the beginning of every perf build - these are now
> > nicely explained with the various CHK entries.
Kudos to Jiri who did the real work!
>
> PERF-VERSION-GEN and specifically the git commands are the cause of more
> delay than the config checks, especially when doing the build in a VM
> with the kernel source on an NFS mount.
And I see a strange delay when compiling builtin-sched.o. After
building perf tools, I deleted builtin-{sched,test,script}.o to rebuild
the only since they are largest ones.
namhyung@leonhard:perf$ ls -lS *.c | head -3
-rw-r--r-- 1 namhyung namhyung 45522 2012-10-27 00:20 builtin-sched.c
-rw-r--r-- 1 namhyung namhyung 36372 2012-10-27 00:20 builtin-test.c
-rw-r--r-- 1 namhyung namhyung 35555 2012-10-27 00:20 builtin-script.c
namhyung@leonhard:perf$ rm builtin-{sched,test,script}.o
And then building each file with time command shows this:
namhyung@leonhard:perf$ time make builtin-script.o &> /dev/null
real 0m4.577s
user 0m2.755s
sys 0m1.655s
namhyung@leonhard:perf$ time make builtin-test.o &> /dev/null
real 0m4.486s
user 0m2.707s
sys 0m1.658s
namhyung@leonhard:perf$ time make builtin-sched.o &> /dev/null
real 0m16.936s
user 0m15.157s
sys 0m1.635s
You can see it easily when building perf without -j option. But I have
no idea why it takes so long..
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 14:54 ` Ingo Molnar
@ 2012-10-26 15:06 ` David Ahern
2012-10-26 15:31 ` Namhyung Kim
2012-10-26 17:05 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 45+ messages in thread
From: David Ahern @ 2012-10-26 15:06 UTC (permalink / raw)
To: Ingo Molnar
Cc: Arnaldo Carvalho de Melo, linux-kernel, Andrew Vagin,
Borislav Petkov, David Howells, Frederic Weisbecker, Jiri Olsa,
Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Steven Rostedt, arnaldo.melo, Arnaldo Carvalho de Melo
On 10/26/12 8:54 AM, Ingo Molnar wrote:
>> perf/core improvements:
>>
>> . perf inject changes to allow showing where a task sleeps, from Andrew Vagin.
>>
>> . Makefile improvements from Namhyung Kim.
>
> These are really useful: there used to be a couple of seconds of
> wait time at the beginning of every perf build - these are now
> nicely explained with the various CHK entries.
PERF-VERSION-GEN and specifically the git commands are the cause of more
delay than the config checks, especially when doing the build in a VM
with the kernel source on an NFS mount.
David
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-10-26 14:31 Arnaldo Carvalho de Melo
@ 2012-10-26 14:54 ` Ingo Molnar
2012-10-26 15:06 ` David Ahern
2012-10-26 17:05 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 45+ messages in thread
From: Ingo Molnar @ 2012-10-26 14:54 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Andrew Vagin, Borislav Petkov, David Howells,
Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Steven Rostedt, arnaldo.melo,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 8f7c1d07ade50dcdea7ec779b277e891f5c8292a:
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-10-26 10:30:49 +0200)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
>
> for you to fetch changes up to 1f16c5754d3a4008c29f3bf67b4f1271313ba385:
>
> perf stat: Add --pre and --post command (2012-10-26 11:22:25 -0200)
>
> ----------------------------------------------------------------
> perf/core improvements:
>
> . perf inject changes to allow showing where a task sleeps, from Andrew Vagin.
>
> . Makefile improvements from Namhyung Kim.
These are really useful: there used to be a couple of seconds of
wait time at the beginning of every perf build - these are now
nicely explained with the various CHK entries.
>
> . Add --pre and --post command hooks in 'stat', from Peter Zijlstra.
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Andrew Vagin (3):
> perf inject: Work with files
> perf inject: Merge sched_stat_* and sched_switch events
> perf inject: Mark a dso if it's used
>
> Namhyung Kim (5):
> tools lib traceevent: Do not generate dependency for system header files
> perf tools: Cleanup doc related targets
> perf tools: Convert invocation of MAKE into SUBDIR
> perf tools: Always show CHK message when doing try-cc
> perf tools: Fix LIBELF_MMAP checking
>
> Peter Zijlstra (1):
> perf stat: Add --pre and --post command
>
> tools/lib/traceevent/Makefile | 2 +-
> tools/perf/Documentation/perf-inject.txt | 11 ++
> tools/perf/Documentation/perf-stat.txt | 5 +
> tools/perf/Makefile | 51 ++------
> tools/perf/builtin-inject.c | 189 ++++++++++++++++++++++++++++--
> tools/perf/builtin-stat.c | 42 ++++++-
> tools/perf/config/utilities.mak | 3 +-
> tools/perf/util/build-id.c | 10 +-
> tools/perf/util/build-id.h | 4 +
> 9 files changed, 256 insertions(+), 61 deletions(-)
Pulled, thanks Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2012-10-26 14:31 Arnaldo Carvalho de Melo
2012-10-26 14:54 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-10-26 14:31 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Andrew Vagin,
Borislav Petkov, David Howells, Frederic Weisbecker, Jiri Olsa,
Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Steven Rostedt, arnaldo.melo, Arnaldo Carvalho de Melo
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 8f7c1d07ade50dcdea7ec779b277e891f5c8292a:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-10-26 10:30:49 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
for you to fetch changes up to 1f16c5754d3a4008c29f3bf67b4f1271313ba385:
perf stat: Add --pre and --post command (2012-10-26 11:22:25 -0200)
----------------------------------------------------------------
perf/core improvements:
. perf inject changes to allow showing where a task sleeps, from Andrew Vagin.
. Makefile improvements from Namhyung Kim.
. Add --pre and --post command hooks in 'stat', from Peter Zijlstra.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Andrew Vagin (3):
perf inject: Work with files
perf inject: Merge sched_stat_* and sched_switch events
perf inject: Mark a dso if it's used
Namhyung Kim (5):
tools lib traceevent: Do not generate dependency for system header files
perf tools: Cleanup doc related targets
perf tools: Convert invocation of MAKE into SUBDIR
perf tools: Always show CHK message when doing try-cc
perf tools: Fix LIBELF_MMAP checking
Peter Zijlstra (1):
perf stat: Add --pre and --post command
tools/lib/traceevent/Makefile | 2 +-
tools/perf/Documentation/perf-inject.txt | 11 ++
tools/perf/Documentation/perf-stat.txt | 5 +
tools/perf/Makefile | 51 ++------
tools/perf/builtin-inject.c | 189 ++++++++++++++++++++++++++++--
tools/perf/builtin-stat.c | 42 ++++++-
tools/perf/config/utilities.mak | 3 +-
tools/perf/util/build-id.c | 10 +-
tools/perf/util/build-id.h | 4 +
9 files changed, 256 insertions(+), 61 deletions(-)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-09-08 20:36 Arnaldo Carvalho de Melo
@ 2012-09-09 8:40 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2012-09-09 8:40 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
Irina Tirdea, Irina Tirdea, Namhyung Kim, Namhyung Kim,
Paul Mackerras, Pekka Enberg, Peter Zijlstra, Srikar Dronamraju,
Steven Rostedt
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> Hi Ingo,
>
> Please consider pulling,
>
> Thanks,
>
> - Arnaldo
>
> The following changes since commit ef34eb4da3eb62a1511592adf7c76d74faca0b14:
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-08 13:26:02 +0200)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
>
> for you to fetch changes up to 6c7f631261064762a8ba1ee34fc2b76d117ef3fa:
>
> perf symbols: Remove BIONIC wrapper around libgen.h (2012-09-08 17:15:16 -0300)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes
>
> . Don't pass const char pointers to basename, so that we can unconditionally
> use libgen.h and thus avoid ifdef BIONIC lines, from David Ahern
>
> . Fix assert/BUG_ON when NDEBUG is defined, from Irina Tirdea.
>
> . Refactor hist formatting so that it can be reused with the GTK browser,
> From Namhyung Kim
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> David Ahern (3):
> perf annotate: Make a copy of filename for passing to basename
> perf probe: Make a copy of exec path for passing to basename
> perf symbols: Remove BIONIC wrapper around libgen.h
>
> Irina Tirdea (1):
> perf bench: fix assert when NDEBUG is defined
>
> Namhyung Kim (5):
> perf hists: Introduce perf_hpp for hist period printing
> perf hists: Handle field separator properly
> perf hists: Use perf_hpp__format->width to calculate the column widths
> perf hists browser: Use perf_hpp__format functions
> perf gtk/browser: Use perf_hpp__format functions
>
> tools/perf/Makefile | 2 +
> tools/perf/bench/sched-pipe.c | 6 +-
> tools/perf/builtin-diff.c | 1 +
> tools/perf/ui/browsers/hists.c | 96 ++++++--
> tools/perf/ui/gtk/browser.c | 101 +++++++--
> tools/perf/ui/gtk/gtk.h | 1 +
> tools/perf/ui/gtk/setup.c | 1 +
> tools/perf/ui/hist.c | 389 ++++++++++++++++++++++++++++++++
> tools/perf/ui/setup.c | 8 +-
> tools/perf/ui/stdio/hist.c | 239 ++++----------------
> tools/perf/ui/tui/setup.c | 4 +
> tools/perf/util/annotate.c | 9 +-
> tools/perf/util/hist.c | 33 ---
> tools/perf/util/hist.h | 37 +++
> tools/perf/util/include/linux/kernel.h | 4 +
> tools/perf/util/probe-event.c | 12 +-
> tools/perf/util/symbol.h | 2 -
> 17 files changed, 665 insertions(+), 280 deletions(-)
> create mode 100644 tools/perf/ui/hist.c
Pulled, thanks Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2012-09-08 20:36 Arnaldo Carvalho de Melo
2012-09-09 8:40 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-08 20:36 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
Irina Tirdea, Irina Tirdea, Namhyung Kim, Namhyung Kim,
Paul Mackerras, Pekka Enberg, Peter Zijlstra, Srikar Dronamraju,
Steven Rostedt
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Hi Ingo,
Please consider pulling,
Thanks,
- Arnaldo
The following changes since commit ef34eb4da3eb62a1511592adf7c76d74faca0b14:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-08 13:26:02 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
for you to fetch changes up to 6c7f631261064762a8ba1ee34fc2b76d117ef3fa:
perf symbols: Remove BIONIC wrapper around libgen.h (2012-09-08 17:15:16 -0300)
----------------------------------------------------------------
perf/core improvements and fixes
. Don't pass const char pointers to basename, so that we can unconditionally
use libgen.h and thus avoid ifdef BIONIC lines, from David Ahern
. Fix assert/BUG_ON when NDEBUG is defined, from Irina Tirdea.
. Refactor hist formatting so that it can be reused with the GTK browser,
From Namhyung Kim
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
David Ahern (3):
perf annotate: Make a copy of filename for passing to basename
perf probe: Make a copy of exec path for passing to basename
perf symbols: Remove BIONIC wrapper around libgen.h
Irina Tirdea (1):
perf bench: fix assert when NDEBUG is defined
Namhyung Kim (5):
perf hists: Introduce perf_hpp for hist period printing
perf hists: Handle field separator properly
perf hists: Use perf_hpp__format->width to calculate the column widths
perf hists browser: Use perf_hpp__format functions
perf gtk/browser: Use perf_hpp__format functions
tools/perf/Makefile | 2 +
tools/perf/bench/sched-pipe.c | 6 +-
tools/perf/builtin-diff.c | 1 +
tools/perf/ui/browsers/hists.c | 96 ++++++--
tools/perf/ui/gtk/browser.c | 101 +++++++--
tools/perf/ui/gtk/gtk.h | 1 +
tools/perf/ui/gtk/setup.c | 1 +
tools/perf/ui/hist.c | 389 ++++++++++++++++++++++++++++++++
tools/perf/ui/setup.c | 8 +-
tools/perf/ui/stdio/hist.c | 239 ++++----------------
tools/perf/ui/tui/setup.c | 4 +
tools/perf/util/annotate.c | 9 +-
tools/perf/util/hist.c | 33 ---
tools/perf/util/hist.h | 37 +++
tools/perf/util/include/linux/kernel.h | 4 +
tools/perf/util/probe-event.c | 12 +-
tools/perf/util/symbol.h | 2 -
17 files changed, 665 insertions(+), 280 deletions(-)
create mode 100644 tools/perf/ui/hist.c
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [GIT PULL 0/9] perf/core improvements and fixes
2012-01-24 23:07 Arnaldo Carvalho de Melo
@ 2012-01-26 11:16 ` Ingo Molnar
0 siblings, 0 replies; 45+ messages in thread
From: Ingo Molnar @ 2012-01-26 11:16 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, David Ahern, David Daney, Frederic Weisbecker,
Jan Beulich, Joerg Roedel, Masami Hiramatsu, Mike Galbraith,
Namhyung Kim, Paul Mackerras, Peter Zijlstra, Srikar Dronamraju,
Stephane Eranian, arnaldo.melo
* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> Hi Ingo,
>
> This is a signed tag, please lemme know if everything went well.
>
> The --uid feature works for root, we still need to
> sort out that paranoia with some threads owned by a user that
> prevents 'perf --uid non-root-user' to work for
> 'non-root-user'.
Just wondering what detail causes that failure - the whole point
of --uid mingo would be to enable nonprivileged users to do
'session wide' profiling, *especially* if paranoia is high.
So what does --uid do which perf record --pid 1234 wouldnt
already do? By all means --uid ought to be a fancy way of doing
a whole bunch of perf record --pid 1234 profiling sessions, at
once.
[ Btw, we should probably alias --user to --uid as well, as that
might be the intuitive thing people would typically use? ]
> http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=tag;h=ce9600c4c664ce7f97e8aa5e756b0b4ea5b017c7
> looks ok to me, need just to improve on the commit log message, I'll get
> used to it :-)
>
> - Arnaldo
>
> The following changes since commit 172d1b0b73256551f100fc00c69e356d047103f5:
>
> perf tools: Fix compile error on x86_64 Ubuntu (2012-01-08 13:34:55 -0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf-core-for-mingo
>
> for you to fetch changes up to f8f4b2872295dca88339ec0c403b2217b1197353:
>
> perf tools: Fix strlen() bug in perf_event__synthesize_event_type() (2012-01-24 20:31:34 -0200)
>
> ----------------------------------------------------------------
> perf/core improvements and fixes
>
> ----------------------------------------------------------------
Anyway, pulled, thanks a lot Arnaldo!
One detail: don't we want some of these fixes cherry-picked into
perf/urgent as well?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 45+ messages in thread
* [GIT PULL 0/9] perf/core improvements and fixes
@ 2012-01-24 23:07 Arnaldo Carvalho de Melo
2012-01-26 11:16 ` Ingo Molnar
0 siblings, 1 reply; 45+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-01-24 23:07 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern, David Daney,
Frederic Weisbecker, Jan Beulich, Joerg Roedel, Masami Hiramatsu,
Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
Srikar Dronamraju, Stephane Eranian, arnaldo.melo
Hi Ingo,
This is a signed tag, please lemme know if everything went well.
The --uid feature works for root, we still need to sort out that
paranoia with some threads owned by a user that prevents 'perf --uid
non-root-user' to work for 'non-root-user'.
http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=tag;h=ce9600c4c664ce7f97e8aa5e756b0b4ea5b017c7
looks ok to me, need just to improve on the commit log message, I'll get
used to it :-)
- Arnaldo
The following changes since commit 172d1b0b73256551f100fc00c69e356d047103f5:
perf tools: Fix compile error on x86_64 Ubuntu (2012-01-08 13:34:55 -0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf-core-for-mingo
for you to fetch changes up to f8f4b2872295dca88339ec0c403b2217b1197353:
perf tools: Fix strlen() bug in perf_event__synthesize_event_type() (2012-01-24 20:31:34 -0200)
----------------------------------------------------------------
perf/core improvements and fixes
----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
perf tools: Add fprintf methods for thread_map and cpu_map classes
perf tools: Introduce per user view
David Daney (1):
perf tools: Fix broken build by defining _GNU_SOURCE in Makefile
Jan Beulich (4):
perf bench: Make "default" memcpy() selection actually use glibc's implementation
perf bench: Also allow measuring alternative memcpy implementations
perf bench: Also allow measuring memset()
perf bench: Allow passing an iteration count to "bench mem mem{cpy,set}"
Srikar Dronamraju (1):
perf probe: Usability fixes
Stephane Eranian (1):
perf tools: Fix strlen() bug in perf_event__synthesize_event_type()
tools/perf/Documentation/perf-record.txt | 4 +
tools/perf/Documentation/perf-top.txt | 4 +
tools/perf/Makefile | 11 +-
tools/perf/bench/bench.h | 1 +
tools/perf/bench/mem-memcpy-x86-64-asm-def.h | 8 +
tools/perf/bench/mem-memcpy-x86-64-asm.S | 6 +-
tools/perf/bench/mem-memcpy.c | 11 +-
tools/perf/bench/mem-memset-arch.h | 12 +
tools/perf/bench/mem-memset-x86-64-asm-def.h | 12 +
tools/perf/bench/mem-memset-x86-64-asm.S | 6 +
tools/perf/bench/mem-memset.c | 298 ++++++++++++++++++++++++++
tools/perf/builtin-bench.c | 3 +
tools/perf/builtin-probe.c | 2 -
tools/perf/builtin-record.c | 12 +-
tools/perf/builtin-stat.c | 2 +-
tools/perf/builtin-test.c | 8 +-
tools/perf/builtin-top.c | 22 ++-
tools/perf/perf.h | 1 +
tools/perf/util/cpumap.c | 11 +
tools/perf/util/cpumap.h | 4 +
tools/perf/util/evlist.c | 6 +-
tools/perf/util/evlist.h | 2 +-
tools/perf/util/header.c | 2 +-
tools/perf/util/hist.h | 1 +
tools/perf/util/include/asm/dwarf2.h | 4 +-
tools/perf/util/probe-event.c | 8 +-
tools/perf/util/python.c | 10 +-
tools/perf/util/symbol.c | 1 -
tools/perf/util/thread_map.c | 109 +++++++++-
tools/perf/util/thread_map.h | 7 +-
tools/perf/util/top.c | 3 +
tools/perf/util/top.h | 2 +
tools/perf/util/trace-event-parse.c | 3 +-
tools/perf/util/ui/browsers/hists.c | 5 +-
tools/perf/util/ui/helpline.c | 1 -
tools/perf/util/usage.c | 39 ++++
tools/perf/util/util.h | 3 +-
37 files changed, 597 insertions(+), 47 deletions(-)
create mode 100644 tools/perf/bench/mem-memset-arch.h
create mode 100644 tools/perf/bench/mem-memset-x86-64-asm-def.h
create mode 100644 tools/perf/bench/mem-memset-x86-64-asm.S
create mode 100644 tools/perf/bench/mem-memset.c
^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2017-04-01 10:44 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 2:10 [GIT PULL 0/9] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 1/9] perf tools: Remove support for command aliases Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 2/9] perf/sdt/x86: Add renaming logic for (missing) 8 bit registers Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 3/9] perf/sdt/x86: Move OP parser to tools/perf/arch/x86/ Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 4/9] perf report: Drop cycles 0 for LBR print Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 5/9] perf trace: Handle unpaired raw_syscalls:sys_exit event Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 6/9] perf utils: Fix spelling mistake: "Invalud" -> "Invalid" Arnaldo Carvalho de Melo
2017-04-01 2:10 ` Arnaldo Carvalho de Melo
2017-04-01 2:10 ` [PATCH 7/9] tools include uapi: Grab copies of stat.h and fcntl.h Arnaldo Carvalho de Melo
2017-04-01 2:11 ` [PATCH 8/9] perf tools: Do not fail in case of empty HOME env variable Arnaldo Carvalho de Melo
2017-04-01 2:11 ` [PATCH 9/9] perf trace: Beautify statx syscall 'flag' and 'mask' arguments Arnaldo Carvalho de Melo
2017-04-01 10:44 ` [GIT PULL 0/9] perf/core improvements and fixes Ingo Molnar
2017-04-01 10:44 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2015-12-11 14:22 Arnaldo Carvalho de Melo
2015-12-14 8:32 ` Ingo Molnar
2015-09-23 1:57 Arnaldo Carvalho de Melo
2015-09-23 7:45 ` Ingo Molnar
2015-08-21 16:10 Arnaldo Carvalho de Melo
2015-08-22 6:47 ` Ingo Molnar
2015-08-10 20:56 Arnaldo Carvalho de Melo
2015-08-12 10:18 ` Ingo Molnar
2014-06-19 16:38 Jiri Olsa
2014-06-03 20:36 Jiri Olsa
2014-06-05 8:45 ` Ingo Molnar
2014-05-28 13:20 Jiri Olsa
2012-10-26 14:31 Arnaldo Carvalho de Melo
2012-10-26 14:54 ` Ingo Molnar
2012-10-26 15:06 ` David Ahern
2012-10-26 15:31 ` Namhyung Kim
2012-10-26 15:34 ` Borislav Petkov
2012-10-26 16:31 ` Arnaldo Carvalho de Melo
2012-10-26 17:20 ` Borislav Petkov
2012-10-27 9:16 ` Namhyung Kim
2012-10-27 14:29 ` Arnaldo Carvalho de Melo
2012-10-27 17:12 ` stephane eranian
2012-10-26 17:05 ` Arnaldo Carvalho de Melo
2012-10-27 13:19 ` Ingo Molnar
2012-10-30 8:18 ` Ingo Molnar
2012-10-30 8:21 ` Peter Zijlstra
2012-10-30 9:14 ` Ingo Molnar
2012-09-08 20:36 Arnaldo Carvalho de Melo
2012-09-09 8:40 ` Ingo Molnar
2012-01-24 23:07 Arnaldo Carvalho de Melo
2012-01-26 11:16 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.