0

I am trying to profile a c application to find hotspots in the code. However, I have an issue where the program completes too fast for vTune to properly collect the data.

I can not change the original program in anyway so trying to make it take longer is not an option.

Outside of getting a worse computer is there any way or trick to get vTune to profile the program so that hotspots are displayed?

I am new to vTune so simple instructions are appreciated.

Thank you for any help!

Ajay Varghese
  • 89
  • 1
  • 1
  • 5
  • 3
    Do nothing. If a program completes quickly (and correctly), there is no problem to be solved. – Eric Postpischil Jan 19 '23 at 14:41
  • I understand that this is the practical answer but, I need the performance metrics. – Ajay Varghese Jan 19 '23 at 15:04
  • Why paint yourself into a corner? Just wrap a million-x loop around it, and divide the results by a million. By the way, the "hotspot" concept is baloney. If you really want it to go faster, you need to see what it's doing that isn't necessary. I do [*this*](https://stackoverflow.com/a/378024/23771). – Mike Dunlavey Jan 19 '23 at 20:38
  • or maybe you could run it under one of the interpreters... That will give you 1 or 2 orders of magnitude slowdown. – Mike Dunlavey Jan 19 '23 at 20:45
  • 1
    We apologize as this is a known cause and the only solution is to increase your workload of your application(which is impossible in your case as you mentioned). [Here's](https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/troubleshooting/error-message-cannot-open-data.html) your troubleshooting steps! – AlekhyaV - Intel Jan 23 '23 at 12:40

1 Answers1

3

If you cannot change the size of workload for the application, you can try to change following options in VTune:

  1. Set finalization mode to Full mode. VTune will load all collected samples in this mode.
  2. If you can use Sampling Driver (administrative privileges are required to install it), you can run Hotspots analysis in Hardware Event-Based Sampling mode and set a minimum value for the sampling interval: 0.01 ms. It will increase the number of collected samples during the analysis. But, it will also increase the collection overhead.

VTune screenshot with the options to analyze small applications

Egor
  • 485
  • 4
  • 8