forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
dece3a4d33
commit
7bb4ff05c0
|
@ -815,10 +815,8 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user