[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091021061925.GW4808@kryten>
Date: Wed, 21 Oct 2009 17:19:25 +1100
From: Anton Blanchard <anton@...ba.org>
To: mingo@...e.hu, paulus@...ba.org, a.p.zijlstra@...llo.nl
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple
events
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@...ba.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists