From: Arun Sharma <asharma@fb.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
Stephane Eranian <eranian@google.com>,
<linux-kernel@vger.kernel.org>, <dsahern@gmail.com>,
<ravitillo@lbl.gov>, <khandual@linux.vnet.ibm.com>,
<robert.richter@amd.com>, <ming.m.lin@intel.com>,
<vweaver1@eecs.utk.edu>, <andi@firstfloor.org>
Subject: Re: [PATCH] perf report: auto-detect branch stack sampling mode
Date: Mon, 5 Mar 2012 13:43:23 -0800 [thread overview]
Message-ID: <4F55337B.4080807@fb.com> (raw)
In-Reply-To: <20120305203518.GA5656@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
On 3/5/12 12:35 PM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Mar 05, 2012 at 05:30:33PM +0100, Peter Zijlstra escreveu:
>> On Mon, 2012-03-05 at 16:56 +0100, Ingo Molnar wrote:
>>> A third usability bug is that for some reason a branch sampling
>>> 'perf report' defaults to the stdio output on my testsystem -
>>> with --no-branch-stack it gives the regular tui.
>
>> Ah, I would not have noticed that since I still explicitly build my perf
>> without TUI support. That stuff mostly just gets in the way.
>
> Do you have any specific complaints about it?
>
I think --tui code paths have some bugs that cause it to SIGSEGV, while
the --stdio paths don't. I think much of it has to do with how often
that particular combination of command line options is used.
Here's an example:
# perf record -ag -- sleep 3
# perf report -G -s pid --tui # SIGSEGV
# perf report -G -s pid --stdio # works fine
Details attached.
-Arun
[-- Attachment #2: perf-debug.txt --]
[-- Type: text/plain, Size: 4716 bytes --]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 139975795275488 (LWP 13155)]
symbol__inc_addr_samples (sym=0x91eb90, map=<value optimized out>, evidx=0, addr=120416) at util/annotate.c:73
73 util/annotate.c: No such file or directory.
in util/annotate.c
(gdb) bt
#0 symbol__inc_addr_samples (sym=0x91eb90, map=<value optimized out>, evidx=0, addr=120416) at util/annotate.c:73
#1 0x0000000000410b5d in process_sample_event (tool=<value optimized out>, event=0x7f4ea28e26b0, sample=0x7fffcc1ca8f0, evsel=0x823ea0, machine=0x822290) at builtin-report.c:127
#2 0x00000000004433ca in flush_sample_queue (s=0x822230, tool=0x7fffcc1cc340) at util/session.c:528
#3 0x0000000000444d16 in __perf_session__process_events (session=0x822230, data_offset=<value optimized out>, data_size=<value optimized out>, file_size=<value optimized out>, tool=0x7fffcc1cc340)
at util/session.c:1175
#4 0x0000000000445217 in perf_session__process_events (self=0x822230, tool=0x7fffcc1cc340) at util/session.c:1191
#5 0x000000000041015b in cmd_report (argc=0, argv=0x7fffcc1cc830, prefix=<value optimized out>) at builtin-report.c:311
#6 0x00000000004051b9 in handle_internal_command (argc=4, argv=0x7fffcc1cc830) at perf.c:273
#7 0x0000000000405623 in main (argc=4, argv=0x479218) at perf.c:388
(gdb) p /x sym->start
$5 = 0xffffffff8100fb74
(gdb) p /x addr
$6 = 0x1d660
(gdb) p offset
$7 = 2130762476
54 int symbol__inc_addr_samples(struct symbol *sym, struct map *map,
55 int evidx, u64 addr)
56 {
57 unsigned offset;
58 struct annotation *notes;
59 struct sym_hist *h;
60
61 notes = symbol__annotation(sym);
62 if (notes->src == NULL)
63 return -ENOMEM;
64
65 pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr));
66
67 if (addr >= sym->end)
68 return 0;
69
70 offset = addr - sym->start;
71 h = annotation__histogram(notes, evidx);
72 h->sum++;
73 h->addr[offset]++; <-- potential bad memory reference
next prev parent reply other threads:[~2012-03-05 21:44 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 9:40 [PATCH] perf report: auto-detect branch stack sampling mode Stephane Eranian
2012-02-24 15:24 ` David Ahern
2012-02-24 15:28 ` Stephane Eranian
2012-02-24 15:31 ` David Ahern
2012-02-24 15:40 ` Stephane Eranian
2012-02-24 15:49 ` David Ahern
2012-02-24 15:51 ` Stephane Eranian
2012-03-02 17:47 ` Stephane Eranian
2012-03-02 19:08 ` Arnaldo Carvalho de Melo
2012-03-03 19:43 ` Arnaldo Carvalho de Melo
2012-03-05 10:49 ` Ingo Molnar
2012-03-05 11:11 ` Peter Zijlstra
2012-03-05 15:47 ` Ingo Molnar
2012-03-05 15:50 ` Ingo Molnar
2012-03-05 15:56 ` Ingo Molnar
2012-03-05 16:30 ` Peter Zijlstra
2012-03-05 16:32 ` Stephane Eranian
2012-03-05 17:20 ` Ingo Molnar
2012-03-05 20:35 ` Arnaldo Carvalho de Melo
2012-03-05 21:43 ` Arun Sharma [this message]
2012-03-05 22:26 ` Arnaldo Carvalho de Melo
2012-03-05 23:35 ` Arun Sharma
2012-03-06 3:06 ` Arnaldo Carvalho de Melo
2012-03-06 6:27 ` Ingo Molnar
2012-03-06 6:25 ` Ingo Molnar
2012-03-07 1:57 ` [RFC] perf report: Implement symbol filtering on TUI Namhyung Kim
2012-03-07 6:07 ` Ingo Molnar
2012-03-07 8:04 ` Namhyung Kim
2012-03-08 10:44 ` Ingo Molnar
2012-03-09 1:53 ` Namhyung Kim
2012-03-09 7:36 ` Ingo Molnar
2012-03-09 8:03 ` Namhyung Kim
2012-03-14 23:11 ` Arun Sharma
2012-03-15 0:44 ` Namhyung Kim
2012-03-15 21:46 ` Arun Sharma
2012-03-05 15:52 ` [PATCH] perf report: auto-detect branch stack sampling mode Stephane Eranian
2012-03-07 12:49 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F55337B.4080807@fb.com \
--to=asharma@fb.com \
--cc=acme@redhat.com \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=ravitillo@lbl.gov \
--cc=robert.richter@amd.com \
--cc=vweaver1@eecs.utk.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.