lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Add --show-total-period for perf annotate
On 05/26/2015 07:03 PM, Andi Kleen wrote:
>> Anyway, attached patch is capable of displaying milliseconds approximation for each instruction.
>
> You realize that the events perf is not counting do not directly map to
> wall time? Even if you count cycles, the cycles are either stopping in idle
> or changing unit as the CPU's frequencies change. For other events the
> relationship is even more remote, think what happens when counting cache or
> TLB misses.
>
> Also even if it was mapping to time somehow, it's just a hit, not a
> duration, so it cannot say how long a individual instruction took.
>
> So you cannot map a sample event to time.
>
> To do what you want you would need to use something like processor
> trace, which can do exact accounting.
>
> I think the only thing that makes sense is to account it relative to
> the event counts.
>
> -Andi
>

Hello Andi.

I realize all aspects and capabilities of perf infrastructure. Even though
these numbers are not precise, I helped me a lot with debugging of a benchmark
which heavily utilizes a single CPU and runs in magnitude of seconds.

Ok, so let's convert the patch to feature that we can map an instruction
to a percentage number of events (cycles) it takes.

If I understand correctly, is it just about division of the number of events
related to an instruction and total number of events?

Thanks,
Martin



\
 
 \ /
  Last update: 2015-05-27 11:01    [W:0.090 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site