Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

Filtering PTU callgraph output

Last post 07-14-2008, 8:15 AM by emadshihab. 3 replies.
Sort Posts: Previous Next
 04-28-2008, 10:45 AM 30253655  

Filtering PTU callgraph output

. Does either of you know off the top of  your head whether or not there's a command line option that will filter a callgraph based on a %limit relative to the %called for the symbol in question?

For example,  given the following (unfiltered) output

           48501      0          39.81  0.00      [2] main              
[5]        48501      0          39.81  0.00   [5] ABCmain(int, char **)
           1          0          0.00   0.00      [110] defM_LicenseFactory::make(void)          
           48499      0          39.81  0.00      [7] def_main(void)    
           1          0          0.00   0.00      [111] utl_FilePath::utl_FilePath(cow_String, cow_String)                
----------------------------------------
           48499      0          39.81  0.00      [7] def_main(void)    
[6]        48499      0          39.81  0.00   [6] def_                 
           147        0          0.12   0.00      [112] mat1_           
           75         0          0.06   0.00      [100] bulk_           
           3          0          0.00   0.00      [113] comm_           
           41         0          0.03   0.00      [114] elem_           
           1901       0          1.56   0.00      [71] def_stepdata_    
           1          0          0.00   0.00      [115] node_           
           13         0          0.01   0.00      [116] btest1_         
           406        0          0.33   0.00      [117] def_endsimaccess_                        
           13         0          0.01   0.00      [118] matref_         
           7          0          0.01   0.00      [119] ghi_writesim_   
           1          0          0.00   0.00      [120] ghi_xit_        
           45887      0          37.67  0.00      [8] qtrk_flatten_     
           4          0          0.00   0.00      [121] qtrm_solverpartinfo_  

I'd like the following filtered output, where every reference that's less than, say, 5% of the total time for the reference routine ([5] or [6] in this case) is removed, so what I'm really looking at are the significant paths of interest through the call-graph.
----------------------------------------
           48501      0          39.81  0.00      [2] main              
[5]        48501      0          39.81  0.00   [5] ABCmain(int, char **)
           48499      0          39.81  0.00      [7] def_main(void)    
----------------------------------------
           48499      0          39.81  0.00      [7] def_main(void)    
[6]        48499      0          39.81  0.00   [6] def_                 
           1901       0          1.56   0.00      [71] def_stepdata_    
           45887      0          37.67  0.00      [8] qtrk_flatten_     
----------------------------------------


Short of the obvious answer of writing a perl script to filter the output myself, maybe someone has already decided that this is a useful concept?  I've found that such filtering (manually at this point) makes the otherwise unwieldy output much easier to present to recalcitrant developers (and slow managers) when explaining where their code is slow . . .
 
 05-12-2008, 11:04 AM 30254641 in reply to 30253655  

Re: Filtering PTU callgraph output

In case anyone cares, I wrote the perl script, and it was well worth it. It makes generating a "useful" callgraph painfully easy so that even the managerial types can understand it.
 
 05-15-2008, 12:25 AM 30254869 in reply to 30254641  

Re: Filtering PTU callgraph output

Hello. Thank you for your feedback.
The filtering you requested could be useful, so I will fill an imrpovement request for it.
Something like, a switch which enables 5% threshold for callers/calees.

 
 07-14-2008, 8:15 AM 30259061 in reply to 30254641  

Re: Filtering PTU callgraph output

Hi cchopin,

I am really interested in this, cause I was looking for something similar to this. Can you send me the perl script, if possible. Also, how did you figure how how to understand/interpret the output? I find that some things are quite straight forward (like how to find out what funcs were called etc...), but things like what the numbers in the square brackets '[]' mean and some other numbers that are in the column I did not understand how they relate to eachoter. Any explanation or if you can point me to a document, I would greatly appreciate it.

thanks,

Emad
 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...