Re: [PATCH V2 17/19] perf scripts python: Add All branches report

From: Arnaldo Carvalho de Melo
Date: Wed Oct 24 2018 - 10:16:25 EST

Em Wed, Oct 24, 2018 at 04:56:03PM +0300, Adrian Hunter escreveu:
> However I found kernel disassembly doesn't work, I think due to:

> commit edeb0c90df3581b821a764052d185df985f8b8dc
> perf tools: Stop fallbacking to kallsyms for vdso symbols lookup

> As I mentioned here:


> So I will look at a fix for that also.


But then that function receives both the addr and the cpumode, so its
callers should take into account the mixed ip/addr cpumodes, i.e. if we
get a sample with an ip in kernel and an addr in userspace, all we know
is that the ip is in the kernel, so we can either check the x86-specific
(well, specific to archs that share the address space for kernel and
userspace) machine__kernel_ip(addr) and pass a kernel cpu mode to
thread__find_addr(), otherwise ask for thread__find(addr, cpumode=user),

Since this is x86 specific stuff, using machine__kernel_ip(addr) to
figure out the addr cpumode seems the way to go, right?

- Arnaldo