diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 268b356391fc..f3151d3c70ce 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -502,6 +502,7 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv) | |||
502 | struct perf_evlist *evsel_list = rec->evlist; | 502 | struct perf_evlist *evsel_list = rec->evlist; |
503 | const char *output_name = rec->output_name; | 503 | const char *output_name = rec->output_name; |
504 | struct perf_session *session; | 504 | struct perf_session *session; |
505 | bool disabled = false; | ||
505 | 506 | ||
506 | rec->progname = argv[0]; | 507 | rec->progname = argv[0]; |
507 | 508 | ||
@@ -735,8 +736,10 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv) | |||
735 | * die with the process and we wait for that. Thus no need to | 736 | * die with the process and we wait for that. Thus no need to |
736 | * disable events in this case. | 737 | * disable events in this case. |
737 | */ | 738 | */ |
738 | if (done && !perf_target__none(&opts->target)) | 739 | if (done && !disabled && !perf_target__none(&opts->target)) { |
739 | perf_evlist__disable(evsel_list); | 740 | perf_evlist__disable(evsel_list); |
741 | disabled = true; | ||
742 | } | ||
740 | } | 743 | } |
741 | 744 | ||
742 | if (quiet || signr == SIGUSR1) | 745 | if (quiet || signr == SIGUSR1) |