summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2021-03-21 01:10:13 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-03-24 16:24:00 +0300
commit9f177fd8f20b46bbd76dbcc90184caf3b8548a9f (patch)
tree51b8f15c89da2cd60402c2734eeaebcd9ab568ae /tools
parent1833b64fee1032d1f48afaa3956bc0ea6b10d5e0 (diff)
downloadlinux-9f177fd8f20b46bbd76dbcc90184caf3b8548a9f.tar.xz
perf daemon: Return from kill functions
We should return correctly and warn in both daemon_session__kill() and daemon__kill() after we tried everything to kill sessions. The current code will keep on looping and waiting. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210320221013.1619613-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-daemon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index 4697493842f5..7c4a9d424a64 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -908,7 +908,9 @@ static void daemon_session__kill(struct daemon_session *session,
daemon_session__signal(session, SIGKILL);
break;
default:
- break;
+ pr_err("failed to wait for session %s\n",
+ session->name);
+ return;
}
how++;
@@ -961,7 +963,8 @@ static void daemon__kill(struct daemon *daemon)
daemon__signal(daemon, SIGKILL);
break;
default:
- break;
+ pr_err("failed to wait for sessions\n");
+ return;
}
how++;