Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425364

Re: [PATCH v3] tracing: expose current->comm to [ku]probe events

From Omar Sandoval <osandov@osandov.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] tracing: expose current->comm to [ku]probe events
Date 2016-06-17 20:00 +0200
Message-ID <rL6dH-19h-1@gated-at.bofh.it> (permalink)
References <rHX6V-7Ur-9@gated-at.bofh.it> <rHYml-en-1@gated-at.bofh.it> <rL4EV-my-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jun 17, 2016 at 12:19:27PM -0400, Steven Rostedt wrote:
> On Thu, 9 Jun 2016 11:55:34 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > On Wed,  8 Jun 2016 18:38:02 -0700
> > 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/uprobe
> > > event variable $comm which provides exactly that.
> > > 
> > > Signed-off-by: Omar Sandoval <osandov@fb.com>  
> > 
> > Looks good to me:)
> > 
> > Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
> > 
> > > ---
> > > Alexei pointed out to me that this same functionality can be acheived
> > > with BPF and the bpf_get_current_comm() helper, so strictly speaking,
> > > this patch isn't necessary. It's still convenient for ad-hoc stuff,
> > > though, so I figured I'd throw this up and see what everyone thought.  
> > 
> > Anyway, I'd like to pull this patch since this still be useful
> > in handy way to get comm on ftrace :)
> > 
> 
> I pulled it.
> 
> Thanks!
> 
> -- Steve

Thanks, Steve!

-- 
Omar

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3] tracing: expose current->comm to [ku]probe events Steven Rostedt <rostedt@goodmis.org> - 2016-06-17 18:20 +0200
  Re: [PATCH v3] tracing: expose current->comm to [ku]probe events Omar Sandoval <osandov@osandov.com> - 2016-06-17 20:00 +0200

csiph-web