From: Arnaldo Carvalho de Melo on
From: Eric B Munson <ebmunson(a)us.ibm.com>

Currently perf record does not write the ID or the to disk for events.
This doesn't allow report to tell if an event stream contains one or
more types of events. This patch adds this entry to the list of data
that record will write to disk if more than one event was requested.

Cc: Peter Zijlstra <a.p.zijlstra(a)chello.nl>
Cc: Paul Mackerras <paulus(a)samba.org>
Signed-off-by: Eric B Munson <ebmunson(a)us.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
---
tools/perf/builtin-record.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 771533c..f573bbb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -244,6 +244,9 @@ static void create_counter(int counter, int cpu, pid_t pid)

attr->sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID;

+ if (nr_counters > 1)
+ attr->sample_type |= PERF_SAMPLE_ID;
+
if (freq) {
attr->sample_type |= PERF_SAMPLE_PERIOD;
attr->freq = 1;
--
1.5.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/