Skip to content

Commit

Permalink
perf record: Always force PERF_RECORD_FINISHED_ROUND event
Browse files Browse the repository at this point in the history
The PERF_RECORD_FINISHED_ROUND synthetic record governs queue flushing
in reporting, so it needs to be stored for any kind of event.

The lack of such periodic flushing made the tools use more memory than
needed, as the reordering was being done only after processing all
events.  This was the case when no tracepoints were in the mix.

Forcing the PERF_RECORD_FINISHED_ROUND event to be stored for all event
types.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1406300177-31805-18-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jul 25, 2014
1 parent a7a2b8b commit 33bf748
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ static int record__mmap_read_all(struct record *rec)
}
}

if (perf_header__has_feat(&rec->session->header, HEADER_TRACING_DATA))
rc = record__write(rec, &finished_round_event, sizeof(finished_round_event));
rc = record__write(rec, &finished_round_event, sizeof(finished_round_event));

out:
return rc;
Expand Down

0 comments on commit 33bf748

Please sign in to comment.