Re: [PATCH v2] perf: libdw support for powerpc [ping]

2017-06-21 Thread Milian Wolff
On Mittwoch, 21. Juni 2017 03:07:39 CEST Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 15, 2017 at 10:46:16AM +0200, Milian Wolff escreveu: > > On Tuesday, June 13, 2017 5:55:09 PM CEST Ravi Bangoria wrote: > > Just a quick question: Have you guys applied my recent patch:

Re: [PATCH v2] perf: libdw support for powerpc [ping]

2017-06-21 Thread Milian Wolff
On Mittwoch, 21. Juni 2017 14:48:29 CEST Arnaldo Carvalho de Melo wrote: > Em Wed, Jun 21, 2017 at 10:16:56AM +0200, Milian Wolff escreveu: > > On Mittwoch, 21. Juni 2017 03:07:39 CEST Arnaldo Carvalho de Melo wrote: > > > Hi Millian, can I take this as an Acked-by or Tested-by?

Re: [PATCH v5 11/16] perf report: properly handle branch count in match_chain

2017-10-14 Thread Milian Wolff
On Freitag, 13. Oktober 2017 16:08:34 CEST Arnaldo Carvalho de Melo wrote: > Em Fri, Oct 13, 2017 at 10:39:03AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Oct 09, 2017 at 10:33:05PM +0200, Milian Wolff escreveu: > > > Some of the code paths I introduced before

Re: [PATCH v5 11/16] perf report: properly handle branch count in match_chain

2017-10-16 Thread Milian Wolff
On Montag, 16. Oktober 2017 06:18:17 CEST ravi wrote: > On Friday 13 October 2017 07:38 PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Oct 13, 2017 at 10:39:03AM -0300, Arnaldo Carvalho de Melo escreveu: > >> Em Mon, Oct 09, 2017 at 10:33:05PM +0200, Milian Wolff escreveu: >

Re: [PATCH 0/7] generate full callchain cursor entries for inlined frames

2017-05-29 Thread Milian Wolff
On Mittwoch, 24. Mai 2017 17:02:37 CEST Namhyung Kim wrote: > On Wed, May 24, 2017 at 03:42:59PM +0200, Milian Wolff wrote: > > On Wednesday, May 24, 2017 1:46:04 PM CEST Milian Wolff wrote: > > > On Monday, May 22, 2017 11:06:43 AM CEST Namhyung Kim wrote: > > > >

Re: [PATCH v6 6/6] perf util: use correct IP mapping to find srcline for hist entry

2017-10-24 Thread Milian Wolff
On Freitag, 20. Oktober 2017 07:15:33 CEST Namhyung Kim wrote: > Hi Milian, > > On Thu, Oct 19, 2017 at 12:54:18PM +0200, Milian Wolff wrote: > > On Mittwoch, 18. Oktober 2017 20:53:50 CEST Milian Wolff wrote: > > > When inline frame resolution is disabled, a bogus srcli

Re: [GIT PULL 00/15] perf/core inlining improvements

2017-10-26 Thread Milian Wolff
related to this area, > but lets make some progress and merge this kit, Thanks a lot for everyone involved in reviewing this series. Much appreciated! Cheers -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49

[PATCH v6 3/6] perf report: cache srclines for callchain nodes

2017-10-18 Thread Milian Wolff
m Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/dso.c | 2 ++ tools/perf/util/dso.h | 1 + tools/perf/util/machine.c | 17 +--- tools/perf/util/srcline.c | 66 +++ tools/perf/util/srcline.h | 7 +

[PATCH v6 0/6] generate full callchain cursor entries for inlined frames

2017-10-18 Thread Milian Wolff
me handling of fake symbols and aliased non-fake symbols, based on the feedback by Namhyung. v2 fixes some issues reported by Namhyung or found by me in further testing, adds caching and enables inline frames by default. Milian Wolff (6): perf report: properly handle branch count in match_chain

[PATCH v6 1/6] perf report: properly handle branch count in match_chain

2017-10-18 Thread Milian Wolff
o Jin Cc: Ravi Bangoria Signed-off-by: Milian Wolff --- tools/perf/util/callchain.c | 129 +++- 1 file changed, 67 insertions(+), 62 deletions(-) diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index 35a920f09503..ac767957fd9c 100644

[PATCH v6 6/6] perf util: use correct IP mapping to find srcline for hist entry

2017-10-18 Thread Milian Wolff
ao Jin Cc: Jiri Olsa Signed-off-by: Milian Wolff Note how most of the large offset values are now gone. Most notably, we get proper srcline resolution for the random.h and complex headers. --- tools/perf/util/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/

