On Thu, 9 Jun 2016 11:55:34 +0900 Masami Hiramatsu <mhira...@kernel.org> wrote:
> On Wed, 8 Jun 2016 18:38:02 -0700 > Omar Sandoval <osan...@osandov.com> wrote: > > > From: Omar Sandoval <osan...@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 <osan...@fb.com> > > Looks good to me:) > > Acked-by: Masami Hiramatsu <mhira...@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