[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110811120620.5900.50427.stgit@linux3>
Date: Thu, 11 Aug 2011 21:06:20 +0900
From: Akihiro Nagai <akihiro.nagai.hw@...achi.com>
To: Arnaldo Carvalho de Melo <acme@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
David Ahern <dsahern@...il.com>
Cc: linux-kernel@...r.kernel.org,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
yrl.pp-manager.tt@...achi.com,
Akihiro Nagai <akihiro.nagai.hw@...achi.com>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
David Ahern <dsahern@...il.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: [PATCH -tip v3 2/5] perf: change perf_event_header.misc to
PERF_RECORD_MISC_USER for BTS
Change perf_event_headder.misc to PERF_RECORD_MISC_USER for
BTS records, because BTS traces both kernel and user spaces
nevertheless perf specifies to trace only kernel or user space.
Signed-off-by: Akihiro Nagai <akihiro.nagai.hw@...achi.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
---
arch/x86/kernel/cpu/perf_event_intel_ds.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index 1b1ef3a..323f3f0 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -340,6 +340,14 @@ static int intel_pmu_drain_bts_buffer(void)
*/
perf_prepare_sample(&header, &data, event, ®s);
+ /*
+ * Since BTS can not trace kernel and user space separately, set
+ * PERF_RECORD_MISC_USER in header.misc to resolve both kernel and
+ * user DSOs and symbols.
+ */
+ header.misc &= ~PERF_RECORD_MISC_CPUMODE_MASK;
+ header.misc |= PERF_RECORD_MISC_USER;
+
if (perf_output_begin(&handle, event, header.size * (top - at)))
return 1;
--
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