aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2020-05-07 00:12:44 +0000
committerAlexei Starovoitov <[email protected]>2020-05-07 00:12:44 +0000
commitf87b87a1c969f767b9938d435f0211d293e323db (patch)
treeb315d103bc610caf0682329320839ec8dc51fa59 /tools/perf/builtin-stat.c
parentMerge branch 'bpf-rv64-jit' (diff)
parentcapabilities: Introduce CAP_PERFMON to kernel and user space (diff)
downloadkernel-f87b87a1c969f767b9938d435f0211d293e323db.tar.gz
kernel-f87b87a1c969f767b9938d435f0211d293e323db.zip
Merge tag 'perf-for-bpf-2020-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into bpf-next
CAP_PERFMON for BPF
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index ec053dc1e35c..9207b6c45475 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -686,8 +686,11 @@ try_again_reset:
break;
}
}
- if (child_pid != -1)
+ if (child_pid != -1) {
+ if (timeout)
+ kill(child_pid, SIGTERM);
wait4(child_pid, &status, 0, &stat_config.ru_data);
+ }
if (workload_exec_errno) {
const char *emsg = str_error_r(workload_exec_errno, msg, sizeof(msg));