Re: perf top for arm64?

From: Zenghui Yu
Date: Tue Dec 10 2019 - 21:36:55 EST


Hi John,

On 2019/12/11 1:08, Jiri Olsa wrote:
On Tue, Dec 10, 2019 at 04:52:52PM +0000, John Garry wrote:
On 10/12/2019 16:36, Jiri Olsa wrote:
On Tue, Dec 10, 2019 at 04:13:49PM +0000, John Garry wrote:
Hi all,

I find to my surprise that "perf top" does not work for arm64:

root@ubuntu:/home/john/linux# tools/perf/perf top
Couldn't read the cpuid for this machine: No such file or directory


Hi Jirka,

there was recent change that check on cpuid and quits:
608127f73779 perf top: Initialize perf_env->cpuid, needed by the per arch annotation init routine


ok, this is new code. I obviously didn't check the git history...

But, apart from this, there are many other places where get_cpuid() is
called. I wonder what else we're missing out on, and whether we should still
add it.

right, I was just wondering how come vendor events are working for you,
but realized we have get_cpuid_str being called in there ;-)

I think we should add it as you have it prepared already,
could you post it with bigger changelog that would explain
where it's being used for arm?

I've also seen the similar problem when I was looking to add support
for 'perf kvm stat' on arm64 [1] (which though got stuck due to some
other reasons for a very long time :(

It would be great if your patch can address this issue!


[1] https://lore.kernel.org/patchwork/patch/1087531/


Thanks,
Zenghui