Skip to content

Commit

Permalink
perf record: Add ID and to recorded event data when recording multipl…
Browse files Browse the repository at this point in the history
…e 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 <ebmunson@us.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1267804269-22660-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Eric B Munson authored and Ingo Molnar committed Mar 10, 2010
1 parent accd3cc commit 8907fd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8907fd6

Please sign in to comment.