Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

source code visibility

Hemal_P_
Beginner
986 Views

I am using Vtune Amplifier XE2013....

I tried advanced hotspots analysis and when i double click on the hotspot ,it is showing only assembly code.

It should also show source code.

0 Kudos
1 Solution
Peter_W_Intel
Employee
986 Views

Hemal P.

It is a short run program, print function is major work in stdio library - without source code. It means there was no hot in your source code even your code called library. You may try to add more workload in your source, for example, put a loop to do "printf". Then you will see source view of VTune, if you built with debug info to generate pdb file. 

View solution in original post

0 Kudos
10 Replies
David_A_Intel1
Employee
986 Views

Only if you've compiled and linked with debug info.  AND, if you are on linux, make sure you don't "strip" the binary.  Use the 'file' command to verify that it is not stripped (it will say it is stripped).

0 Kudos
Hemal_P_
Beginner
986 Views

I am using it on windows 8 with visual studio 2013...

 

0 Kudos
Peter_W_Intel
Employee
987 Views

Please check if you used compiler option "/Zi" and linker option "/DEBUG" to generate PDB file.

0 Kudos
Bernard
Valued Contributor I
987 Views

As you are on Windows you can run your program under windbg and check if debugger is able to display source code.

You can use also SymChk.exe in order to check debug symbols.

0 Kudos
Peter_W_Intel
Employee
982 Views

@ iliyapolak

Many years ago, I used dumpbin.exe which came from Microsoft* C/C++ compiler. Fortunately, it still exist in Visual Studio 2012 I checked.

This utility can check symbols from executable/pdb files.

0 Kudos
Bernard
Valued Contributor I
987 Views

@Peter

Yes of course there is dumpbin.exe.

0 Kudos
Hemal_P_
Beginner
987 Views
#include<stdio.h>
main()
{
printf("Hello World!!!");
return 0;
}

this is my source code,and when I run it in VTune it is showing only assembly code.

I am in doubt which kind of application it supports?

0 Kudos
Peter_W_Intel
Employee
987 Views

Hemal P.

It is a short run program, print function is major work in stdio library - without source code. It means there was no hot in your source code even your code called library. You may try to add more workload in your source, for example, put a loop to do "printf". Then you will see source view of VTune, if you built with debug info to generate pdb file. 

0 Kudos
Bernard
Valued Contributor I
987 Views

>>>It is a short run program, print function is major work in stdio library >>>

Actually more work is done by OS implementation going all the way down to display driver. In such a case VTune can possibly display callees of printf. I hope so.

0 Kudos
David_A_Intel1
Employee
987 Views

Best thing to do is use one of the sample apps included with the VTune Amplifier XE product, e.g., tachyon, matrix, etc.

Also, you mentioned Windows* 8.  Make sure you review the Release Notes on limitations for Windows 8.  You can't use certain sampling modes.  For example, RN says:

  1. VTune Amplifier XE supports analysis of Windows Store applications on Microsoft Windows 
    8* via the Attach to Process or Profile System modes. Launch Application mode is not 
    supported. Supported analysis types are Basic Hotspots and hardware event-based sampling 
    analysis, including stack collection. Concurrency and Locks and Waits analysis types are not 
    supported.

0 Kudos
Reply