BlogVTune and KDE Syndicate content

Fri, 09/09/2011 - 21:09

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:

  • Intel’s non-commercial offering

    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.

  • Register for free license

  • Register for Download Access

    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

Really nice, Very coool Tue, 02/07/2012 - 00:35 — TechLW (not verified)

Really nice,
Very coool sharing.

I do remember running and old Wed, 09/21/2011 - 17:32 — Anonymous (not verified)

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.

@Benoit: if they are somehow Sun, 09/11/2011 - 10:37 — Ian Monroe (not verified)

@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.

vtunes indeed rocks. Nice Sun, 09/11/2011 - 02:08 — sebsauer (not verified)

vtunes indeed rocks. Nice extension to oprofile, sysprof and valgrind. Thanks for the hint :-)

Now I’ll really look like Sun, 09/11/2011 - 01:10 — Benoit Jacob (not verified)

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.

Yes, that is true. But Sun, 09/11/2011 - 11:06 — Milian Wolff

Yes, that is true. But someone needs to try it out I’d say to see what works and what not.

In my Arch box, but sadly Fri, 09/09/2011 - 22:58 — dawehner (not verified)

In 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.8.X kernel though.

Oh ubuntu forked the kernel and released 2.8 ;)

ups, fixed now :) Sun, 09/11/2011 - 11:05 — Milian Wolff

ups, fixed now :)

Post new comment

  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options