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

hardware counter information for individual functions via commandline

Prasanna_B_
Beginner
536 Views

Dear Vtune experts,

I am trying to gather hardware counter information for individual functions in a code. While this seems straightforward in GUI, I haven't found a way through command line interface.

In the command line, I tried two reports:
(1)  amplxe-cl -R summary -r r012ge

This gives me hardware counter information (instruction count, cache hit rate) for the entire code, but not for specific functions, which is what I need.

(2) amplxe-cl -R hotspots -r r012ge

This gives me timing information for individual functions, but no hardware counter information.

Thanks

 

0 Kudos
1 Solution
Peter_W_Intel
Employee
536 Views

> In the command line, I tried two reports:

> (1)  amplxe-cl -R summary -r r012ge

> This gives me hardware counter information (instruction count, cache hit rate) for the entire code, but not for specific functions, which is what I need.

Peter: using option "summary" indicates that you want to see overall events counters of general-exploration, no specific data on functiuon

> (2) amplxe-cl -R hotspots -r r012ge

> This gives me timing information for individual functions, but no hardware counter information.

Peter: if you want to see event counters instead of timing info on functions, please use - “amplxe-cl -R hw-events -r r012ge" for displaying event counters on functions.

 

 

View solution in original post

0 Kudos
9 Replies
Bernard
Valued Contributor I
536 Views

I also wanted to ask the same question.

0 Kudos
David_A_Intel1
Employee
536 Views

Hi Prasanna:

Good question!  Please see the "group-by" option in the help information.  For example:

amplxe-cl -R hotspots -r r012ge -group-by=function

 

0 Kudos
Peter_W_Intel
Employee
537 Views

> In the command line, I tried two reports:

> (1)  amplxe-cl -R summary -r r012ge

> This gives me hardware counter information (instruction count, cache hit rate) for the entire code, but not for specific functions, which is what I need.

Peter: using option "summary" indicates that you want to see overall events counters of general-exploration, no specific data on functiuon

> (2) amplxe-cl -R hotspots -r r012ge

> This gives me timing information for individual functions, but no hardware counter information.

Peter: if you want to see event counters instead of timing info on functions, please use - “amplxe-cl -R hw-events -r r012ge" for displaying event counters on functions.

 

 

0 Kudos
Bernard
Valued Contributor I
536 Views

Link to VTune command line inteface support.

http://software.intel.com/en-us/node/496639

0 Kudos
David_A_Intel1
Employee
536 Views

Sorry. :(  Looks like I answered the wrong question.

0 Kudos
1024chickens
Beginner
536 Views

Thanks for the advice, Peter. I tried "amplxe-cl -R hw-events -r r012ge", which displayed the event counters for modules, instead of functions, as shown below. What the Function column shows are not really functions in my application code, but module names. Any ideas?

Thanks.

Yao

Function                            Module                            
----------------------------------  --------------------------------  -------------
[vmlinux]                           vmlinux                                
[sep3_10]                           sep3_10                                  
[libc-2.14.90.so]                   libc-2.14.90.so                          
[micscif]                           micscif                                 
[coi_daemon]                        coi_daemon                                
[libabstract_mic_card.so]           libabstract_mic_card.so                   
[libscif.so.0.0.1]                  libscif.so.0.0.1                         
[dma_module]                        dma_module                              
[ld-2.14.90.so]                     ld-2.14.90.so                           
[ringbuffer]                        ringbuffer                               
[ibp_cm_client]                     ibp_cm_client                         
[ibscif]                            ibscif                                    
[libamplxe_sampling_utils_3.10.so]  libamplxe_sampling_utils_3.10.so          
[libmessage_mic.so]                 libmessage_mic.so                       

 

0 Kudos
Peter_W_Intel
Employee
536 Views

> What the Function column shows are not really functions in my application code, but module names

The reason was that hot samples can not be relocated on functions which are in Linux kernel modules, due to lack of debug info. See this article.

0 Kudos
1024chickens
Beginner
536 Views

Hi Peter,

The functions I'm interested in are the ones in my application code, not the ones in vmlinux or libc. Would the solution in that article allow me to see information for the functions in my application code?

Thanks,

Yao

0 Kudos
Peter_W_Intel
Employee
536 Views

Absolutely "Yes", however it cannot see your functions (even your module name) displayed in top list, maybe your application consumed CPU low?

0 Kudos
Reply