diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-02-18 08:25:05 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-18 08:25:05 +0100 |
commit | e4cc9f4a207aeb819f358114eb23a04547d4807c (patch) | |
tree | 4c8f7f56427948ca9c2f30659ee18c6dcfdb4d08 /tools/perf/builtin-record.c | |
parent | e9345aab675382176740bc8a2c6d3caf1510e46d (diff) | |
parent | 668b8788f497b2386402daeca583d6300240d41d (diff) |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
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) if (have_tracepoints(&evsel_list->entries)) perf_header__set_feat(&session->header, HEADER_TRACE_INFO); - /* - * perf_session__delete(session) will be called at atexit_header() - */ - atexit(atexit_header); - if (forks) { child_pid = fork(); if (child_pid < 0) { @@ -601,6 +596,11 @@ static int __cmd_record(int argc, const char **argv) perf_session__set_sample_type(session, sample_type); + /* + * perf_session__delete(session) will be called at atexit_header() + */ + atexit(atexit_header); + if (pipe_output) { err = perf_header__write_pipe(output); if (err < 0) |