[llvm-dev] LNT server function perf profile comparison

Kristof Beyls via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 9 05:52:26 PDT 2019


Op vr 9 aug. 2019 om 12:06 schreef Felix Berlakovich <felix at berlakovich.at>:

> Hi Kristof!
>
>
>
> Are you getting "0" for all instructions, or only for some where you
> didn't expect it?
>
>
>
> Basically for all instructions which had a legit value before. If I only
> look at a single function at a time (e.g. on the left side), I can choose
> “Absolute numbers” and see the correct numbers. But as soon as I do it with
> two functions, I only see the numbers for one of the functions (the right
> one).
>
>
>
> Are you sure the function you show in the screenshot actually still gets
> called in the transformed program?
>
>
>
> Yes, I think they should be called. In the screenshot I used the same
> program with –O0 vs –O2.
>
>
>
> The functions I am usually comparing are only called in the left or the
> right program respectively. The modified program contains a slightly
> modified clone of the original function and calls the modified clone
> instead of the original one. The modified clone simply contains a few extra
> instructions. That is, the function on the left is *not* called in the
> right program and vice versa. I would rather like to compare the slightly
> modified clone with the original function. What puzzles me is that
> displaying relative numbers works, whereas absolute numbers do not.
>

Hmmm - that seems strange indeed. I'm afraid all I can say is that I
haven't seen this behaviour before. I'm afraid you may have to start
debugging the javascript driving this webpage to drill down to the root
cause of this issue...
FWIW, the source code of the (probably) relevant javascript lives at
https://github.com/llvm/llvm-lnt/blob/master/lnt/server/ui/static/lnt_profile.js.
All of the code until line 638 seems to be about producing the CFG view.
Given you have the issue also without the CFG view, you can probably ignore
that part. I'm afraid that even ignoring that part, it is still quite a bit
of code...


>
>
> FWIW and orthogonally - I'd recommend using the View: "Control-Flow Graph
> (X86-64)". That way, you'll get counters aggregated per basic block, which
> removes a bit some of the confusion that can result when perf associates
> events with an instruction a number of instructions removed from the
> instruction causing the event you were measuring.
>
>
>
> Thanks for the info! I already played a bit with the Control-Flow Graph
> view, but had the same issue as described above.
>
>
>
> Felix
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190809/5562ae1f/attachment.html>


More information about the llvm-dev mailing list