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

Command line reports matching gui

kendall_f_
Beginner
416 Views

Hi Intel experts,

I'm currently running a custom advanced hotspots analysis using the amplxe-cl -collect command. The analysis is created by copying Advanced Hotspots analysis and scrolling to the bottom to check the box "Analyze the energy taken by processor cores..."

I run the command: 

amplxe-cl -collect advanced-hotspots-0 -r report -- ./run.sh

In the GUI there are two reports I'm interested in: Hotspots viewpoint (chosen from dropdown) Top-down (chosen from the tab), and Hardware Event Count viewpoint (dropdown) Top-down (tab). I've tried all of the report types listed in the documentation from the command line but none of them give me the same information as I get in the GUI. With call stack mode I can get the fields (see command below), but this is not the top-down table in the GUI. Gprof-cc also gets me timing information that is close to the effective time in the hotspots top-down, but it's not exactly the same. 

amplxe-cl -report hw-events -r report -format csv -csv-delimiter comma -call-stack-mode all -report-output ./report.csv

For right now I've been using the GUI, expanding all rows, and exporting to CSV, but it is very time consuming (the tool keeps crashing and takes ~10 minutes to load each report). Is there a way to get these two reports via command line?

Thanks!

0 Kudos
3 Replies
Peter_W_Intel
Employee
416 Views

1. If you copied/modified advanced-hotspots analysis to run analysis on GUI, you can use both "amplxe-cl -report hotspots..." & "amplxe-cl -report hw-events ..." to display your result in command line. 

2. If I use "amplxe-cl -collect advanced-hotspots-0 -d 10 ..." - I can get same results of 1)

3. Sometime we can use command line to run customized event-based sampling collection, please refer to this article.  Like -

amplxe-cl -collect-with runsa -knob event-config=CPU_CLK_UNHALTED.CORE,CPU_CLK_UNHALTED.REF,INST_RETIRED.ANY -- C:\test\sample.exe

I still can see hot functions in command line.

What your expectation in result from command line? Can you please attach your result? Screen-shot on GUI to be expected in command line?
 

Do you use latest VTune Amplifer XE 2015 U4?

0 Kudos
kendall_f_
Beginner
416 Views

These are the commands I used on the command line:

amplxe-cl -report hw-events -r . -format csv -csv-delimiter comma -call-stack-mode all -report-output=hwevents.csv

amplxe-cl -report hotspots -r . -format csv -csv-delimiter comma -call-stack-mode all -report-output=hotspots.csv

 

So the hw-events report from the command line corresponds to the data in the PMU Events tab (Hardware Event Counts viewpoint) in the GUI, and the hotspots report from the command line corresponds to the data in Bottom-up tab (Hotspots viewpoint) in the GUI. I need the Top-down Tree tab report for both viewpoints.

 

The results are attached in the Excel spreadsheet with the following sheet names (I've deleted the noise - the remaining are the functions I'm interested in):

hwevents = hw-events command line report

GUI hwevents topdown = Hardware Event Counts viewpoint, Top-down Tree tab

hotspots = hotspots command line

GUI hotspots topdown= Hotspots viewpoint, Top-down Tree tab

0 Kudos
Peter_W_Intel
Employee
416 Views

I guess that you need call stack info, see my example -

C:\temp>amplxe-cl -c advanced-hotspots -knob collection-detail=stack-sampling -d 10 -- cache_test.exe

C:\temp>amplxe-cl -R hotspots
amplxe: Using result path `C:\temp\r005ah'
amplxe: Executing actions 50 % Generating a report                             F
unction         Module          CPU Time  Spin Time  Overhead Time
---------------  --------------  --------  ---------  -------------
cache_test303_1  cache_test.exe    9.485s         0s             0s
func@0x78ed0b66  ntdll.dll         0.001s         0s             0s
amplxe: Executing actions 100 % done

C:\temp>amplxe-cl -R hw-events
amplxe: Using result path `C:\temp\r005ah'
amplxe: Executing actions 50 % Generating a report                             F
unction                    Module          Hardware Event Count:INST_RETIRED.ANY
  Hardware Event Count:CPU_CLK_UNHALTED.THREAD  Hardware Event Count:CPU_CLK_UNH
ALTED.REF_TSC
--------------------------  --------------  ------------------------------------
-  --------------------------------------------  -------------------------------
--------------
cache_test303_1             cache_test.exe                         31,402,550,30
5                                26,624,294,247
23,658,127,275
func@0x78ed0b66             ntdll.dll                                     997,24
9                                     1,601,196
     1,905,250

C:\temp>amplxe-cl -R top-down
amplxe: Using result path `C:\temp\r005ah'
amplxe: Executing actions 50 % Generating a report
unction Stack              Module          CPU Time:Total  CPU Time:Self
--------------------------  --------------  --------------  -------------
Total                       [Unknown]             100.000%             0s
 RtlUserThreadStart         ntdll.dll              99.984%             0s
  BaseThreadInitThunk       kernel32.dll           99.984%             0s
   _tmainCRTStartup         cache_test.exe         99.984%             0s
    main                    cache_test.exe         99.984%             0s
     cache_test303_1        cache_test.exe         99.984%         9.484s
 LdrInitializeThunk         ntdll.dll               0.008%             0s
  func@0x78eea9ed           ntdll.dll               0.008%             0s

C:\temp>amplxe-cl -R callstacks
amplxe: Using result path `C:\temp\r005ah'
amplxe: Executing actions 50 % Generating a report                             F
unction         Function Stack            Module          CPU Time
---------------  ------------------------  --------------  --------
cache_test303_1                            cache_test.exe    9.485s
                 main                      cache_test.exe    9.484s
                 _tmainCRTStartup          cache_test.exe        0s
                 BaseThreadInitThunk       kernel32.dll          0s
                 RtlUserThreadStart        ntdll.dll             0s

                 [Unknown stack frame(s)]                    0.001s

func@0x78ed0b66                            ntdll.dll         0.001s
                 func@0x78e75e2b           ntdll.dll         0.001s

 

What kind of report type do you like it?

0 Kudos
Reply