[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1327916138.2446.187.camel@twins>
Date: Mon, 30 Jan 2012 10:35:38 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Akihiro Nagai <akihiro.nagai.hw@...achi.com>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
yrl.pp-manager.tt@...achi.com, Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH -tip v5 2/5] perf: set correct value to
perf_event_header.misc for BTS
On Mon, 2012-01-30 at 13:43 +0900, Akihiro Nagai wrote:
> @@ -330,6 +342,14 @@ int intel_pmu_drain_bts_buffer(void)
> return 1;
>
> for (; at < top; at++) {
> + /*
> + * To resolve user space symbols and DSOs correctly, set
> + * PERF_RECORD_MISC_USER if from_addr or to_addr is user space.
> + */
> + if (!kernel_ip(data.ip) || !kernel_ip(data.addr)) {
> + header.misc &= ~PERF_RECORD_MISC_CPUMODE_MASK;
> + header.misc |= PERF_RECORD_MISC_USER;
> + }
> data.ip = at->from;
> data.addr = at->to;
Why not key off of the from? If its a jump from userspace its a user
event, its a jump from kernel space its a kernel event?
--
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