[PATCH v6 4/6] perf report: use srcline from callchain for hist entries

2017-10-18 Thread Milian Wolff
__hypot_finite+163 4.13% 0.00% [.] __hypot_finite __hypot_finite+18446603487892193443 ... ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by:

[PATCH v6 5/6] perf util: enable handling of inlined frames by default

2017-10-18 Thread Milian Wolff
Molnar Signed-off-by: Milian Wolff --- tools/perf/Documentation/perf-report.txt | 3 ++- tools/perf/Documentation/perf-script.txt | 3 ++- tools/perf/util/symbol.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documentation/perf-report.txt b

[PATCH v6 2/6] perf report: cache failed lookups of inlined frames

2017-10-18 Thread Milian Wolff
5 branch-misses #1.66% of all branches ( +- 0.19% ) 0.114222393 seconds time elapsed ( +- 1.19% ) ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Mili

Re: [PATCH v6 6/6] perf util: use correct IP mapping to find srcline for hist entry

2017-10-19 Thread Milian Wolff
On Mittwoch, 18. Oktober 2017 20:53:50 CEST Milian Wolff wrote: > When inline frame resolution is disabled, a bogus srcline is obtained > for hist entries: > > ~ > $ perf report -s sym,srcline --no-inline --stdio -g none > 95.21% 0.00% [.]

Re: [PATCH v6 1/6] perf report: properly handle branch count in match_chain

