summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorAlexey Budankov <alexey.budankov@linux.intel.com>2020-07-17 10:03:19 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-07-22 15:43:12 +0300
commitb0ce0c8df4dd80dd79b5341314ff289df81d2bf6 (patch)
treebacb196578735d5c597b83fd0226a63c30e16e40 /tools/perf/builtin-stat.c
parent7bb4ff05c0909bdbbdbce745c08801ef10f9bcea (diff)
downloadlinux-b0ce0c8df4dd80dd79b5341314ff289df81d2bf6.tar.xz
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>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 87eebf3f55ae..91f31518948e 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -792,10 +792,7 @@ try_again_reset:
if (interval || timeout) {
while (!waitpid(child_pid, &status, WNOHANG)) {
nanosleep(&ts, NULL);
- if (timeout)
- break;
- process_interval();
- if (interval_count && !(--times))
+ if (timeout || handle_interval(interval, &times))
break;
}
}