|
@@ -538,11 +538,6 @@ static int __cmd_record(int argc, const char **argv)
|
|
if (have_tracepoints(&evsel_list->entries))
|
|
if (have_tracepoints(&evsel_list->entries))
|
|
perf_header__set_feat(&session->header, HEADER_TRACE_INFO);
|
|
perf_header__set_feat(&session->header, HEADER_TRACE_INFO);
|
|
|
|
|
|
- /*
|
|
|
|
- * perf_session__delete(session) will be called at atexit_header()
|
|
|
|
- */
|
|
|
|
- atexit(atexit_header);
|
|
|
|
-
|
|
|
|
if (forks) {
|
|
if (forks) {
|
|
child_pid = fork();
|
|
child_pid = fork();
|
|
if (child_pid < 0) {
|
|
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__set_sample_type(session, sample_type);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * perf_session__delete(session) will be called at atexit_header()
|
|
|
|
+ */
|
|
|
|
+ atexit(atexit_header);
|
|
|
|
+
|
|
if (pipe_output) {
|
|
if (pipe_output) {
|
|
err = perf_header__write_pipe(output);
|
|
err = perf_header__write_pipe(output);
|
|
if (err < 0)
|
|
if (err < 0)
|