diff options
author | Alexey Budankov <alexey.budankov@linux.intel.com> | 2020-07-17 10:02:42 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-22 15:42:29 +0300 |
commit | 7bb4ff05c0909bdbbdbce745c08801ef10f9bcea (patch) | |
tree | 290598c2567d7902fe34d658a964214ce432d25f /tools/perf/builtin-stat.c | |
parent | dece3a4d33cec0fd5cde1c50e36a03193ded4f99 (diff) | |
download | linux-7bb4ff05c0909bdbbdbce745c08801ef10f9bcea.tar.xz |
perf stat: Move target check to loop control statement
Check for target existence in loop control statement jointly external
asynchronous 'done' signal.
Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/79037528-578c-af64-f06c-a644b7f5ba6a@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | tools/perf/builtin-stat.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 80aea49e4dac..87eebf3f55ae 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -815,10 +815,8 @@ try_again_reset: psignal(WTERMSIG(status), argv[0]); } else { enable_counters(); - while (!done) { + while (!done && is_target_alive(&target, evsel_list->core.threads)) { nanosleep(&ts, NULL); - if (!is_target_alive(&target, evsel_list->core.threads)) - break; if (timeout || handle_interval(interval, ×)) break; } |