linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Hemant Kumar <hemant@linux.vnet.ibm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 19/30] perf probe: Set default kprobe group name if it is not given
Date: Wed, 27 Apr 2016 11:31:01 -0300	[thread overview]
Message-ID: <1461767472-8827-20-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1461767472-8827-1-git-send-email-acme@kernel.org>

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Set kprobe group name as "probe" if it is not given.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160426090413.11891.95640.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 97b7f8e5fe69..0de5d10dda71 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;
-- 
2.5.5

  parent reply	other threads:[~2016-04-27 14:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 14:30 [GIT PULL 00/30] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 01/30] perf buildid: Fix off-by-one in write_buildid() Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 02/30] perf trace: Extract evsel contructor from perf_evlist__add_pgfault Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 03/30] perf trace: Make --pf maj/min/all use callchains too Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 04/30] perf script: Fix segfault when printing callchains Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 05/30] perf trace: Make --event honour --min-stack too Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 06/30] perf trace: Make --pf " Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 07/30] perf evlist: Decode perf_event_attr->branch_sample_type Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 08/30] perf tools: Make the x86 clean quiet Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 09/30] tools build: Fix perf_clean target Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 10/30] perf tools: Remove duplicate const qualifier Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 11/30] perf tests: Replace assignment with comparison on assert check Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 12/30] perf bench futex: Simplify wrapper for LOCK_PI Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 13/30] perf intel-pt: Fix off-by-one comparison on maximum code Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 14/30] perf hists: Clear dummy entry accumulated period Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 15/30] perf evlist: Enforce ring buffer reading Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 16/30] perf probe: Close target file on error path Arnaldo Carvalho de Melo
2016-04-27 14:30 ` [PATCH 17/30] perf tools: Add lsdir() helper to read a directory Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 18/30] perf probe: Let probe_file__add_event return 0 if succeeded Arnaldo Carvalho de Melo
2016-04-27 14:31 ` Arnaldo Carvalho de Melo [this message]
2016-04-27 14:31 ` [PATCH 20/30] perf trace: Move perf_flags beautifier to tools/perf/trace/beauty/ Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 21/30] perf trace: Do not beautify the 'pid' parameter as a simple integer Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 22/30] tools lib api fs: Add helper to read string from procfs file Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 23/30] perf thread: Introduce method to set comm from /proc/pid/self Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 24/30] perf trace: Read thread's COMM from /proc when not set Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 25/30] perf probe: Fix offline module name missmatch issue Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 26/30] perf probe: Fix module probe issue if no dwarf support Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 27/30] perf tools: Update x86's syscall_64.tbl, adding preadv2 & pwritev2 Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 28/30] perf bench: Remove one more die() call Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 29/30] perf core: Allow setting up max frame stack depth via sysctl Arnaldo Carvalho de Melo
2016-04-27 14:31 ` [PATCH 30/30] perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack Arnaldo Carvalho de Melo
2016-04-27 15:03 ` [GIT PULL 00/30] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461767472-8827-20-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).