2017-10-19 Thread Milian Wolff
On Donnerstag, 19. Oktober 2017 00:41:04 CEST Andi Kleen wrote: > Milian Wolff writes: > > +static enum match_result match_address_dso(struct dso *left_dso, u64 > > left_ip, + struct dso *right_dso, u64 > > right_ip) > > +{ > &

[PATCH v7 4/5] perf report: use srcline from callchain for hist entries

2017-10-19 Thread Milian Wolff
__hypot_finite+163 4.13% 0.00% [.] __hypot_finite __hypot_finite+18446603487892193443 ... ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by:

[PATCH v7 5/5] perf util: enable handling of inlined frames by default

2017-10-19 Thread Milian Wolff
Molnar Signed-off-by: Milian Wolff --- tools/perf/Documentation/perf-report.txt | 3 ++- tools/perf/Documentation/perf-script.txt | 3 ++- tools/perf/util/symbol.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documentation/perf-report.txt b

[PATCH v7 2/5] perf report: cache failed lookups of inlined frames

2017-10-19 Thread Milian Wolff
5 branch-misses #1.66% of all branches ( +- 0.19% ) 0.114222393 seconds time elapsed ( +- 1.19% ) ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Mili

[PATCH v7 3/5] perf report: cache srclines for callchain nodes

2017-10-19 Thread Milian Wolff
m Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/dso.c | 2 ++ tools/perf/util/dso.h | 1 + tools/perf/util/machine.c | 17 +--- tools/perf/util/srcline.c | 66 +++ tools/perf/util/srcline.h | 7 +

[PATCH v7 0/5] generate full callchain cursor entries for inlined frames

2017-10-19 Thread Milian Wolff
and initializes the rb_root properly. v3 splits the initial patch up into two to simplify reviewing. It also adds a comment to clarify the lifetime handling of fake symbols and aliased non-fake symbols, based on the feedback by Namhyung. v2 fixes some issues reported by Namhyung or found

[PATCH v7 1/5] perf report: properly handle branch count in match_chain

2017-10-19 Thread Milian Wolff
o Jin Cc: Ravi Bangoria Signed-off-by: Milian Wolff --- tools/perf/util/callchain.c | 132 +++- 1 file changed, 70 insertions(+), 62 deletions(-) diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index 35a920f09503..8901a95f2880 100644

Re: [PATCH v7 1/5] perf report: properly handle branch count in match_chain

2017-10-19 Thread Milian Wolff
On Donnerstag, 19. Oktober 2017 13:38:32 CEST Milian Wolff wrote: > Some of the code paths I introduced before returned too early > without running the code to handle a node's branch count. > By refactoring match_chain to only have one exit point, this > can be remedied. Note: I

Re: [PATCH] perf script: Show correct offsets for DWARF-based unwinding

2018-07-25 Thread Milian Wolff
ntries") Signed-off-by: Sandipan Das > > looks good to me, Milian? > > Acked-by: Jiri Olsa Sorry for the delay, I was on vacation. The above looks somewhat strange to me - why is there no `(inlined)` suffix visible anymore? Also, I can't test this patch locally, since

Re: [PATCH] perf report: don't crash on invalid maps in `-g srcline` mode

2017-05-12 Thread Milian Wolff
On Mittwoch, 10. Mai 2017 08:04:23 CEST Namhyung Kim wrote: > On Tue, May 09, 2017 at 10:50:46PM +0200, Milian Wolff wrote: > > diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c > > index 9ab68682c6d0..295f0846fd84 100644 > > --- a/tools/perf/util/

Re: [PATCH v2] perf report: distinguish between inliners in the same function

2017-05-12 Thread Milian Wolff
On Mittwoch, 10. Mai 2017 07:53:52 CEST Namhyung Kim wrote: > Hi, > > On Wed, May 03, 2017 at 11:35:36PM +0200, Milian Wolff wrote: > > +static enum match_result match_chain_srcline(struct callchain_cursor_node > > *node, +

Re: [PATCH v2] perf report: distinguish between inliners in the same function

2017-05-14 Thread Milian Wolff
On Freitag, 12. Mai 2017 15:01:29 CEST Namhyung Kim wrote: > On Fri, May 12, 2017 at 12:37:01PM +0200, Milian Wolff wrote: > > On Mittwoch, 10. Mai 2017 07:53:52 CEST Namhyung Kim wrote: > > > Hi, > > > > > On Wed, May 03, 2017 at 11:35:36PM +0200, Milian Wolff

Re: [PATCH v2] perf report: distinguish between inliners in the same function

2017-05-15 Thread Milian Wolff
On Monday, May 15, 2017 3:21:58 AM CEST Namhyung Kim wrote: > Hi Milian, > > On Sun, May 14, 2017 at 08:10:50PM +0200, Milian Wolff wrote: > > On Freitag, 12. Mai 2017 15:01:29 CEST Namhyung Kim wrote: > > > On Fri, May 12, 2017 at 12:37:01PM +0200, Milian Wolff wrote:

Re: [PATCH v3] perf/trace : Fix repetitious traces of perf on tracepoint

2018-01-16 Thread Milian Wolff
rt --stdio --show-total-period | grep "Event count" .. # Event count (approx.): 8000845488 $ nproc 8 ``` The sleep-record script is available at: https://github.com/milianw/shell-helpers/blob/master/perf-sleep-record I believe your patch also fixes the sched_stat_* tracepoints to be only

[PATCH 2/3] perf report: use the offset address to find inline frames

2018-09-26 Thread Milian Wolff
to use the same corrected address also when trying to find inline frames. This is another follow-up to commit 19610184693c ("perf script: Show virtual addresses instead of offsets"). Signed-off-by: Milian Wolff Cc: Sandipan Das Cc: Arnaldo Carvalho de Melo --- tools/perf/util/machine.

[PATCH 3/3] perf report: don't crash on invalid inline debug information

2018-09-26 Thread Milian Wolff
ue: https://sourceware.org/bugzilla/show_bug.cgi?id=23715 Signed-off-by: Milian Wolff Cc: Arnaldo Carvalho de Melo Reported-by: Hadrien Grasland --- tools/perf/util/srcline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index 09d6746e6ec8..e

[PATCH 1/3] perf report: don't try to map ip to invalid map

2018-09-26 Thread Milian Wolff
@entry=0x7fff97b8, evsel=, al=al@entry=0x7fff9750, max_stack=) at util/callchain.c:1085 Signed-off-by: Milian Wolff Cc: Sandipan Das Cc: Arnaldo Carvalho de Melo --- tools/perf/util/machine.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/util

Re: [PATCH 1/3] perf report: don't try to map ip to invalid map

2018-09-26 Thread Milian Wolff
On Wednesday, September 26, 2018 4:18:19 PM CEST Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 26, 2018 at 03:52:05PM +0200, Milian Wolff escreveu: > > Fixes a crash when the report encounters an address that > > > could not be associated with an mmaped region: > Milian, ca

Re: [RFC 00/10] perf: Add cputime events/metrics

2018-09-26 Thread Milian Wolff
as thinking about doing > something similar for some time. Hey Jiri, what happened to this patch series? I also believe it's super useful, even when it's not yet perfect. Thanks -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: S/MIME cryptographic signature

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-15 Thread Milian Wolff
On Donnerstag, 15. November 2018 03:05:32 CET Travis Downs wrote: > On Wed, Nov 14, 2018 at 8:20 AM Milian Wolff wrote: > > 3) I suggest we always keep the first frame and sample IP from the user > > regs, i.e. the accurate PEBS/IBS IP. Then we add the following frames > &g

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-14 Thread Milian Wolff
622c7452128 main+0x88 (/tmp/cpp-inlining) 7fc104096222 __libc_start_main+0xf2 (/usr/lib/libc-2.28.so) 5622c74521ed _start+0x2d (/tmp/cpp-inlining) ``` Here, we are missing the hypotf32x call inbetween __hypot_finite and main. Do we want to introduce some heuristic on how han

Re: [PATCH] perf script: Fix LBR skid dump problems in brstackinsn

2018-12-11 Thread Milian Wolff
The patches as-is are not upstreamable. There are some open questions on my side (see mail referenced above). > These were the changes to report the stack frame RIP/RSP in the PEBS > handler and use it for unwinding in perf. Yes, I was looking at something different. I've no experie

Re: [PATCH] perf record: use unmapped IP for inline callchain cursors

2018-10-08 Thread Milian Wolff
.e. kept the commit > log message for the patch this patch fixes, and combined the two into > just one patch so that we don't pollute the bisect history, since this > hasn't made it yet to tip, and I also added Ravi's Tested-by, since this > tests both. Thanks a lot

[PATCH] perf util: take pgoff into account when reporting elf to libdwfl

2018-10-29 Thread Milian Wolff
M_insert(double)+0x90 (/usr/lib/libstdc++.so.6.0.25) 563b9cb502f7 std::ostream::operator<<(double)+0xb7 (inlined) 563b9cb502f7 worker()+0xb7 (/ssd/milian/projects/kdab/rnd/hotspot/build/tests/test-clients/cpp-locking/cpp-locking) 6eab825c1ee3e4ff [unknown] ([u

Re: [PATCH] perf util: take pgoff into account when reporting elf to libdwfl

2018-10-29 Thread Milian Wolff
On Monday, October 29, 2018 3:16:44 PM CET Milian Wolff wrote: > Libdwfl parses an ELF file itself and creates mappings for the > individual sections. Perf on the other hand sees raw mmap events which > represent individual sections. When we encounter an address pointing > into a

Re: [PATCH] perf util: take pgoff into account when reporting elf to libdwfl

2018-10-30 Thread Milian Wolff
On Montag, 29. Oktober 2018 18:40:14 CET Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 29, 2018 at 04:26:27PM +0100, Milian Wolff escreveu: > > On Monday, October 29, 2018 3:16:44 PM CET Milian Wolff wrote: > > > Libdwfl parses an ELF file itself and creates mappings for th

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-30 Thread Milian Wolff
..W V.. . 00f0: 70 70 27 1e fd 7f 00 00 f9 da 5b 34 91 7f 00 00 pp'...[4 . 0100: e4 b5 45 22 72 85 d8 c0 c0 1d 16 84 43 30 bb c0 ..E"r...C0.. . ``` We can find `7f91345bdaf8+1 = 7f91345bdaf9" at offset 16 (search for "f9 da 5b 34 91 7f"). Using t

Re: [PATCH 3/3] perf report: don't crash on invalid inline debug information

2018-10-15 Thread Milian Wolff
On Donnerstag, 11. Oktober 2018 21:39:20 CEST Arnaldo Carvalho de Melo wrote: > Em Thu, Oct 11, 2018 at 08:23:31PM +0200, Milian Wolff escreveu: > > On Donnerstag, 27. September 2018 21:10:37 CEST Arnaldo Carvalho de Melo > > > > wrote: > > > Em Wed, Sep 26, 2018 at

Re: [PATCH 3/3] perf report: don't crash on invalid inline debug information

2018-10-16 Thread Milian Wolff
On Dienstag, 16. Oktober 2018 19:52:04 CEST Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 16, 2018 at 02:49:23PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Oct 15, 2018 at 10:51:36PM +0200, Milian Wolff escreveu: > > > On Donnerstag, 11. Oktober 2018 21:39:20 CEST A

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-05 Thread Milian Wolff
On Montag, 5. November 2018 21:51:19 CET Jiri Olsa wrote: > On Fri, Nov 02, 2018 at 06:56:50PM +0100, Milian Wolff wrote: > > SNIP > > > > > Note how precise levels 0 and 1 do not produce any samples where > > > > unwinding > > > > fails. But pr

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-06 Thread Milian Wolff
data > > in the PMI's exception frame on the stack. > > > > Probably would need to modify perf to report those too in addition > > to the PEBS registers. > > ok, should not be that hard Where would I look for the source to change here? So far, I only concentrat

[PATCH] perf script: add newline after uregs output

2018-11-07 Thread Milian Wolff
: 77c96696 __hypot_finite+0x36 (/usr/lib/libm-2.28.so) ... ABI:2AX:0x40d440c7BX:0x40d440c7CX:0x4d45e5da... ``` Signed-off-by: Milian Wolff Cc: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf

