mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 18:30:54 +07:00
perf stat: Factor out body of event handling loop for fork case
Factor out body of event handling loop for fork case reusing handle_interval() function. 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/a8ae3f8d-a30e-fd40-998a-f5ca3e98cd45@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7bb4ff05c0
commit
b0ce0c8df4
@ -792,10 +792,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
|
|||||||
if (interval || timeout) {
|
if (interval || timeout) {
|
||||||
while (!waitpid(child_pid, &status, WNOHANG)) {
|
while (!waitpid(child_pid, &status, WNOHANG)) {
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
if (timeout)
|
if (timeout || handle_interval(interval, ×))
|
||||||
break;
|
|
||||||
process_interval();
|
|
||||||
if (interval_count && !(--times))
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user