public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple events
@ 2009-10-21  6:19 Anton Blanchard
  2009-10-21 11:59 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Blanchard @ 2009-10-21  6:19 UTC (permalink / raw)
  To: mingo, paulus, a.p.zijlstra; +Cc: linux-kernel


If we are sampling multiple events we need the id in each sample so we can
differentiate between them in a perf data file.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux.trees.git/tools/perf/builtin-record.c
===================================================================
--- linux.trees.git.orig/tools/perf/builtin-record.c	2009-10-21 14:58:33.000000000 +1100
+++ linux.trees.git/tools/perf/builtin-record.c	2009-10-21 17:12:33.000000000 +1100
@@ -413,6 +413,9 @@ static void create_counter(int counter, 
 		attr->sample_type	|= PERF_SAMPLE_CPU;
 	}
 
+	if (nr_counters > 1)
+		attr->sample_type	|= PERF_SAMPLE_ID;
+
 	attr->mmap		= track;
 	attr->comm		= track;
 	attr->inherit		= (cpu < 0) && inherit;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-23  6:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21  6:19 [PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple events Anton Blanchard
2009-10-21 11:59 ` Ingo Molnar
2009-10-22  5:00   ` Anton Blanchard
2009-10-23  6:18     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox