From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933135AbcFQRwz (ORCPT ); Fri, 17 Jun 2016 13:52:55 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36174 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932065AbcFQRwx (ORCPT ); Fri, 17 Jun 2016 13:52:53 -0400 Date: Fri, 17 Jun 2016 10:52:51 -0700 From: Omar Sandoval To: Steven Rostedt Cc: Masami Hiramatsu , Ingo Molnar , Namhyung Kim , linux-kernel@vger.kernel.org, kernel-team@fb.com, Alexei Starovoitov Subject: Re: [PATCH v3] tracing: expose current->comm to [ku]probe events Message-ID: <20160617175251.GB28716@vader.DHCP.thefacebook.com> References: <20160609115534.087b15a22dbd97535c8a0939@kernel.org> <20160617121927.7ed10a76@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160617121927.7ed10a76@gandalf.local.home> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2016 at 12:19:27PM -0400, Steven Rostedt wrote: > On Thu, 9 Jun 2016 11:55:34 +0900 > Masami Hiramatsu wrote: > > > On Wed, 8 Jun 2016 18:38:02 -0700 > > Omar Sandoval wrote: > > > > > From: Omar Sandoval > > > > > > 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 > > > > Looks good to me:) > > > > Acked-by: Masami Hiramatsu > > > > > --- > > > 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