Commit 2a12ec13 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Arnaldo Carvalho de Melo

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: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarMasami 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@devboxSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6ed0720a
...@@ -2748,8 +2748,12 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev, ...@@ -2748,8 +2748,12 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
{ {
int ret; int ret;
if (pev->uprobes && !pev->group) { if (!pev->group) {
/* Replace group name if not given */ /* 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); ret = convert_exec_to_group(pev->target, &pev->group);
if (ret != 0) { if (ret != 0) {
pr_warning("Failed to make a group name.\n"); pr_warning("Failed to make a group name.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment