I am trying to measure how much time my C code is taking with Vtune analyzer. I am using Vtune for the first time so don't know the step to follow to get my desired result meaning measuring timing of my C code. The code has a for loop which runs finite no of times it may run for miliseconds too. Is it possible to measure that small time with vtune?
Please let me know if anybody has doubt in my question.
You can set a lower TBS sample after value, so that VTune time based events occur at a smaller interval, but this will soon make the overhead of VTune significant. In any case, you will get only an approximation of what portion of you sampled interval was spend executing that code. As you intend to time a specific section of code, you may be able to time millisecond intervals more accurately, by _rdtsc() timer.