From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>,
Namhyung Kim <namhyung@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: perf tools: Preserving event modifiers
Date: Thu, 24 May 2012 15:24:53 -0300 [thread overview]
Message-ID: <20120524182453.GD2336@infradead.org> (raw)
Hi Jiri,
We need to preserve the original event name so that we can show it on the TUI,
for instance. Humm, when rebuilding it from perf.data we'll need to look at
perf_event_attr.precise bits too...
(gdb) run top -e cycles:p
Starting program: /root/bin/perf top -e cycles:p
[Thread debugging using libthread_db enabled]
Breakpoint 1, perf_evsel__init (evsel=0x909c50, attr=0x7fffffffad30, idx=0) at util/evsel.c:50
50 {
(gdb) n
51 evsel->idx = idx;
(gdb) n
52 evsel->attr = *attr;
(gdb)
53 INIT_LIST_HEAD(&evsel->node);
(gdb)
54 hists__init(&evsel->hists);
(gdb)
55 }
(gdb)
perf_evsel__new (attr=0x7fffffffad30, idx=0) at util/evsel.c:64
64 return evsel;
(gdb)
65 }
(gdb)
add_event (_list=0x7fffffffadc0, idx=0x7fffffffb6c0, attr=0x7fffffffad30, name=0x54598b "cycles") at util/parse-events.c:376
376 if (!evsel) {
(gdb)
381 evsel->name = strdup(name);
(gdb) p name
$5 = 0x54598b "cycles"
(gdb) p name
$6 = 0x54598b "cycles"
(gdb) bt
#0 add_event (_list=0x7fffffffadc0, idx=0x7fffffffb6c0, attr=0x7fffffffad30, name=0x54598b "cycles") at util/parse-events.c:381
#1 0x000000000044e483 in parse_events_add_numeric (list=0x7fffffffadc0, idx=0x7fffffffb6c0, type=0, config=0, head_config=0x0) at util/parse-events.c:674
#2 0x000000000047667d in parse_events_parse (list_all=0x7fffffffb6a0, idx=0x7fffffffb6c0) at util/parse-events.y:117
#3 0x000000000044e9fd in parse_events (evlist=0x9083c0, str=0x7fffffffe899 "cycles:p", unset=0) at util/parse-events.c:807
#4 0x000000000044eaf1 in parse_events_option (opt=0x7fffffffba10, str=0x7fffffffe899 "cycles:p", unset=0) at util/parse-events.c:833
#5 0x000000000044b68f in get_value (p=0x7fffffffb840, opt=0x7fffffffba10, flags=1) at util/parse-options.c:112
#6 0x000000000044ba8b in parse_short_opt (p=0x7fffffffb840, options=0x7fffffffba10) at util/parse-options.c:191
#7 0x000000000044c0bd in parse_options_step (ctx=0x7fffffffb840, options=0x7fffffffba10, usagestr=0x53f9f0) at util/parse-options.c:342
#8 0x000000000044c46e in parse_options (argc=3, argv=0x7fffffffe640, options=0x7fffffffba10, usagestr=0x53f9f0, flags=0) at util/parse-options.c:417
#9 0x000000000042eead in cmd_top (argc=3, argv=0x7fffffffe640, prefix=0x0) at builtin-top.c:1250
#10 0x0000000000415359 in run_builtin (p=0x79b8a8, argc=3, argv=0x7fffffffe640) at perf.c:273
#11 0x000000000041555c in handle_internal_command (argc=3, argv=0x7fffffffe640) at perf.c:345
#12 0x00000000004156a8 in run_argv (argcp=0x7fffffffe52c, argv=0x7fffffffe520) at perf.c:389
#13 0x000000000041592e in main (argc=3, argv=0x7fffffffe640) at perf.c:487
(gdb)
reply other threads:[~2012-05-24 18:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120524182453.GD2336@infradead.org \
--to=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome