From: David Ahern <dsahern@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: perf/tracepoints access to interpreted strings
Date: Wed, 15 Apr 2015 10:20:08 -0600 [thread overview]
Message-ID: <552E8FB8.6010005@gmail.com> (raw)
Hi Steve:
I was hoping you could provide points on how to get access to an
interpreted field in a tracepoint within perf.
This is an example of the tracepoint:
# cat /sys/kernel/debug/tracing/events/irq/softirq_exit/format
name: softirq_exit
ID: 99
format:
field:unsigned short common_type; offset:0; size:2; signed:0;
field:unsigned char common_flags; offset:2; size:1; signed:0;
field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
field:int common_pid; offset:4; size:4; signed:1;
field:int common_padding; offset:8; size:4; signed:1;
field:unsigned int vec; offset:12; size:4; signed:0;
print fmt: "vec=%u [action=%s]", REC->vec, __print_symbolic(REC->vec, {
HI_SOFTIRQ, "HI" }, { TIMER_SOFTIRQ, "TIMER" }, { NET_TX_SOFTIRQ,
"NET_TX" }, { NET_RX_SOFTIRQ, "NET_RX" }, { BLOCK_SOFTIRQ, "BLOCK" }, {
BLOCK_IOPOLL_SOFTIRQ, "BLOCK_IOPOLL" }, { TASKLET_SOFTIRQ, "TASKLET" },
{ SCHED_SOFTIRQ, "SCHED" }, { HRTIMER_SOFTIRQ, "HRTIMER" }, {
RCU_SOFTIRQ, "RCU" })
I would like to programmatically extract the action string. 'perf
script' prints the samples fine which suggests libtraceevent extracts
the information somehow.
Can you provide a suggestion -- something along the lines of
perf_evsel__intval() or perf_evsel__rawptr()?
Thanks,
David
next reply other threads:[~2015-04-15 16:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 16:20 David Ahern [this message]
2015-04-15 18:09 ` perf/tracepoints access to interpreted strings Arnaldo Carvalho de Melo
2015-04-20 20:46 ` Steven Rostedt
2015-04-20 21:25 ` Arnaldo Carvalho de Melo
2015-04-20 21:26 ` David Ahern
2015-04-21 6:17 ` Namhyung Kim
2015-04-21 13:07 ` Steven Rostedt
2015-04-21 14:35 ` Arnaldo Carvalho de Melo
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=552E8FB8.6010005@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
/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