[PATCH] perf script: share code and output format for uregs and iregs output

2018-11-07 Thread Milian Wolff
] 1343.354363: 1 cycles:ppp: ... ``` Signed-off-by: Milian Wolff Cc: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 40 - 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/tools/perf/builtin-script.c b/tools/perf

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-07 Thread Milian Wolff
different IP than stored in uregs in the perf.data file, then we could use that as a fallback for unwinding, when it fails the first time. Or should we always unwind from that IP? How do we mark the "actual" frame/IP then, if that differs? Thanks -- Milian Wolff | milian.wo...@kdab.com | Se

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-08 Thread Milian Wolff
On Mittwoch, 7. November 2018 23:41:31 CET Milian Wolff wrote: > On Dienstag, 6. November 2018 21:24:11 CET Andi Kleen wrote: > > > Where would I look for the source to change here? So far, I only > > > concentrated on the userspace side of perf in tools/perf. > &

Re: [PATCH 3/3] perf report: don't crash on invalid inline debug information

2018-10-11 Thread Milian Wolff
On Donnerstag, 27. September 2018 21:10:37 CEST Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 26, 2018 at 03:52:07PM +0200, Milian Wolff escreveu: > > When the function name for an inline frame is invalid, we must > > not try to demangle this symbol, otherwise we crash wi

PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-01 Thread Milian Wolff
On Dienstag, 30. Oktober 2018 23:34:35 CET Milian Wolff wrote: > On Mittwoch, 24. Oktober 2018 16:48:18 CET Andi Kleen wrote: > > > Can someone at least confirm whether unwinding from a function prologue > > > via > > > .eh_frame (but without .debug_frame) should actu

Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?]

2018-11-02 Thread Milian Wolff
On Freitag, 2. November 2018 12:26:35 CET Jiri Olsa wrote: > On Thu, Nov 01, 2018 at 11:08:18PM +0100, Milian Wolff wrote: > > On Dienstag, 30. Oktober 2018 23:34:35 CET Milian Wolff wrote: > > > On Mittwoch, 24. Oktober 2018 16:48:18 CET Andi Kleen wrote: > > > >

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-23 Thread Milian Wolff
disassembly at [3], and note that the broken sample frame points at 0x00029688 <+40>:sub$0x28,%rsp Can someone at least confirm whether unwinding from a function prologue via .eh_frame (but without .debug_frame) should actually be possible? Thanks -- Milian Wolff | mi

Broken dwarf unwinding - wrong stack pointer register value?

2018-10-20 Thread Milian Wolff
ctly recorded? Can this be fixed somehow during record time? Can we detect this scenario at analysis time and correct the stack pointer address automatically somehow? Should the first frame always try to read from offset 72 maybe? Any help would be greatly appreciated, many thanks --

[PATCH 2/2] perf script: flush output stream after events in verbose mode

2018-10-21 Thread Milian Wolff
(0x2000) cpp-inlining 24617 90229.122043974: 1 cycles:uppp: 7faf7dfdc000 _start+0x0 (/usr/lib/ld-2.28.so) ... ``` This new output format makes it much easier to use perf script output for debugging purposes, e.g. to investigate broken dwarf unwinding. Signed-off-by: Milian

[PATCH 1/2] perf script: allow extended console debug output

2018-10-21 Thread Milian Wolff
ves us the extended debug information now in perf script as expected. Signed-off-by: Milian Wolff Cc: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 4d

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-21 Thread Milian Wolff
On Sonntag, 21. Oktober 2018 00:39:51 CEST Milian Wolff wrote: > Hey all, > > I'm on the quest to figure out why perf regularly fails to unwind (some) > samples. I am seeing very strange behavior, where an apparently wrong stack > pointer value is read from the register

Re: [PATCH 2/2] perf script: flush output stream after events in verbose mode

2018-10-22 Thread Milian Wolff
On Montag, 22. Oktober 2018 11:43:17 CEST Jiri Olsa wrote: > On Sun, Oct 21, 2018 at 09:14:24PM +0200, Milian Wolff wrote: > > When the perf script output is written to a terminal stream, > > the normal output of `perf script` would get buffered, but its > > debug output woul

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-22 Thread Milian Wolff
On Sonntag, 21. Oktober 2018 00:39:51 CEST Milian Wolff wrote: > Hey all, > > I'm on the quest to figure out why perf regularly fails to unwind (some) > samples. I am seeing very strange behavior, where an apparently wrong stack > pointer value is read from the register

Re: [PATCH 2/2] perf script: flush output stream after events in verbose mode

