From: Masami Hiramatsu <mhiramat@redhat.com>
To: Ashwin Chaugule <ashbertslists@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
lkml <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Paul Mackerras <paulus@samba.org>,
a.p.zijlstra@chello.nl
Subject: Re: [PATCH -tip tracing/kprobes 0/9] tracing/kprobes, perf: perf probe and kprobe-tracer bugfixes
Date: Mon, 19 Oct 2009 20:30:22 -0400 [thread overview]
Message-ID: <4ADD049E.9080000@redhat.com> (raw)
In-Reply-To: <ad7a95ae0910191610q6f6200f1n112a71a0cbd483f1@mail.gmail.com>
Hi Ashwin,
Ashwin Chaugule wrote:
> Masami,
> I really like your idea with kprobes ! I havent yet run
> this stuff on my machine, but I've been planning to utilize kprobes
> with perfevents too. Please let me know if the following functionality
> is already possible with your patches.
Thanks! I'm happy to here that you are interested in.
> The basic idea I had was to be able to profile any function in the
> kernel using kprobes and use the perfevents framework to monitor
> things like incorrect branch predictions, cache misses etc. for the
> scope of that function. That way, we can fine tune kernel functions
> that are in the hot path of kernel control flow, using gcc tricks,
> inline assembly, or even architecture specific tricks.
Actually, perf-probe can add tracepoint-like events. It will allow you
to probe function inside by both C-source-line level and address level.
perf-probe already supports inline function too.
Currently, even its syntax is unstable, but you can add an event inside
some function which is at cfile.c line 100, as below;
perf probe -P 'p:probe1 cfile.c:100'
and you can trace it by using perf record as same as other tracepoints
perf record -f -e kprobes:myprobe:record -F 1 -a ls
> Alternately, I think even dynamic trace could provide similar insight
> with perfevents ? If none of this is already done, I plan to work on
> this in my spare time and would like to team up with anyone else
> interested.
Yes, it's done as I said above.
But it still has long TODO list, including support type of arguments,
arrays, fields of structures and so on (of course, defining useful
syntax too). So any comments and contributes are welcome :-)
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
next prev parent reply other threads:[~2009-10-20 0:28 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-17 0:07 [PATCH -tip tracing/kprobes 0/9] tracing/kprobes, perf: perf probe and kprobe-tracer bugfixes Masami Hiramatsu
2009-10-17 0:07 ` [PATCH -tip tracing/kprobes 1/9] tracing/kprobes: Update kprobe-tracer selftest against new syntax Masami Hiramatsu
2009-10-17 10:04 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:07 ` [PATCH -tip tracing/kprobes 2/9] tracing/kprobes: Add failure messages for debugging Masami Hiramatsu
2009-10-17 10:05 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:07 ` [PATCH -tip tracing/kprobes 3/9] x86: Add MMX/SSE opcode groups to opcode map Masami Hiramatsu
2009-10-17 10:05 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:07 ` [PATCH -tip tracing/kprobes 4/9] x86: Add AMD prefetch and 3DNow! opcodes " Masami Hiramatsu
2009-10-17 10:05 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:07 ` [PATCH -tip tracing/kprobes 5/9] perf: Check libdwarf APIs for perf probe Masami Hiramatsu
2009-10-17 10:05 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:08 ` [PATCH -tip tracing/kprobes 6/9] perf: Use die() for error cases in perf-probe Masami Hiramatsu
2009-10-17 10:06 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:08 ` [PATCH -tip tracing/kprobes 7/9] perf: Use eprintf() for debug messages " Masami Hiramatsu
2009-10-17 10:06 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:08 ` [PATCH -tip tracing/kprobes 8/9] perf: Add DIE_IF() macro for error checking Masami Hiramatsu
2009-10-17 10:06 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 0:08 ` [PATCH -tip tracing/kprobes 9/9] perf: Add perf-probe document Masami Hiramatsu
2009-10-17 10:06 ` [tip:perf/probes] " tip-bot for Masami Hiramatsu
2009-10-17 8:02 ` [PATCH -tip tracing/kprobes 0/9] tracing/kprobes, perf: perf probe and kprobe-tracer bugfixes Ingo Molnar
2009-10-17 10:34 ` Ingo Molnar
2009-10-17 10:37 ` Ingo Molnar
2009-10-18 6:01 ` Masami Hiramatsu
2009-10-19 7:51 ` Ingo Molnar
2009-10-19 11:00 ` Frederic Weisbecker
2009-10-19 11:21 ` Ingo Molnar
2009-10-19 19:32 ` Frederic Weisbecker
2009-10-20 6:43 ` Ingo Molnar
2009-10-20 17:51 ` Frederic Weisbecker
2009-10-19 19:51 ` Masami Hiramatsu
2009-10-19 22:54 ` Masami Hiramatsu
2009-10-20 6:51 ` Ingo Molnar
2009-10-21 0:05 ` Masami Hiramatsu
2009-10-20 6:50 ` Ingo Molnar
2009-10-20 14:38 ` Masami Hiramatsu
2009-10-19 16:18 ` Arnaldo Carvalho de Melo
2009-10-20 17:45 ` Frederic Weisbecker
2009-10-19 18:56 ` Masami Hiramatsu
2009-10-20 6:54 ` Ingo Molnar
2009-10-20 14:27 ` Masami Hiramatsu
2009-10-19 23:10 ` Ashwin Chaugule
2009-10-20 0:30 ` Masami Hiramatsu [this message]
2009-10-20 1:59 ` Ashwin Chaugule
2009-10-20 6:55 ` Ingo Molnar
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=4ADD049E.9080000@redhat.com \
--to=mhiramat@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ashbertslists@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).