The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: johnsa on June 15, 2008, 07:45:13 PM

Title: Vtune
Post by: johnsa on June 15, 2008, 07:45:13 PM
So.. I downloaded a demo of VTune, installed it.. followed the quickstart and sampling guides thinking it would be a great way to profile some code and get some insights into possible stalls, cache problems, dependancy chains etc..
So i've tried it a couple times now on various bits of code and libraries I've been working on and sofar I haven't been able to glean a single piece of useful information out of VTune.. either I'm missing something or else it's seriously broken. I don't get any help from the tuning advisor.. and some garbled clock timings and nothing even remotely useful on the disassembly of what instructions might be causing stalls etc..

Anyone actually had any luck using it?
Title: Re: Vtune
Post by: c0d1f1ed on June 16, 2008, 12:26:54 PM
Make sure the code runs for at least a few seconds. If you want to profile just a short piece of assembly code put it in a loop that runs millions or billions of times. VTune can then point you to the instructions that took the most clock cycles to execute. It's really quite powerful but the learning curve can be quite steep as it has lots of hidden settings. The Tuning Advisor will only give you high-level advice (mainly for C++) so you might want to run other tests (either time-driven or event-driven).

By the way, you might also want to try AMD's CodeAnalystp (http://developer.amd.com/CPU/Pages/default.aspx). It's slightly easier to use and time-driven profiling also works on Intel CPUs. Most of all, it's free!