From: Omar Sandoval <osandov@osandov.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-team@fb.com, Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] tracing: expose current->comm to kprobe events
Date: Fri, 3 Jun 2016 09:41:29 -0700 [thread overview]
Message-ID: <20160603164129.GA12041@vader> (raw)
In-Reply-To: <20160603175943.934b96be3a332bb80fdc7c19@kernel.org>
On Fri, Jun 03, 2016 at 05:59:43PM +0900, Masami Hiramatsu wrote:
> On Fri, 3 Jun 2016 00:40:02 +0900
> Namhyung Kim <namhyung@gmail.com> wrote:
>
> > Hello,
> >
> > On Wed, Jun 1, 2016 at 3:17 PM, Omar Sandoval <osandov@osandov.com> wrote:
> > > From: Omar Sandoval <osandov@fb.com>
> > >
> > > ftrace is very quick to give up on saving the task command line (see
> > > `trace_save_cmdline()`). The workaround for events which really care
> > > about the command line is to explicitly assign it as part of the entry.
> > > However, this doesn't work for kprobe events, as there's no
> > > straightforward way to get access to current->comm. Add a kprobe event
> > > variable $comm which provides exactly that.
>
> Hmm, would you already tried to trace task/task_newtask and task/task_rename
> events? which also gives you task's comm.
> Of course there are no way to get running task's comm...
Right, I was trying to figure out what task was hitting a specific code
path, so I don't think that would work.
> Anyway, I also think more generic idea, e.g. enable to get "current" address.
> With the "current" address, we can do similar thing (by using perf-probe)
Yeah, that would also be useful in general. I think having this is still
convenient for quick debugging.
> The code looks good to me. As Namhyung said, it should support uprobes
> too.
Yesterday I sent out v2 which also supports uprobes, let me know if you
didn't receive it.
> BTW, now I'm considering integrate kprobes and uprobes ftrace interface.
> It is easy to classify given event definition is for kprobes or uprobes.
> So, we don't need to have 2 different interfaces for it.
>
> Thank you,
Thanks for taking a look.
--
Omar
prev parent reply other threads:[~2016-06-03 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 6:17 [PATCH] tracing: expose current->comm to kprobe events Omar Sandoval
2016-06-02 15:40 ` Namhyung Kim
2016-06-02 18:21 ` Omar Sandoval
2016-06-03 8:59 ` Masami Hiramatsu
2016-06-03 16:41 ` Omar Sandoval [this message]
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=20160603164129.GA12041@vader \
--to=osandov@osandov.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.com \
--cc=osandov@fb.com \
--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