Filtering PTU callgraph output

Filtering PTU callgraph output

Portrait de cchopin

. 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_
&n
bsp; 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&n
bsp; [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 . . .

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de cchopin

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.

Portrait de akondrat

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.

Portrait de emadshihab

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

Connectez-vous pour laisser un commentaire.