2018-10-22 Thread Milian Wolff
On Montag, 22. Oktober 2018 12:16:18 CEST Jiri Olsa wrote: > On Mon, Oct 22, 2018 at 12:09:22PM +0200, Milian Wolff wrote: > > On Montag, 22. Oktober 2018 11:43:17 CEST Jiri Olsa wrote: > > > On Sun, Oct 21, 2018 at 09:14:24PM +0200, Milian Wolff wrote: > > > >

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-22 Thread Milian Wolff
On Montag, 22. Oktober 2018 12:35:39 CEST Milian Wolff wrote: > On Sonntag, 21. Oktober 2018 00:39:51 CEST Milian Wolff wrote: > > Hey all, > > > > I'm on the quest to figure out why perf regularly fails to unwind (some) > > samples. I am seeing very strange beh

Re: Broken dwarf unwinding - wrong stack pointer register value?

2018-10-22 Thread Milian Wolff
On Montag, 22. Oktober 2018 15:58:17 CEST Andi Kleen wrote: > Milian Wolff writes: > > After more digging, it turns out that I've apparently chased a red > > herring. > > I'm running archlinux which isn't shipping debug symbols for libm. > > 64bit ex

Re: [RFC PATCH] perf/core: exposing type of context-switch-out event

2018-03-01 Thread Milian Wolff
documentation Documentation/perf.data-file-format.txt, but I just noticed that not even PERF_RECORD_SWITCH is documented there... Otherwise I also think that this would be a very nice feature addition! -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH, a

Re: [RFC PATCH] perf/core: exposing type of context-switch-out event

2018-03-01 Thread Milian Wolff
s would be welcome to add more aspects of the file format there, even if it's generated by the kernel? That helps for thirdparty tools that parse the perf.data files (like perfparser used by QtCreator and hotspot). Cheers -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engin

Re: [PATCH] perf tools : adds support for native scripting

2014-09-06 Thread Milian Wolff
for better performance when parsing perf's data > > files and a complete access to the raw data. > > You'll at least need some documentation how to use it. Ping, any news on this feature? I'd welcome the ability to create native scripts to write efficient tools bas

Re: [PATCH] perf script: Initialize callchain_param.record_mode

2015-08-17 Thread Milian Wolff
On Monday, August 17, 2015 10:47:50 AM CEST Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 13, 2015 at 10:53:36AM +0200, Milian Wolff escreveu: > > On Thursday, August 13, 2015 09:17:24 AM Jiri Olsa wrote: > > > right you are.. does attached patch help? > > > >

Re: [PATCH] perf script: Initialize callchain_param.record_mode

2015-08-13 Thread Milian Wolff
On Thursday, August 13, 2015 09:17:24 AM Jiri Olsa wrote: > On Wed, Jul 22, 2015 at 08:48:40PM +0200, Milian Wolff wrote: > > Hey all, > > > > I recorded a perf data file using > > > > perf record --call-graph dwarf kwrite > > > > when I report i

Re: [PATCH 1/3] perf tools: Introduce trim function

2016-04-07 Thread Milian Wolff
nope, nothing yet I'll send a working solution based on Jiri's fix later when I'm back home. In the meantime, please have a look at my other patch regarding `perf inject` merging of trace events for sys_enter/exit. Thanks -- Milian Wolff | milian.wo...@kdab.com | Softwar

Re: [PATCH] perf trace: Add support for printing call chains on sys_exit events.

2016-04-09 Thread Milian Wolff
On Freitag, 8. April 2016 15:18:53 CEST Arnaldo Carvalho de Melo wrote: > Em Fri, Apr 08, 2016 at 02:57:54PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Apr 08, 2016 at 01:34:15PM +0200, Milian Wolff escreveu: > > > Now, one can print the call chain for every en

Re: [PATCH 0/3] perf tools DWARF libunwind: Add callchain order support

2015-11-22 Thread Milian Wolff
so getting it fixed for libdw. Much appreciated! Cheers -- Milian Wolff | milian.wo...@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts smime.p7s Description: S/MIME cryptographic signature

[PATCH] perf record: use unmapped IP for inline callchain cursors

2018-10-02 Thread Milian Wolff
shows that we desperately need an automated test for inline frame resolution. I'll try to come up with something for the various regressions in the future. Signed-off-by: Milian Wolff Cc: Arnaldo Carvalho de Melo Reported-by: Ravi Bangoria # Tested-by: # Reviewed-by: # Suggested-b:

