diff options
author | Eric B Munson <[email protected]> | 2010-03-05 12:51:05 -0300 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2010-03-10 13:53:46 +0100 |
commit | 8907fd607b66e36636469a2de9833db643869db8 (patch) | |
tree | 325b724c997833891576ee81b454e00a822425b5 | |
parent | accd3cc45a0e1d11090ea66888405987de77bdca (diff) |
perf record: Add ID and to recorded event data when recording multiple events
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.
Signed-off-by: Eric B Munson <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | 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 771533ced6a8..f573bbb83572 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; |