Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Hemal_P_
Beginner
96 Views

source code visibility

Jump to solution

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
96 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

10 Replies
David_A_Intel1
Employee
96 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).

Hemal_P_
Beginner
96 Views

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

 

Peter_W_Intel
Employee
96 Views

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

Bernard
Black Belt
96 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.

Peter_W_Intel
Employee
96 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.

Bernard
Black Belt
96 Views

@Peter

Yes of course there is dumpbin.exe.

Hemal_P_
Beginner
96 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?

Peter_W_Intel
Employee
97 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

Bernard
Black Belt
96 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.

David_A_Intel1
Employee
96 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.

Reply