Re: Inlined functions in perf report

2016-12-20 Thread Milian Wolff
down > side is of course that all your userspace needs to be compiled with > frame pointers enabled and inlined functions, as you noticed, are > 'lost'. > > There has been talk to attempt to utilize the ELF EH frames which are > mandatory in the x86_64 ABI (even for C) to

Re: Inlined functions in perf report

2016-12-20 Thread Milian Wolff
On Tuesday, December 20, 2016 10:54:50 AM CET Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 20, 2016 at 02:27:10PM +0100, Milian Wolff escreveu: > > On Tuesday, December 20, 2016 1:17:55 PM CET Peter Zijlstra wrote: > > > On Tue, Dec 20, 2016 at 12:59:54PM +0100, Steinar

Re: Inlined functions in perf report

2016-12-20 Thread Milian Wolff
On Tuesday, December 20, 2016 2:43:41 PM CET Steinar H. Gunderson wrote: > On Tue, Dec 20, 2016 at 02:27:10PM +0100, Milian Wolff wrote: > > It is not even possible with that, perf report is lacking the steps > > required to add inline frames - it will only add "real"

Re: Inlined functions in perf report

2016-12-21 Thread Milian Wolff
do you any stack frames at all? Can you try `perf record --call-graph dwarf` instead? Of course, make sure you compile your code with `-g -O2` or similar. -- Milian Wolff | milian.wo...@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB

Re: [PATCH v5 0/5] perf report: Show inline stack

2017-03-18 Thread Milian Wolff
e to this frame, i.e. "main" instead of std::norm". When the inline stack is shown below we actually see what happens, i.e. we eventually end up in main again, but of course this output is not the best as-is. But, again: I think these are minor issues, and the feature itself is a

[PATCH] perf report: enable sorting by srcline as key

2017-03-18 Thread Milian Wolff
nline) | /usr/include/c++/6.3.1/bits/random.h:185 (inline) ... Signed-off-by: Milian Wolff --- tools/perf/Documentation/perf-report.txt | 1 + tools/perf/ui/browsers/hists.c | 3 +- tools/perf/ui/stdio/hist.c | 3 +- tools/perf/util/annot

Re: [PATCH v4 0/5] perf report: Show inline stack

2017-03-15 Thread Milian Wolff
file/line but not a symbol name. Again, why don't you align this with the other non-inlined frames, and honor the grouping setting? Check whether we group by address (then display file/ line), or by function (then display the function name). Bye -- Milian Wolff | milian.wo...@kdab.com |

Re: [PATCH v3 0/5] perf report: Show inline stack

2017-03-02 Thread Milian Wolff
very useful feature and I would like to see it integrated upstream. From my POV, you can add Tested-by: Milian Wolff to all patches in this series. Many thanks! -- Milian Wolff | milian.wo...@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-

[PATCH v3] perf inject: Make it possible to merge sys_enter/exit events

2016-08-30 Thread Milian Wolff
| |--2--close | |--1--read | |--1--init_tls | |--1--brk Signed-off-by: Milian Wolff --- tools/perf/Documentation/perf-inject.txt | 5 + tools/perf/builtin-inject.c | 157 +-- 2

[PATCH] perf report: distinguish between inliners in the same function

2017-04-27 Thread Milian Wolff
__libc_start_main _start ... ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/callchain.c | 71 + 1 file changed, 59 inse

Re: [PATCH/RFC 2/4] perf annotate: Add new source code view to the annotate TUI browser

2017-06-28 Thread Milian Wolff
g total period view. The 't' key support should be a separate patch, I guess. It also does not update the column header (it stays at "Percent"). -- Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-28 Thread Milian Wolff
self cost in this view. Additionally, we need to account for inlining. Right now, we only see the self cost that is directly within main, I suspect. For C++ this is usually very misleading, and basically makes the annotate view completely useless for application-level profiling. If a second colu

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-28 Thread Milian Wolff
On Wednesday, June 28, 2017 6:27:34 PM CEST Taeung Song wrote: > On 06/28/2017 06:53 PM, Milian Wolff wrote: > > On Wednesday, June 28, 2017 5:18:08 AM CEST Taeung Song wrote: > >> Hi, > >> > >> The --source-only option and new source code TUI view can show >

Re: [PATCH v2] perf report: fix off-by-one for non-activation frames

