aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-10-17 11:12:34 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-19 03:26:35 -0400
commit2ba0825075e76236d22a20decd8e2346a99faabe (patch)
treee8f407d50ad0027d59369f295b04ba736b6e7b87 /tools/perf/builtin-record.c
parent5a116dd2797677cad48fee2f42267e3cb69f5502 (diff)
perf tools: Introduce bitmask'ed additional headers
This provides a new set of bitmasked headers. A new field is added in the perf headers that implements a bitmap storing optional features present in the perf.data file. The layout can be pictured like this: (Usual perf headers)(Features bitmap)[Feature 0][Feature n][Feature 255] If the bit n is set, then the feature n is used in this file. They are all set in order. This brings a backward and forward compatibility. The trace_info section has moved into such optional features, this is the first and only one for now. This is backward compatible with the .32 file version although it doesn't support the previous separate trace.info file. And finally it doesn't support the current interim development version. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1255792354-11304-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index fc3709cba136..f0467ff0d8ad 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -574,11 +574,11 @@ static int __cmd_record(int argc, const char **argv)
574 header = perf_header__new(); 574 header = perf_header__new();
575 575
576 if (raw_samples) { 576 if (raw_samples) {
577 perf_header__set_trace_info(); 577 perf_header__feat_trace_info(header);
578 } else { 578 } else {
579 for (i = 0; i < nr_counters; i++) { 579 for (i = 0; i < nr_counters; i++) {
580 if (attrs[i].sample_type & PERF_SAMPLE_RAW) { 580 if (attrs[i].sample_type & PERF_SAMPLE_RAW) {
581 perf_header__set_trace_info(); 581 perf_header__feat_trace_info(header);
582 break; 582 break;
583 } 583 }
584 } 584 }