VTune and KDE
Hey all,
been some time since I blogged last time. My TODO list is ever increasing and I took my day job at KDAB up again. Among others, I attended a marketing talk by Edmund Preiss. He actually made that marketing talk interesting, not least by his huge knowledge in the business, thanks to ~20 years of working for Intel. Probably the most important info I got out of it is this:
VTune is available free-of-charge under a non-commercial license
Yes, you heard right. Take these links:
note this entry from the FAQ:
What does noncommercial mean?
Non-commercial means that you are not getting compensated in any form for the products and/or services you develop using these Intel® Software Products.
you’ll need the serial number that gets send to you via email after registering for the license
- install VTune and profile the hell out of KDE/FOSS software and improve it all!
speeding up KDevelop
Personally I did the latter for KDevelop the last two days, and the results are astonishing. I just tested the results from today and an unscientific time kdevelop -s lotsofprojects
- wait until parsing finished - stop showed roughly 50% decrease in time, from ~12min to ~6min. Yes, a whopping 50% - try it out for yourself and see how big the gain is. Don’t forget to whipe the DUChain cache though (i.e. via setting the environment variable CLEAR_DUCHAIN_DIR=1
).
Why VTune rocks
I’m a huge fan of the Valgrind toolsuite, but it is simply too slow for profiling some things. Like opening ten medium to big sized projects in KDevelop and taking a look at the parsing speed. This can easily take a few minutes, but in Valgrind it would take ages. With VTune on the other hand, thanks to it’s sampling based approach, I don’t really notice the performance delay.
Then you might have heard of the new perf
profiling utility in the Linux kernel. It is also sampling based, but sadly requires special compile options on 64 Bit (-fno-omit-frame-pointers
), and the UI is horrible, I haven’t found anything worthwhile with it so far…
VTune on the other hand has an incredible GUI, which makes profiling a joy. You can look at call stacks top-down or bottom-up, visualize locks and waits, easily find hotspots, … I’m blasted. Especially the utilities to look at multi threaded performance (of e.g. KDevelop) kills every single other performance tool I have ever tested. Oh and did I mention that you can attach to an app at runtime, analyze some thing, and detach again?
Seriously, Intel: You just found a new fan boy in me. Thanks for giving this tool away for free for us “I hack on this tool in my spare time, yet still want it to perform nicely” people :) And kudos to the VTune developers - I’m blown away by it!
I really hope more people in the KDE community will try out VTune and try to improve the performance of our apps, I bet there is lots of potential!
Pitfalls
There are some negative aspects to VTune though: First of all it’s UI is sometimes freezing. I wonder if the developers should not maybe spent some time on analyzing the tool itself ;-)
The biggest gripe though is that VTune does not work everywhere. I tried to run it on my Arch box, but sadly Linux 3.0 is not supported by VTune yet. It worked like a charm on two Ubuntu boxes with some 2.6.X kernel though.
This also means that I have no idea if, and how, VTune works on non-Intel CPUs. I think some of it works nicely. I did not install any of the Kernel modules for examples, which would be required for hardcore lowlevel CPU profiling. I think the same feature set I praised so much above, should hence be available on e.g. AMD CPUs. But well, this is left to be tested.
So, I’m now drinking a well deserved beer and look positively into the future of a fast KDevelop/KDE :)
bye
Comments
Want to comment? Send me an email!
Comment by TechLW (not verified) (2012-02-07 00:35:00)
Really nice,
Very coool sharing.
Comment by Anonymous (not verified) (2011-09-21 17:32:00)
I do remember running and old version of VTune on my AMD X2 box. It exited with an error about unsupported CPU. Maybe things improved since then, but I doubt that. AMD has something called CodeAnalyst (open source, seems to be a gui to oprofile). I haven’t checked it yet.
Comment by Ian Monroe (not verified) (2011-09-11 10:37:00)
@Benoit: if they are somehow able to make their profiler mislead developers into making optimizations that will end up with worst performance on other platforms… well then they are amazing geniuses and we should all be running Intel anyways. :D
It’s funny that Linux 3.0 is breaking code, but only because of stupid version checking.
Comment by sebsauer (not verified) (2011-09-11 02:08:00)
vtunes indeed rocks. Nice extension to oprofile, sysprof and valgrind. Thanks for the hint :-)
Comment by Benoit Jacob (not verified) (2011-09-11 01:10:00)
Now I’ll really look like just a perf fanboy, but I can’t resist mentioning that recently Intel was caught making its compiler generate specifically poor code for AMD cpus.
http://www.google.com/search?q=intel+compiler+amd
So I would only trust a closed-source Intel profiler as long as only Intel CPUs are concerned.
Comment by Milian Wolff (2011-09-11 11:06:00)
Yes, that is true. But someone needs to try it out I’d say to see what works and what not.
Comment by dawehner (not verified) (2011-09-09 22:58:00)
Oh ubuntu forked the kernel and released 2.8 ;)
Comment by Milian Wolff (2011-09-11 11:05:00)
ups, fixed now :)