2017-05-18 Thread Milian Wolff
On Mittwoch, 17. Mai 2017 07:12:21 CEST Namhyung Kim wrote: > On Tue, May 16, 2017 at 06:26:47PM +0200, Milian Wolff wrote: > > On Dienstag, 16. Mai 2017 18:17:26 CEST Milian Wolff wrote: > > > On Dienstag, 16. Mai 2017 16:38:29 CEST Namhyung Kim wrote: > > > > On T

[PATCH v3] perf report: fix off-by-one for non-activation frames

2017-05-18 Thread Milian Wolff
Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/unwind-libdw.c | 6 +- tools/perf/util/unwind-libunwind-local.c | 11 +++ 2 files changed, 16 insertions(+), 1 deletion(-) v2: - use unw_is_signal_frame to also

[PATCH v2] perf report: fix memory leak in addr2line when called by addr2inlines

2017-05-18 Thread Milian Wolff
Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/srcline.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) v2: - keep behavior of old function when strdup failed - set ret to 1 if we found any inline node diff --git a/tools/perf/util

[PATCH v2] perf report: always honor callchain order for inlined nodes

2017-05-18 Thread Milian Wolff
list and also ensures that all callers construct the list in the right order. Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/srcline.c | 23 --- 1 file changed, 8 insertions

[PATCH v2] perf report: do not drop last inlined frame

2017-05-18 Thread Milian Wolff
libc-2.25.so) bd9 _start (/tmp/a.out) ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/srcline.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) v2: - re

Re: [PATCH v2] perf report: always honor callchain order for inlined nodes

2017-05-18 Thread Milian Wolff
On Donnerstag, 18. Mai 2017 11:48:20 CEST Namhyung Kim wrote: > On Thu, May 18, 2017 at 10:37:59AM +0200, Milian Wolff wrote: > > So far, the inlined nodes where only reversed when we built perf > > against libbfd. If that was not available, the addr2line fallback > > code

Re: [PATCH v2] perf report: do not drop last inlined frame

2017-05-18 Thread Milian Wolff
On Donnerstag, 18. Mai 2017 11:55:38 CEST Namhyung Kim wrote: > On Thu, May 18, 2017 at 10:38:22AM +0200, Milian Wolff wrote: > > The very last inlined frame, i.e. the one furthest away from the > > non-inlined frame, was silently dropped. This is apparent when > > comparin

[PATCH v3] perf report: always honor callchain order for inlined nodes

2017-05-18 Thread Milian Wolff
list and also ensures that all callers construct the list in the right order. Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/srcline.c | 18 -- 1 file changed, 4 insertions(+), 14

[PATCH v3] perf report: do not drop last inlined frame

2017-05-18 Thread Milian Wolff
Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/srcline.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) v3: - use actual command output in commit message v2: - rebase a

Re: [PATCH v2] perf report: distinguish between inliners in the same function

2017-05-18 Thread Milian Wolff
On Mittwoch, 17. Mai 2017 08:13:16 CEST Namhyung Kim wrote: > On Tue, May 16, 2017 at 03:18:13PM +0200, Milian Wolff wrote: > > On Dienstag, 16. Mai 2017 02:53:32 CEST Namhyung Kim wrote: > > > On Mon, May 15, 2017 at 12:01:54PM +0200, Milian Wolff wrote: > > > > On M

[PATCH 0/7] generate full callchain cursor entries for inlined frames

2017-05-18 Thread Milian Wolff
the inline stack have the correct symbol and srcline now both function and srcline is shown, as well as the (inlined) suffix only the basename of the srcline is shown ~ Milian Wolff (7): perf report: remove code to handle inline frames from browsers perf util: take elf_name a

[PATCH 1/7] perf report: remove code to handle inline frames from browsers

2017-05-18 Thread Milian Wolff
A follow-up commit will make inline frames first-class citizens in the callchain, thereby obsoleting all of this special code. Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/ui/browsers/hists.c | 183

[PATCH 5/7] perf report: fall-back to function name comparison for -g srcline

2017-05-18 Thread Milian Wolff
| | | --0.85%--cabs ~ Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/callchain.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/callchain.c b

[PATCH 7/7] perf script: mark inlined frames and do not print DSO for them

2017-05-18 Thread Milian Wolff
ned-off-by: Milian Wolff --- tools/perf/util/evsel_fprintf.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c index f2c6c5ee11e8..5b9e89257aa7 100644 --- a/tools/perf/util/evsel_fprintf.c +++ b/tools

[PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix

2017-05-18 Thread Milian Wolff
allows us to efficiently lookup the symbol for a given name without first having to append the suffix before the lookup. Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yao Jin Signed-off-by: Milian Wolff --- tools/perf/util/callchain.c | 10

  1   2   3   >