diff options
author | Jiri Olsa <[email protected]> | 2021-03-20 23:10:13 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-03-24 10:24:00 -0300 |
commit | 9f177fd8f20b46bbd76dbcc90184caf3b8548a9f (patch) | |
tree | 51b8f15c89da2cd60402c2734eeaebcd9ab568ae | |
parent | 1833b64fee1032d1f48afaa3956bc0ea6b10d5e0 (diff) |
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 <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-daemon.c | 7 |
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++; |