Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753319AbcD0Pgj (ORCPT ); Wed, 27 Apr 2016 11:36:39 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51216 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbcD0Pgg (ORCPT ); Wed, 27 Apr 2016 11:36:36 -0400 Date: Wed, 27 Apr 2016 08:35:56 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: tglx@linutronix.de, ananth@linux.vnet.ibm.com, acme@redhat.com, mingo@kernel.org, masami.hiramatsu.pt@hitachi.com, mhiramat@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, namhyung@kernel.org, hemant@linux.vnet.ibm.com Reply-To: peterz@infradead.org, namhyung@kernel.org, hemant@linux.vnet.ibm.com, mingo@kernel.org, masami.hiramatsu.pt@hitachi.com, mhiramat@kernel.org, tglx@linutronix.de, acme@redhat.com, ananth@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20160426090413.11891.95640.stgit@devbox> References: <20160426090413.11891.95640.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf probe: Set default kprobe group name if it is not given Git-Commit-ID: 2a12ec13cc4ca8690ad2690c09bf8bff17c228d9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1727 Lines: 44 Commit-ID: 2a12ec13cc4ca8690ad2690c09bf8bff17c228d9 Gitweb: http://git.kernel.org/tip/2a12ec13cc4ca8690ad2690c09bf8bff17c228d9 Author: Masami Hiramatsu AuthorDate: Tue, 26 Apr 2016 18:04:13 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 26 Apr 2016 13:14:58 -0300 perf probe: Set default kprobe group name if it is not given Set kprobe group name as "probe" if it is not given. Signed-off-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Hemant Kumar Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160426090413.11891.95640.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo --- 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 97b7f8e..0de5d10 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2748,9 +2748,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;