Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752254AbcDZNvC (ORCPT ); Tue, 26 Apr 2016 09:51:02 -0400 Received: from mail.kernel.org ([198.145.29.136]:40117 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbcDZNvA (ORCPT ); Tue, 26 Apr 2016 09:51:00 -0400 Date: Tue, 26 Apr 2016 10:50:56 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Peter Zijlstra , Ingo Molnar , Hemant Kumar , Ananth N Mavinakayanahalli Subject: Re: [PATCH perf/core v4 13/19] perf-probe: Set default kprobe group name if it is not given Message-ID: <20160426135056.GA11033@kernel.org> References: <20160426090200.11891.43944.stgit@devbox> <20160426090413.11891.95640.stgit@devbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160426090413.11891.95640.stgit@devbox> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 36 Em Tue, Apr 26, 2016 at 06:04:13PM +0900, Masami Hiramatsu escreveu: > From: Masami Hiramatsu > > Set kprobe group name as "probe" if it is not given. Looks good, applied, - Arnaldo > Signed-off-by: Masami Hiramatsu > Signed-off-by: Masami Hiramatsu > --- > tools/perf/util/probe-event.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c > index d4286bb..934797e 100644 > --- a/tools/perf/util/probe-event.c > +++ b/tools/perf/util/probe-event.c > @@ -2822,9 +2822,13 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev, > { > int ret; > > - if (pev->uprobes && !pev->group) { > - /* Replace group name if not given */ > - ret = convert_exec_to_group(pev->target, &pev->group); > + if (!pev->group) { > + /* Set group name if not given */ > + if (!pev->uprobes) { > + pev->group = strdup(PERFPROBE_GROUP); > + ret = pev->group ? 0 : -ENOMEM; > + } else > + ret = convert_exec_to_group(pev->target, &pev->group); > if (ret != 0) { > pr_warning("Failed to make a group name.\n"); > return ret;