Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4723 Discussions

Vtune - save profiled source code

ejo
Beginner
808 Views

I'm using Vtune to profile a code (Python/C/C++) that is under CI. I would like to know whether it is possible to archive as part of the results the version of source code that was actually profiled.
That is, when I open an older profile, I would like that the links to the source code refer to the archived version rather than the current version located on the disk (which is obviously different from the one that was used in the older profiling runs).

0 Kudos
8 Replies
Stas-Neverov-Intel
765 Views

Hi @ejo,

 

You can configure source file caching in Options:

https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/reference/user-interfac...

When caching is enabled then once you open a source file in VTune it will be cached in the result directory.

ejo
Beginner
730 Views

Hi Stas,
Thank you for the suggestion. It achieves what I'm looking for however it implies two things:

  1. that you manually open the files that you want to cache straight after completion of the profiling, and
  2. that you know in advance which files you will be revisiting in the future

which is not suitable for an automated pipeline with a large code base.

Is there a way to automate what you propose for a given source directory? I.e. that all sources contained in that directory would be automatically cached?

VaradJ_Intel
Moderator
682 Views

Hi,


When you check the option of "Cache source files" the source code which is associated with the application at the time of profiling gets stored in cache.


The source files will get save in cache every time unless you manually uncheck the option.


So next time whenever you open the old report you will get the old source code associated with the application at the time of profiling.


Does this resolves your query? If you need any further clarification please let us know.


Thank You.


VaradJ_Intel
Moderator
637 Views

Hi,


Could you please give us an update? Is your query clarified?


Thank you.


ejo
Beginner
632 Views

Hi,

Yes, I understand that I cannot automatically cache all the source code that was profiled.

In our continuous integration pipeline (where we profile the code each time a change is pushed) we don't want/can't manually intervene to cache a selection of files as you suggested.

Thank you.

 

VaradJ_Intel
Moderator
535 Views

Hi,

 

I would briefly explain it again.

 

Steps to activate cache source files option:

 

1. When you open VTune, click on Menu. 

2. In Menu, click on Options a window will appear on your screen. 

3. Now in that window click on Source/Assembly.

4. Now check the box in front of cache source files and click on Ok.

 

Menu-> Options-> Source/Assembly-> Cache source files -> Ok.

 

VaradJ_Intel_0-1641558247775.png

 

Once you activate cache source files option, the source code will get cached by default every time you do profiling of your code.

 

Thank you.

 

 

VaradJ_Intel
Moderator
478 Views

Hi, 


Could you please let us know whether your issue is resolved?


Thank You.


VaradJ_Intel
Moderator
442 Views

Hi


 We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thank You.


Reply