Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1493507 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2016-09-29 16:40 +0200 |
| Last post | 2016-09-29 19:20 +0200 |
| Articles | 11 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/27] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:40 +0200
[PATCH 23/27] perf probe: Ignore the error of finding inline instance Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:40 +0200
[PATCH 14/27] perf probe: Increase debug level of SDT debug messages Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 15/27] perf intel-pt: Fix snapshot overlap detection decoder errors Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 21/27] perf intel-pt: Enable decoder to handle TIP.PGD with missing IP Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 18/27] perf intel-pt: Add a helper function for processing AUXTRACE_INFO Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 11/27] perf record: Fix error paths Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 12/27] perf symbols: Add dso__last_symbol() Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 08/27] perf evsel: Add support for address filters Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
[PATCH 25/27] perf probe: Fix to cut off incompatible chars from group name Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-29 16:50 +0200
Re: [GIT PULL 00/27] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-09-29 19:20 +0200
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:40 +0200 |
| Subject | [GIT PULL 00/27] perf/core improvements and fixes |
| Message-ID | <smKFb-5jC-3@gated-at.bofh.it> |
Hi Ingo,
Please consider pulling, more to come soon,
- Arnaldo
Build and test results at the end of this message.
The following changes since commit 6b652de2b27c0a4020ce0e8f277e782b6af76096:
Merge tag 'perf-core-for-mingo-20160922' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-09-23 07:21:38 +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-20160929
for you to fetch changes up to d18019a53a07e009899ff6b8dc5ec30f249360d9:
perf tests: Add dwarf unwind test for powerpc (2016-09-29 11:18:21 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
-------------
New features:
- Add support for using symbols in address filters with Intel PT and ARM
CoreSight (hardware assisted tracing facilities) (Adrian Hunter, Mathieu Poirier)
Fixes:
- Fix MMAP event synthesis for pre-existing threads when no hugetlbfs
mount is in place (Adrian Hunter)
- Don't ignore kernel idle symbols in 'perf script' (Adrian Hunter)
- Assorted Intel PT fixes (Adrian Hunter)
Improvements:
- Fix handling of C++ symbols in 'perf probe' (Masami Hiramatsu)
- Beautify sched_[gs]et_attr return value in 'perf trace' (Arnaldo Carvalho de Melo)
Infrastructure:
---------------
New features:
- Add dwarf unwind 'perf test' for powerpc (Ravi Bangoria)
Fixes:
- Fix error paths in 'perf record' (Adrian Hunter)
Documentation:
- Update documentation info about quipper, a C++ parser for converting
to/from perf.data/chromium profiling format (Simon Que)
Build Fixes:
Fix building in 32 bit platform with libbabeltrace (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Adrian Hunter (16):
perf record: Fix documentation 'event_sources' -> 'event_source'
perf tools: Fix MMAP event synthesis broken by MAP_HUGETLB change
perf script: Fix vanished idle symbols
perf record: Rename label 'out_symbol_exit'
perf record: Fix error paths
perf symbols: Add dso__last_symbol()
perf record: Add support for using symbols in address filters
perf probe: Increase debug level of SDT debug messages
perf intel-pt: Fix snapshot overlap detection decoder errors
perf intel-pt: Add support for recording the max non-turbo ratio
perf intel-pt: Fix missing error codes processing auxtrace_info
perf intel-pt: Add a helper function for processing AUXTRACE_INFO
perf intel-pt: Record address filter in AUXTRACE_INFO event
perf intel-pt: Read address filter from AUXTRACE_INFO event
perf intel-pt: Enable decoder to handle TIP.PGD with missing IP
perf intel-pt: Fix decoding when there are address filters
Arnaldo Carvalho de Melo (1):
perf trace: Beautify sched_[gs]et_attr return value
Masami Hiramatsu (4):
perf probe: Ignore the error of finding inline instance
perf probe: Skip if the function address is 0
perf probe: Fix to cut off incompatible chars from group name
perf probe: Match linkage name with mangled name
Mathieu Poirier (3):
perf tools: Make perf_evsel__append_filter() generic
perf evsel: New tracepoint specific function
perf evsel: Add support for address filters
Ravi Bangoria (1):
perf tests: Add dwarf unwind test for powerpc
Simon Que (1):
perf tools: Update documentation info about quipper
Wang Nan (1):
perf data: Fix building in 32 bit platform with libbabeltrace
tools/perf/Documentation/perf-record.txt | 61 +-
tools/perf/Documentation/perf.data-file-format.txt | 6 +-
tools/perf/arch/powerpc/Build | 1 +
tools/perf/arch/powerpc/include/arch-tests.h | 13 +
tools/perf/arch/powerpc/include/perf_regs.h | 2 +
tools/perf/arch/powerpc/tests/Build | 4 +
tools/perf/arch/powerpc/tests/arch-tests.c | 15 +
tools/perf/arch/powerpc/tests/dwarf-unwind.c | 62 ++
tools/perf/arch/powerpc/tests/regs_load.S | 94 +++
tools/perf/arch/x86/util/intel-pt.c | 57 +-
tools/perf/builtin-record.c | 32 +-
tools/perf/builtin-trace.c | 10 +-
tools/perf/tests/Build | 2 +-
tools/perf/tests/dwarf-unwind.c | 2 +-
tools/perf/util/auxtrace.c | 737 +++++++++++++++++++++
tools/perf/util/auxtrace.h | 54 ++
tools/perf/util/build-id.c | 4 +-
tools/perf/util/data-convert-bt.c | 2 +-
tools/perf/util/dwarf-aux.c | 28 +-
tools/perf/util/dwarf-aux.h | 3 +
tools/perf/util/event.c | 3 +-
tools/perf/util/evsel.c | 16 +-
tools/perf/util/evsel.h | 5 +-
tools/perf/util/evsel_fprintf.c | 7 +-
.../perf/util/intel-pt-decoder/intel-pt-decoder.c | 30 +
.../perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 +
tools/perf/util/intel-pt.c | 172 ++++-
tools/perf/util/intel-pt.h | 4 +-
tools/perf/util/parse-events.c | 41 +-
tools/perf/util/probe-event.c | 10 +-
tools/perf/util/probe-file.c | 2 +-
tools/perf/util/probe-finder.c | 17 +-
tools/perf/util/symbol.c | 15 +
tools/perf/util/symbol.h | 1 +
34 files changed, 1451 insertions(+), 62 deletions(-)
create mode 100644 tools/perf/arch/powerpc/include/arch-tests.h
create mode 100644 tools/perf/arch/powerpc/tests/Build
create mode 100644 tools/perf/arch/powerpc/tests/arch-tests.c
create mode 100644 tools/perf/arch/powerpc/tests/dwarf-unwind.c
create mode 100644 tools/perf/arch/powerpc/tests/regs_load.S
# time dm
1 alpine:3.4: Ok
2 android-ndk:r12b-arm: Ok
3 archlinux:latest: Ok
4 centos:5: Ok
5 centos:6: Ok
6 centos:7: Ok
7 debian:7: Ok
8 debian:8: Ok
9 debian:experimental: Ok
10 fedora:20: Ok
11 fedora:21: Ok
12 fedora:22: Ok
13 fedora:23: Ok
14 fedora:24: Ok
15 fedora:24-x-ARC-uClibc: Ok
16 fedora:rawhide: Ok
17 mageia:5: Ok
18 opensuse:13.2: Ok
19 opensuse:42.1: Ok
20 opensuse:tumbleweed: Ok
21 ubuntu:12.04.5: Ok
22 ubuntu:14.04: Ok
23 ubuntu:14.04.4: Ok
24 ubuntu:15.10: Ok
25 ubuntu:16.04: Ok
26 ubuntu:16.04-x-arm: Ok
27 ubuntu:16.04-x-arm64: Ok
28 ubuntu:16.04-x-powerpc: Ok
29 ubuntu:16.04-x-powerpc64: Ok
30 ubuntu:16.04-x-powerpc64el: Ok
31 ubuntu:16.04-x-s390: Ok
32 ubuntu:16.10: Ok
33 2246.21
real 37m26.862s
user 0m2.148s
sys 0m2.256s
#
# 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 events tests : Ok
6: Validate PERF_RECORD_* events & perf_sample fields : Ok
7: Test perf pmu format parsing : Ok
8: Test dso data read : Ok
9: Test dso data cache : Ok
10: Test dso data reopen : Ok
11: roundtrip evsel->name check : Ok
12: Check parsing of sched tracepoints fields : Ok
13: Generate and check syscalls:sys_enter_openat event fields: Ok
14: struct perf_event_attr setup : Ok
15: Test matching and linking multiple hists : Ok
16: Try 'import perf' in python, checking link problems : Ok
17: Test breakpoint overflow signal handler : Ok
18: Test breakpoint overflow sampling : Ok
19: Test number of exit event of a simple workload : Ok
20: Test software clock events have valid period values : Ok
21: Test object code reading : Ok
22: Test sample parsing : Ok
23: Test using a dummy software event to keep tracking : Ok
24: Test parsing with no sample_id_all bit set : Ok
25: Test filtering hist entries : Ok
26: Test mmap thread lookup : Ok
27: Test thread mg sharing : Ok
28: Test output sorting of hist entries : Ok
29: Test cumulation of child hist entries : Ok
30: Test tracking with sched_switch : Ok
31: Filter fds with revents mask in a fdarray : Ok
32: Add fd to a fdarray, making it autogrow : Ok
33: Test kmod_path__parse function : Ok
34: Test thread map : Ok
35: Test LLVM searching and compiling :
35.1: Basic BPF llvm compiling test : Ok
35.2: Test kbuild searching : Ok
35.3: Compile source for BPF prologue generation test : Ok
35.4: Compile source for BPF relocation test : Ok
36: Test topology in session : Ok
37: Test BPF filter :
37.1: Test basic BPF filtering : Ok
37.2: Test BPF prologue generation : Ok
37.3: Test BPF relocation checker : Ok
38: Test thread map synthesize : Ok
39: Test cpu map synthesize : Ok
40: Test stat config synthesize : Ok
41: Test stat synthesize : Ok
42: Test stat round synthesize : Ok
43: Test attr update synthesize : Ok
44: Test events times : Ok
45: Test backward reading from ring buffer : Ok
46: Test cpu map print : Ok
47: Test SDT event probing : Ok
48: Test is_printable_array function : Ok
49: Test bitmap print : Ok
50: x86 rdpmc test : Ok
51: Test converting perf time to TSC : Ok
52: Test dwarf unwind : Ok
53: Test x86 instruction decoder - new instructions : Ok
54: Test intel cqm nmi context read : Skip
#
$ make -C tools/perf build-test
make: Entering directory '/home/acme/git/linux/tools/perf'
tarpkg: ./tests/perf-targz-src-pkg .
make_debug_O: make DEBUG=1
make_no_libnuma_O: make NO_LIBNUMA=1
make_no_slang_O: make NO_SLANG=1
make_no_libaudit_O: make NO_LIBAUDIT=1
make_no_libbpf_O: make NO_LIBBPF=1
make_install_prefix_slash_O: make install prefix=/tmp/krava/
make_tags_O: make tags
make_doc_O: make doc
make_no_libunwind_O: make NO_LIBUNWIND=1
make_install_bin_O: make install-bin
make_no_libbionic_O: make NO_LIBBIONIC=1
make_with_babeltrace_O: make LIBBABELTRACE=1
make_no_demangle_O: make NO_DEMANGLE=1
make_perf_o_O: make perf.o
make_no_auxtrace_O: make NO_AUXTRACE=1
make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
make_pure_O: make
make_util_map_o_O: make util/map.o
make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
make_no_newt_O: make NO_NEWT=1
make_no_libpython_O: make NO_LIBPYTHON=1
make_util_pmu_bison_o_O: make util/pmu-bison.o
make_help_O: make help
make_install_prefix_O: make install prefix=/tmp/krava
make_static_O: make LDFLAGS=-static
make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
make_no_backtrace_O: make NO_BACKTRACE=1
make_clean_all_O: make clean all
make_install_O: make install
make_no_libelf_O: make NO_LIBELF=1
make_no_libperl_O: make NO_LIBPERL=1
make_no_gtk2_O: make NO_GTK2=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
OK
make: Leaving directory '/home/acme/git/linux/tools/perf'
$
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:40 +0200 |
| Subject | [PATCH 23/27] perf probe: Ignore the error of finding inline instance |
| Message-ID | <smKFc-5jC-45@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Masami Hiramatsu <mhiramat@kernel.org>
Ignore the error when the perf probe failed to find inline function
instances. This can happen when we search a method in C++ debuginfo. If
there is completely no instance in target, perf probe can return an
error.
E.g. without this fix:
----
$ perf probe -x /usr/lib64/libstdc++.so.6 -vD showmanyc
probe-definition(0): showmanyc
symbol:showmanyc file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
symbol:catch file:(null) line:0 offset:0 return:0 lazy:(null)
symbol:throw file:(null) line:0 offset:0 return:0 lazy:(null)
symbol:rethrow file:(null) line:0 offset:0 return:0 lazy:(null)
Open Debuginfo file: /usr/lib/debug/usr/lib64/libstdc++.so.6.0.22.debug
Try to find probe point from debuginfo.
Matched function: showmanyc
An error occurred in debuginfo analysis (-2).
Trying to use symbols.
Failed to find symbol showmanyc in /usr/lib64/libstdc++.so.6.0.22
Error: Failed to add events. Reason: No such file or directory (Code: -2)
----
This is because one of showmanyc is defined as inline but no instance
found. With this fix, it is succeeded to show as below.
----
$ perf probe -x /usr/lib64/libstdc++.so.6 -D showmanyc
p:probe_libstdc++/showmanyc /usr/lib64/libstdc++.so.6.0.22:0xb0e50
p:probe_libstdc++/showmanyc_1 /usr/lib64/libstdc++.so.6.0.22:0xc7c40
p:probe_libstdc++/showmanyc_2 /usr/lib64/libstdc++.so.6.0.22:0xecfa0
p:probe_libstdc++/showmanyc_3 /usr/lib64/libstdc++.so.6.0.22:0x115fc0
p:probe_libstdc++/showmanyc_4 /usr/lib64/libstdc++.so.6.0.22:0x121a90
----
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/147464489775.29804.3190419491209875936.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 8daca4fc1f8d..5fe8325e81f2 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -988,7 +988,8 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
if (pp->file && strtailcmp(pp->file, dwarf_decl_file(sp_die)))
return DWARF_CB_OK;
- pr_debug("Matched function: %s\n", dwarf_diename(sp_die));
+ pr_debug("Matched function: %s [%lx]\n", dwarf_diename(sp_die),
+ (unsigned long)dwarf_dieoffset(sp_die));
pf->fname = dwarf_decl_file(sp_die);
if (pp->line) { /* Function relative line */
dwarf_decl_line(sp_die, &pf->lno);
@@ -1011,7 +1012,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data)
param->retval = die_walk_instances(sp_die,
probe_point_inline_cb, (void *)pf);
/* This could be a non-existed inline definition */
- if (param->retval == -ENOENT && strisglob(pp->function))
+ if (param->retval == -ENOENT)
param->retval = 0;
}
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 14/27] perf probe: Increase debug level of SDT debug messages |
| Message-ID | <smKOR-5mW-7@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
Two SDT debug messages can occur for every DSO which is too noisy.
Consequently, increase debug level of SDT messages.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-9-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/build-id.c | 4 ++--
tools/perf/util/probe-file.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 5651f3c12f93..e528c40739cc 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -620,7 +620,7 @@ static int build_id_cache__add_sdt_cache(const char *sbuild_id,
ret = probe_cache__scan_sdt(cache, realname);
if (ret >= 0) {
- pr_debug("Found %d SDTs in %s\n", ret, realname);
+ pr_debug4("Found %d SDTs in %s\n", ret, realname);
if (probe_cache__commit(cache) < 0)
ret = -1;
}
@@ -691,7 +691,7 @@ int build_id_cache__add_s(const char *sbuild_id, const char *name,
/* Update SDT cache : error is just warned */
if (build_id_cache__add_sdt_cache(sbuild_id, realname) < 0)
- pr_debug("Failed to update/scan SDT cache for %s\n", realname);
+ pr_debug4("Failed to update/scan SDT cache for %s\n", realname);
out_free:
if (!is_kallsyms)
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 6f931e442f14..436b64731f65 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -699,7 +699,7 @@ int probe_cache__scan_sdt(struct probe_cache *pcache, const char *pathname)
INIT_LIST_HEAD(&sdtlist);
ret = get_sdt_note_list(&sdtlist, pathname);
if (ret < 0) {
- pr_debug("Failed to get sdt note: %d\n", ret);
+ pr_debug4("Failed to get sdt note: %d\n", ret);
return ret;
}
list_for_each_entry(note, &sdtlist, note_list) {
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 15/27] perf intel-pt: Fix snapshot overlap detection decoder errors |
| Message-ID | <smKOR-5mW-23@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
Fix occasional decoder errors decoding trace data collected in snapshot
mode.
Snapshot mode can take successive snapshots of trace which might overlap.
The decoder checks whether there is an overlap but only looks at the
current and previous buffer. However buffers that do not contain
synchronization (i.e. PSB) packets cannot be decoded or used for overlap
checking. That means the decoder actually needs to check overlaps between
the current buffer and the previous buffer that contained usable data.
Make that change.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: stable@vger.kernel.org # v4.3+
Link: http://lkml.kernel.org/r/1474641528-18776-10-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/intel-pt.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index b9cc353cace2..b744ea812a2e 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -241,7 +241,7 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
}
queue = &ptq->pt->queues.queue_array[ptq->queue_nr];
-
+next:
buffer = auxtrace_buffer__next(queue, buffer);
if (!buffer) {
if (old_buffer)
@@ -264,9 +264,6 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
intel_pt_do_fix_overlap(ptq->pt, old_buffer, buffer))
return -ENOMEM;
- if (old_buffer)
- auxtrace_buffer__drop_data(old_buffer);
-
if (buffer->use_data) {
b->len = buffer->use_size;
b->buf = buffer->use_data;
@@ -276,6 +273,16 @@ static int intel_pt_get_trace(struct intel_pt_buffer *b, void *data)
}
b->ref_timestamp = buffer->reference;
+ /*
+ * If in snapshot mode and the buffer has no usable data, get next
+ * buffer and again check overlap against old_buffer.
+ */
+ if (ptq->pt->snapshot_mode && !b->len)
+ goto next;
+
+ if (old_buffer)
+ auxtrace_buffer__drop_data(old_buffer);
+
if (!old_buffer || ptq->pt->sampling_mode || (ptq->pt->snapshot_mode &&
!buffer->consecutive)) {
b->consecutive = false;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 21/27] perf intel-pt: Enable decoder to handle TIP.PGD with missing IP |
| Message-ID | <smKOR-5mW-13@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
When address filters are used, the decoder must detect the end of a
filter region (or a branch into a tracestop region) by matching Packet
Generation Disabled (TIP.PGD) packets against the object code using the
IP given in the packet. However, due to errata SKL014 "Intel PT TIP.PGD
May Not Have Target IP Payload", that IP may not be present.
Enable the decoder to handle that by adding a new callback function
'pgd_ip()' which indicates whether the IP is not traced, in which case
that is the point where the trace was disabled.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-16-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
.../perf/util/intel-pt-decoder/intel-pt-decoder.c | 30 ++++++++++++++++++++++
.../perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 +
2 files changed, 31 insertions(+)
diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index 8ff6c6a61291..7591a0c37473 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -80,6 +80,7 @@ struct intel_pt_decoder {
int (*walk_insn)(struct intel_pt_insn *intel_pt_insn,
uint64_t *insn_cnt_ptr, uint64_t *ip, uint64_t to_ip,
uint64_t max_insn_cnt, void *data);
+ bool (*pgd_ip)(uint64_t ip, void *data);
void *data;
struct intel_pt_state state;
const unsigned char *buf;
@@ -186,6 +187,7 @@ struct intel_pt_decoder *intel_pt_decoder_new(struct intel_pt_params *params)
decoder->get_trace = params->get_trace;
decoder->walk_insn = params->walk_insn;
+ decoder->pgd_ip = params->pgd_ip;
decoder->data = params->data;
decoder->return_compression = params->return_compression;
@@ -1008,6 +1010,19 @@ static int intel_pt_walk_tip(struct intel_pt_decoder *decoder)
int err;
err = intel_pt_walk_insn(decoder, &intel_pt_insn, 0);
+ if (err == INTEL_PT_RETURN &&
+ decoder->pgd_ip &&
+ decoder->pkt_state == INTEL_PT_STATE_TIP_PGD &&
+ (decoder->state.type & INTEL_PT_BRANCH) &&
+ decoder->pgd_ip(decoder->state.to_ip, decoder->data)) {
+ /* Unconditional branch leaving filter region */
+ decoder->no_progress = 0;
+ decoder->pge = false;
+ decoder->continuous_period = false;
+ decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
+ decoder->state.to_ip = 0;
+ return 0;
+ }
if (err == INTEL_PT_RETURN)
return 0;
if (err)
@@ -1036,6 +1051,21 @@ static int intel_pt_walk_tip(struct intel_pt_decoder *decoder)
}
if (intel_pt_insn.branch == INTEL_PT_BR_CONDITIONAL) {
+ uint64_t to_ip = decoder->ip + intel_pt_insn.length +
+ intel_pt_insn.rel;
+
+ if (decoder->pgd_ip &&
+ decoder->pkt_state == INTEL_PT_STATE_TIP_PGD &&
+ decoder->pgd_ip(to_ip, decoder->data)) {
+ /* Conditional branch leaving filter region */
+ decoder->pge = false;
+ decoder->continuous_period = false;
+ decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
+ decoder->ip = to_ip;
+ decoder->state.from_ip = decoder->ip;
+ decoder->state.to_ip = 0;
+ return 0;
+ }
intel_pt_log_at("ERROR: Conditional branch when expecting indirect branch",
decoder->ip);
decoder->pkt_state = INTEL_PT_STATE_ERR_RESYNC;
diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.h b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
index 02c38fec1c37..89399985fa4d 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
@@ -83,6 +83,7 @@ struct intel_pt_params {
int (*walk_insn)(struct intel_pt_insn *intel_pt_insn,
uint64_t *insn_cnt_ptr, uint64_t *ip, uint64_t to_ip,
uint64_t max_insn_cnt, void *data);
+ bool (*pgd_ip)(uint64_t ip, void *data);
void *data;
bool return_compression;
uint64_t period;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 18/27] perf intel-pt: Add a helper function for processing AUXTRACE_INFO |
| Message-ID | <smKOS-5mW-25@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
Add a helper function 'intel_pt_has()' to make it easier to determine
which members the AUXTRACE_INFO event contains.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-13-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/intel-pt.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 96519e801e53..f16b00f55a19 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -2037,6 +2037,12 @@ static void intel_pt_print_info(u64 *arr, int start, int finish)
fprintf(stdout, intel_pt_info_fmts[i], arr[i]);
}
+static bool intel_pt_has(struct auxtrace_info_event *auxtrace_info, int pos)
+{
+ return auxtrace_info->header.size >=
+ sizeof(struct auxtrace_info_event) + (sizeof(u64) * (pos + 1));
+}
+
int intel_pt_process_auxtrace_info(union perf_event *event,
struct perf_session *session)
{
@@ -2077,8 +2083,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event,
intel_pt_print_info(&auxtrace_info->priv[0], INTEL_PT_PMU_TYPE,
INTEL_PT_PER_CPU_MMAPS);
- if (auxtrace_info->header.size >= sizeof(struct auxtrace_info_event) +
- (sizeof(u64) * INTEL_PT_CYC_BIT)) {
+ if (intel_pt_has(auxtrace_info, INTEL_PT_CYC_BIT)) {
pt->mtc_bit = auxtrace_info->priv[INTEL_PT_MTC_BIT];
pt->mtc_freq_bits = auxtrace_info->priv[INTEL_PT_MTC_FREQ_BITS];
pt->tsc_ctc_ratio_n = auxtrace_info->priv[INTEL_PT_TSC_CTC_N];
@@ -2088,8 +2093,7 @@ int intel_pt_process_auxtrace_info(union perf_event *event,
INTEL_PT_CYC_BIT);
}
- if (auxtrace_info->header.size >= sizeof(struct auxtrace_info_event) +
- (sizeof(u64) * INTEL_PT_MAX_NONTURBO_RATIO)) {
+ if (intel_pt_has(auxtrace_info, INTEL_PT_MAX_NONTURBO_RATIO)) {
pt->max_non_turbo_ratio =
auxtrace_info->priv[INTEL_PT_MAX_NONTURBO_RATIO];
intel_pt_print_info(&auxtrace_info->priv[0],
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 11/27] perf record: Fix error paths |
| Message-ID | <smKOR-5mW-19@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
Some error paths do not tidy-up. Fix that.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b32a880ec473..962adcfc43a5 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1573,23 +1573,23 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
if (!rec->itr) {
rec->itr = auxtrace_record__init(rec->evlist, &err);
if (err)
- return err;
+ goto out;
}
err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
rec->opts.auxtrace_snapshot_opts);
if (err)
- return err;
+ goto out;
if (dry_run)
- return 0;
+ goto out;
err = bpf__setup_stdout(rec->evlist);
if (err) {
bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf));
pr_err("ERROR: Setup BPF stdout failed: %s\n",
errbuf);
- return err;
+ goto out;
}
err = -ENOMEM;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 12/27] perf symbols: Add dso__last_symbol() |
| Message-ID | <smKOS-5mW-29@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Adrian Hunter <adrian.hunter@intel.com>
Add a function to find the last symbol in a DSO. This will be used when
parsing address filters to calculate a region that includes the entire
DSO.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: http://lkml.kernel.org/r/1474641528-18776-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 15 +++++++++++++++
tools/perf/util/symbol.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 19c9c558454f..aecff69a510d 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -345,6 +345,16 @@ static struct symbol *symbols__first(struct rb_root *symbols)
return NULL;
}
+static struct symbol *symbols__last(struct rb_root *symbols)
+{
+ struct rb_node *n = rb_last(symbols);
+
+ if (n)
+ return rb_entry(n, struct symbol, rb_node);
+
+ return NULL;
+}
+
static struct symbol *symbols__next(struct symbol *sym)
{
struct rb_node *n = rb_next(&sym->rb_node);
@@ -466,6 +476,11 @@ struct symbol *dso__first_symbol(struct dso *dso, enum map_type type)
return symbols__first(&dso->symbols[type]);
}
+struct symbol *dso__last_symbol(struct dso *dso, enum map_type type)
+{
+ return symbols__last(&dso->symbols[type]);
+}
+
struct symbol *dso__next_symbol(struct symbol *sym)
{
return symbols__next(sym);
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 0dacfb7d5b67..d964844eb314 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -259,6 +259,7 @@ struct symbol *dso__find_symbol_by_name(struct dso *dso, enum map_type type,
struct symbol *symbol__next_by_name(struct symbol *sym);
struct symbol *dso__first_symbol(struct dso *dso, enum map_type type);
+struct symbol *dso__last_symbol(struct dso *dso, enum map_type type);
struct symbol *dso__next_symbol(struct symbol *sym);
enum dso_type dso__type_fd(int fd);
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 08/27] perf evsel: Add support for address filters |
| Message-ID | <smKOR-5mW-21@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Mathieu Poirier <mathieu.poirier@linaro.org>
This patch makes it possible to use the current filter framework with
address filters. That way address filters for HW tracers such as
CoreSight and Intel PT can be communicated to the kernel drivers.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1474037045-31730-4-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/evsel.c | 5 +++++
tools/perf/util/evsel.h | 2 ++
tools/perf/util/parse-events.c | 39 ++++++++++++++++++++++++++++++++++-----
3 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 3b4e7c452e43..380e84c3af3d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1067,6 +1067,11 @@ int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter)
return perf_evsel__append_filter(evsel, "(%s) && (%s)", filter);
}
+int perf_evsel__append_addr_filter(struct perf_evsel *evsel, const char *filter)
+{
+ return perf_evsel__append_filter(evsel, "%s,%s", filter);
+}
+
int perf_evsel__enable(struct perf_evsel *evsel)
{
int nthreads = thread_map__nr(evsel->threads);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 1f8c48f87f7d..b1503b0ecdff 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -236,6 +236,8 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel,
int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);
int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter);
+int perf_evsel__append_addr_filter(struct perf_evsel *evsel,
+ const char *filter);
int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
const char *filter);
int perf_evsel__enable(struct perf_evsel *evsel);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 16bf09cc3e8d..33546c3ac1fe 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1760,20 +1760,49 @@ foreach_evsel_in_last_glob(struct perf_evlist *evlist,
static int set_filter(struct perf_evsel *evsel, const void *arg)
{
const char *str = arg;
+ bool found = false;
+ int nr_addr_filters = 0;
+ struct perf_pmu *pmu = NULL;
- if (evsel == NULL || evsel->attr.type != PERF_TYPE_TRACEPOINT) {
- fprintf(stderr,
- "--filter option should follow a -e tracepoint option\n");
- return -1;
+ if (evsel == NULL)
+ goto err;
+
+ if (evsel->attr.type == PERF_TYPE_TRACEPOINT) {
+ if (perf_evsel__append_tp_filter(evsel, str) < 0) {
+ fprintf(stderr,
+ "not enough memory to hold filter string\n");
+ return -1;
+ }
+
+ return 0;
}
- if (perf_evsel__append_tp_filter(evsel, str) < 0) {
+ while ((pmu = perf_pmu__scan(pmu)) != NULL)
+ if (pmu->type == evsel->attr.type) {
+ found = true;
+ break;
+ }
+
+ if (found)
+ perf_pmu__scan_file(pmu, "nr_addr_filters",
+ "%d", &nr_addr_filters);
+
+ if (!nr_addr_filters)
+ goto err;
+
+ if (perf_evsel__append_addr_filter(evsel, str) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
}
return 0;
+
+err:
+ fprintf(stderr,
+ "--filter option should follow a -e tracepoint or HW tracer option\n");
+
+ return -1;
}
int parse_filter(const struct option *opt, const char *str,
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-09-29 16:50 +0200 |
| Subject | [PATCH 25/27] perf probe: Fix to cut off incompatible chars from group name |
| Message-ID | <smKOS-5mW-33@gated-at.bofh.it> |
| In reply to | #1493507 |
From: Masami Hiramatsu <mhiramat@kernel.org>
Cut off the characters which can not use for group name of uprobes
when making it based on executable filename.
For example, if the exec name is libstdc++.so, without this fix
perf probe generates "probe_libstdc++" as the group name, but
it is failed to set because '+' can not be used for group name.
With this fix perf accepts only alphabet, number or '_' for group
name, thus perf generates "probe_libstdc" as the group name.
E.g. with this fix, you can see the event name has no "+".
----
$ ./perf probe -x /usr/lib64/libstdc++.so.6 -D is_open
p:probe_libstdc/is_open /usr/lib64/libstdc++.so.6.0.22:0x8ca80
p:probe_libstdc/is_open_1 /usr/lib64/libstdc++.so.6.0.22:0x8ca70
p:probe_libstdc/is_open_2 /usr/lib64/libstdc++.so.6.0.22:0x8ca60
p:probe_libstdc/is_open_3 /usr/lib64/libstdc++.so.6.0.22:0xb0ad0
p:probe_libstdc/is_open_4 /usr/lib64/libstdc++.so.6.0.22:0xecca9
----
Committer note:
Before this fix:
# perf probe -x /usr/lib64/libstdc++.so.6 is_open
Failed to write event: Invalid argument
Error: Failed to add events.
#
After the fix:
# perf probe -x /usr/lib64/libstdc++.so.6 is_open
Added new events:
probe_libstdc:is_open (on is_open in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_1 (on is_open in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_2 (on is_open in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_3 (on is_open in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_4 (on is_open in /usr/lib64/libstdc++.so.6.0.22)
You can now use it in all perf tools, such as:
perf record -e probe_libstdc:is_open_4 -aR sleep 1
# perf probe -l probe_libstdc:*
probe_libstdc:is_open (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_1 (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_2 (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_3 (on is_open@src/c++98/basic_file.cc in /usr/lib64/libstdc++.so.6.0.22)
probe_libstdc:is_open_4 (on stdio_filebuf:5@include/ext/stdio_filebuf.h in /usr/lib64/libstdc++.so.6.0.22)
#
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/147464491667.29804.9553638175441827970.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index bc60ce49720b..fcfbef07b92d 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -213,9 +213,13 @@ static int convert_exec_to_group(const char *exec, char **result)
goto out;
}
- ptr2 = strpbrk(ptr1, "-._");
- if (ptr2)
- *ptr2 = '\0';
+ for (ptr2 = ptr1; ptr2 != '\0'; ptr2++) {
+ if (!isalnum(*ptr2) && *ptr2 != '_') {
+ *ptr2 = '\0';
+ break;
+ }
+ }
+
ret = e_snprintf(buf, 64, "%s_%s", PERFPROBE_GROUP, ptr1);
if (ret < 0)
goto out;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-09-29 19:20 +0200 |
| Message-ID | <smNa1-6Yg-1@gated-at.bofh.it> |
| In reply to | #1493507 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Hi Ingo, > > Please consider pulling, more to come soon, > > - Arnaldo > > Build and test results at the end of this message. > > The following changes since commit 6b652de2b27c0a4020ce0e8f277e782b6af76096: > > Merge tag 'perf-core-for-mingo-20160922' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-09-23 07:21:38 +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-20160929 > > for you to fetch changes up to d18019a53a07e009899ff6b8dc5ec30f249360d9: > > perf tests: Add dwarf unwind test for powerpc (2016-09-29 11:18:21 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > User visible: > ------------- > > New features: > > - Add support for using symbols in address filters with Intel PT and ARM > CoreSight (hardware assisted tracing facilities) (Adrian Hunter, Mathieu Poirier) > > Fixes: > > - Fix MMAP event synthesis for pre-existing threads when no hugetlbfs > mount is in place (Adrian Hunter) > > - Don't ignore kernel idle symbols in 'perf script' (Adrian Hunter) > > - Assorted Intel PT fixes (Adrian Hunter) > > Improvements: > > - Fix handling of C++ symbols in 'perf probe' (Masami Hiramatsu) > > - Beautify sched_[gs]et_attr return value in 'perf trace' (Arnaldo Carvalho de Melo) > > Infrastructure: > --------------- > > New features: > > - Add dwarf unwind 'perf test' for powerpc (Ravi Bangoria) > > Fixes: > > - Fix error paths in 'perf record' (Adrian Hunter) > > Documentation: > > - Update documentation info about quipper, a C++ parser for converting > to/from perf.data/chromium profiling format (Simon Que) > > Build Fixes: > > Fix building in 32 bit platform with libbabeltrace (Wang Nan) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Adrian Hunter (16): > perf record: Fix documentation 'event_sources' -> 'event_source' > perf tools: Fix MMAP event synthesis broken by MAP_HUGETLB change > perf script: Fix vanished idle symbols > perf record: Rename label 'out_symbol_exit' > perf record: Fix error paths > perf symbols: Add dso__last_symbol() > perf record: Add support for using symbols in address filters > perf probe: Increase debug level of SDT debug messages > perf intel-pt: Fix snapshot overlap detection decoder errors > perf intel-pt: Add support for recording the max non-turbo ratio > perf intel-pt: Fix missing error codes processing auxtrace_info > perf intel-pt: Add a helper function for processing AUXTRACE_INFO > perf intel-pt: Record address filter in AUXTRACE_INFO event > perf intel-pt: Read address filter from AUXTRACE_INFO event > perf intel-pt: Enable decoder to handle TIP.PGD with missing IP > perf intel-pt: Fix decoding when there are address filters > > Arnaldo Carvalho de Melo (1): > perf trace: Beautify sched_[gs]et_attr return value > > Masami Hiramatsu (4): > perf probe: Ignore the error of finding inline instance > perf probe: Skip if the function address is 0 > perf probe: Fix to cut off incompatible chars from group name > perf probe: Match linkage name with mangled name > > Mathieu Poirier (3): > perf tools: Make perf_evsel__append_filter() generic > perf evsel: New tracepoint specific function > perf evsel: Add support for address filters > > Ravi Bangoria (1): > perf tests: Add dwarf unwind test for powerpc > > Simon Que (1): > perf tools: Update documentation info about quipper > > Wang Nan (1): > perf data: Fix building in 32 bit platform with libbabeltrace > > tools/perf/Documentation/perf-record.txt | 61 +- > tools/perf/Documentation/perf.data-file-format.txt | 6 +- > tools/perf/arch/powerpc/Build | 1 + > tools/perf/arch/powerpc/include/arch-tests.h | 13 + > tools/perf/arch/powerpc/include/perf_regs.h | 2 + > tools/perf/arch/powerpc/tests/Build | 4 + > tools/perf/arch/powerpc/tests/arch-tests.c | 15 + > tools/perf/arch/powerpc/tests/dwarf-unwind.c | 62 ++ > tools/perf/arch/powerpc/tests/regs_load.S | 94 +++ > tools/perf/arch/x86/util/intel-pt.c | 57 +- > tools/perf/builtin-record.c | 32 +- > tools/perf/builtin-trace.c | 10 +- > tools/perf/tests/Build | 2 +- > tools/perf/tests/dwarf-unwind.c | 2 +- > tools/perf/util/auxtrace.c | 737 +++++++++++++++++++++ > tools/perf/util/auxtrace.h | 54 ++ > tools/perf/util/build-id.c | 4 +- > tools/perf/util/data-convert-bt.c | 2 +- > tools/perf/util/dwarf-aux.c | 28 +- > tools/perf/util/dwarf-aux.h | 3 + > tools/perf/util/event.c | 3 +- > tools/perf/util/evsel.c | 16 +- > tools/perf/util/evsel.h | 5 +- > tools/perf/util/evsel_fprintf.c | 7 +- > .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 30 + > .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 + > tools/perf/util/intel-pt.c | 172 ++++- > tools/perf/util/intel-pt.h | 4 +- > tools/perf/util/parse-events.c | 41 +- > tools/perf/util/probe-event.c | 10 +- > tools/perf/util/probe-file.c | 2 +- > tools/perf/util/probe-finder.c | 17 +- > tools/perf/util/symbol.c | 15 + > tools/perf/util/symbol.h | 1 + > 34 files changed, 1451 insertions(+), 62 deletions(-) > create mode 100644 tools/perf/arch/powerpc/include/arch-tests.h > create mode 100644 tools/perf/arch/powerpc/tests/Build > create mode 100644 tools/perf/arch/powerpc/tests/arch-tests.c > create mode 100644 tools/perf/arch/powerpc/tests/dwarf-unwind.c > create mode 100644 tools/perf/arch/powerpc/tests/regs_load.S > > # time dm > 1 alpine:3.4: Ok > 2 android-ndk:r12b-arm: Ok > 3 archlinux:latest: Ok > 4 centos:5: Ok > 5 centos:6: Ok > 6 centos:7: Ok > 7 debian:7: Ok > 8 debian:8: Ok > 9 debian:experimental: Ok > 10 fedora:20: Ok > 11 fedora:21: Ok > 12 fedora:22: Ok > 13 fedora:23: Ok > 14 fedora:24: Ok > 15 fedora:24-x-ARC-uClibc: Ok > 16 fedora:rawhide: Ok > 17 mageia:5: Ok > 18 opensuse:13.2: Ok > 19 opensuse:42.1: Ok > 20 opensuse:tumbleweed: Ok > 21 ubuntu:12.04.5: Ok > 22 ubuntu:14.04: Ok > 23 ubuntu:14.04.4: Ok > 24 ubuntu:15.10: Ok > 25 ubuntu:16.04: Ok > 26 ubuntu:16.04-x-arm: Ok > 27 ubuntu:16.04-x-arm64: Ok > 28 ubuntu:16.04-x-powerpc: Ok > 29 ubuntu:16.04-x-powerpc64: Ok > 30 ubuntu:16.04-x-powerpc64el: Ok > 31 ubuntu:16.04-x-s390: Ok > 32 ubuntu:16.10: Ok > 33 2246.21 > > real 37m26.862s > user 0m2.148s > sys 0m2.256s > # > > # 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 events tests : Ok > 6: Validate PERF_RECORD_* events & perf_sample fields : Ok > 7: Test perf pmu format parsing : Ok > 8: Test dso data read : Ok > 9: Test dso data cache : Ok > 10: Test dso data reopen : Ok > 11: roundtrip evsel->name check : Ok > 12: Check parsing of sched tracepoints fields : Ok > 13: Generate and check syscalls:sys_enter_openat event fields: Ok > 14: struct perf_event_attr setup : Ok > 15: Test matching and linking multiple hists : Ok > 16: Try 'import perf' in python, checking link problems : Ok > 17: Test breakpoint overflow signal handler : Ok > 18: Test breakpoint overflow sampling : Ok > 19: Test number of exit event of a simple workload : Ok > 20: Test software clock events have valid period values : Ok > 21: Test object code reading : Ok > 22: Test sample parsing : Ok > 23: Test using a dummy software event to keep tracking : Ok > 24: Test parsing with no sample_id_all bit set : Ok > 25: Test filtering hist entries : Ok > 26: Test mmap thread lookup : Ok > 27: Test thread mg sharing : Ok > 28: Test output sorting of hist entries : Ok > 29: Test cumulation of child hist entries : Ok > 30: Test tracking with sched_switch : Ok > 31: Filter fds with revents mask in a fdarray : Ok > 32: Add fd to a fdarray, making it autogrow : Ok > 33: Test kmod_path__parse function : Ok > 34: Test thread map : Ok > 35: Test LLVM searching and compiling : > 35.1: Basic BPF llvm compiling test : Ok > 35.2: Test kbuild searching : Ok > 35.3: Compile source for BPF prologue generation test : Ok > 35.4: Compile source for BPF relocation test : Ok > 36: Test topology in session : Ok > 37: Test BPF filter : > 37.1: Test basic BPF filtering : Ok > 37.2: Test BPF prologue generation : Ok > 37.3: Test BPF relocation checker : Ok > 38: Test thread map synthesize : Ok > 39: Test cpu map synthesize : Ok > 40: Test stat config synthesize : Ok > 41: Test stat synthesize : Ok > 42: Test stat round synthesize : Ok > 43: Test attr update synthesize : Ok > 44: Test events times : Ok > 45: Test backward reading from ring buffer : Ok > 46: Test cpu map print : Ok > 47: Test SDT event probing : Ok > 48: Test is_printable_array function : Ok > 49: Test bitmap print : Ok > 50: x86 rdpmc test : Ok > 51: Test converting perf time to TSC : Ok > 52: Test dwarf unwind : Ok > 53: Test x86 instruction decoder - new instructions : Ok > 54: Test intel cqm nmi context read : Skip > # > > $ make -C tools/perf build-test > make: Entering directory '/home/acme/git/linux/tools/perf' > tarpkg: ./tests/perf-targz-src-pkg . > make_debug_O: make DEBUG=1 > make_no_libnuma_O: make NO_LIBNUMA=1 > make_no_slang_O: make NO_SLANG=1 > make_no_libaudit_O: make NO_LIBAUDIT=1 > make_no_libbpf_O: make NO_LIBBPF=1 > make_install_prefix_slash_O: make install prefix=/tmp/krava/ > make_tags_O: make tags > make_doc_O: make doc > make_no_libunwind_O: make NO_LIBUNWIND=1 > make_install_bin_O: make install-bin > make_no_libbionic_O: make NO_LIBBIONIC=1 > make_with_babeltrace_O: make LIBBABELTRACE=1 > make_no_demangle_O: make NO_DEMANGLE=1 > make_perf_o_O: make perf.o > make_no_auxtrace_O: make NO_AUXTRACE=1 > make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1 > make_pure_O: make > make_util_map_o_O: make util/map.o > make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1 > make_no_newt_O: make NO_NEWT=1 > make_no_libpython_O: make NO_LIBPYTHON=1 > make_util_pmu_bison_o_O: make util/pmu-bison.o > make_help_O: make help > make_install_prefix_O: make install prefix=/tmp/krava > make_static_O: make LDFLAGS=-static > make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1 > make_no_backtrace_O: make NO_BACKTRACE=1 > make_clean_all_O: make clean all > make_install_O: make install > make_no_libelf_O: make NO_LIBELF=1 > make_no_libperl_O: make NO_LIBPERL=1 > make_no_gtk2_O: make NO_GTK2=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 > OK > make: Leaving directory '/home/acme/git/linux/tools/perf' > $ Pulled, thanks a lot Arnaldo! Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web