Cannot generate hotspots report in source-line level

Cannot generate hotspots report in source-line level

Hi all,I was using vtune to profile my C++ application on Linux. I can only use the command-line interface. I choose hotspots for my analysis but I can only get function level report. I tried to add -group-by source-line in report command but what I got was:Executing actions 75 % Generating a report Source File Source Line Module Source File Path CPU Time--------------------- ----------- ------ ---------------- --------[Unknown source file] [Unknown] test [Unknown] 0.130It seems that there is a lack of source file information. I did use the debug version of the program. Is there any other info I need to provide to vtune? Thanks in advance.Bo

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

You have to use option "/Zi" and "/DEBUG" to build on Windows, use "-g" option on Linux.

I have no problem to use "-group-by source-line": I ran program under directory where it has executable and source
(You may add "-search-dir all:rp=/home/your-exe-path" when data collecting?)

# source /opt/intel/vtune_amplifier_xe_2011/amplxe-vars.sh
Copyright (C) 2009-2012 Intel Corporation. All rights reserved.
Intel VTune Amplifier XE 2011 (build 221625)

# amplxe-cl -collect hotspots -- ./primes.icc
Determining primes from 1 - 100000
Found 9592 primes
Using result path `/home/peter/problem_report/r003hs'
Executing actions 75 % Generating a report
Summary
-------

Elapsed Time: 0.967
CPU Time: 2.370
Executing actions 100 % done

# amplxe-cl -report hotspots -group-by source-line -r r003hs
Using result path `/home/peter/problem_report/r003hs'
Executing actions 75 % Generating a report
Source File Source Line Module Source File Path CPU Time
----------- ----------- ---------- ------------------------------------- --------
primes.cpp 391 primes.icc /home/peter/problem_report/primes.cpp 2.360
primes.cpp 395 primes.icc /home/peter/problem_report/primes.cpp 0.010
Executing actions 100 % done

Hi Peter,Thank you for your reply. Actually I did use -g for compilation. But I realized that there might be problems here because I cannot even look at some of my source files in gdb ( for example, for one particular .h file i cannot see the corresponding .cpp file in gdb). That may cause the problem in vtune.Btw, do I have to use intel compiler? From your example I see that you are using intel compiler right?ThanksBo

Bo,

Thanks for the update, this is NOT the VTune issue.

VTune Amplifier XE doesn't rely on compiler type, that means, the tool supports standard binary/symbolformat - i.e. PE2 , DWARF, etc.

However if you choose Intel compiler - which provides more advanced options to build executable for performance gain.

Regards, Peter

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen