diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index a4aaadcb4c8..db4cd1e7b51 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -538,11 +538,6 @@ static int __cmd_record(int argc, const char **argv) | |||
538 | if (have_tracepoints(&evsel_list->entries)) | 538 | if (have_tracepoints(&evsel_list->entries)) |
539 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); | 539 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); |
540 | 540 | ||
541 | /* | ||
542 | * perf_session__delete(session) will be called at atexit_header() | ||
543 | */ | ||
544 | atexit(atexit_header); | ||
545 | |||
546 | if (forks) { | 541 | if (forks) { |
547 | child_pid = fork(); | 542 | child_pid = fork(); |
548 | if (child_pid < 0) { | 543 | if (child_pid < 0) { |
@@ -601,6 +596,11 @@ static int __cmd_record(int argc, const char **argv) | |||
601 | 596 | ||
602 | perf_session__set_sample_type(session, sample_type); | 597 | perf_session__set_sample_type(session, sample_type); |
603 | 598 | ||
599 | /* | ||
600 | * perf_session__delete(session) will be called at atexit_header() | ||
601 | */ | ||
602 | atexit(atexit_header); | ||
603 | |||
604 | if (pipe_output) { | 604 | if (pipe_output) { |
605 | err = perf_header__write_pipe(output); | 605 | err = perf_header__write_pipe(output); |
606 | if (err < 0) | 606 | if (err < 0) |