Felix Berlakovich via llvm-dev
2019-Aug-08 18:17 UTC
[llvm-dev] LNT server function perf profile comparison
Hi! I have implemented a security feature in LLVM and now I want to evaluate the performance impact by comparing the perf profile of the originally compiled program and the modified program. For that I have run a benchmark with lnt runtest test-suite and -use-perf=all. I can compare the recorded counters in the lnt runserver webinterface perfectly fine with the side by side comparison. However, as soon as I switch from "Relative (%)" to "Absolute numbers", one side of the comparison only displays 0 anymore. Is this normal behavior or is something with my lnt server / perf profiles broken? You can see a screenshot of how it looks like here: https://ibb.co/dDnZp5T Regards, Felix -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190808/ab2f3440/attachment.html>
Kristof Beyls via llvm-dev
2019-Aug-09 07:50 UTC
[llvm-dev] LNT server function perf profile comparison
Hi Felix, This is not really expected behaviour. Are you getting "0" for all instructions, or only for some where you didn't expect it? Are you sure the function you show in the screenshot actually still gets called in the transformed program? 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. Hoping this helps a little, Kristof Op vr 9 aug. 2019 om 01:16 schreef Felix Berlakovich via llvm-dev < llvm-dev at lists.llvm.org>:> Hi! > > > > I have implemented a security feature in LLVM and now I want to evaluate > the performance impact by comparing the perf profile of the originally > compiled program and the modified program. For that I have run a benchmark > with lnt runtest test-suite and –use-perf=all. I can compare the recorded > counters in the lnt runserver webinterface perfectly fine with the side by > side comparison. However, as soon as I switch from “Relative (%)” to > “Absolute numbers”, one side of the comparison only displays 0 anymore. Is > this normal behavior or is something with my lnt server / perf profiles > broken? > > > > You can see a screenshot of how it looks like here: https://ibb.co/dDnZp5T > > > > Regards, > > > > Felix > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190809/c2c63160/attachment.html>
Kristof Beyls via llvm-dev
2019-Aug-09 12:52 UTC
[llvm-dev] LNT server function perf profile comparison
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>