perf tools: Add AUX area tracing index
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 30 Apr 2015 14:37:25 +0000 (17:37 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 May 2015 22:48:47 +0000 (19:48 -0300)
commit99fa298453495ee23801ab500a5fe0138c260edb
tree1bd00c1305dce664eef07a6557d83d98d4a98643
parent64a7e61f11a22de3571b7f43f231e9b3aab00f1e
perf tools: Add AUX area tracing index

Add an index of AUX area tracing events within a perf.data file.

perf record uses a special user event PERF_RECORD_FINISHED_ROUND to
enable sorting of events in chunks instead of having to sort all events
altogether.

AUX area tracing events contain data that can span back to the very
beginning of the recording period. i.e. they do not obey the rules of
PERF_RECORD_FINISHED_ROUND.

By adding an index, AUX area tracing events can be found in advance and
the PERF_RECORD_FINISHED_ROUND approach works as usual.

The index is recorded with the auxtrace feature in the perf.data file.
A session reads the index but does not process it.  An AUX area decoder
can queue all the AUX area data in advance using
auxtrace_queues__process_index() or otherwise process the index in some
custom manner.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1430404667-10593-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c
tools/perf/builtin-record.c
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h
tools/perf/util/header.c
tools/perf/util/session.c
tools/perf/util/session.h