Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mfcking
Beginner
84 Views

Is the clock ticks of sub function always counted in as part of its parent function?

Hello,
Supposefunction A called its child functions A1, A2 and A3 respectively, and VTune reports the clock ticks for A, A1, A2 and A3. Is the clock ticks of those sub functions always counted in as part of its parent function?
Thanks,
L.Y.
0 Kudos
3 Replies
David_A_Intel1
Employee
84 Views

Good question, L.Y.!

If you are talking about sampling data, and not callgraph data, then, no, the clockticks of subfunctions are not included in the calling function. Sampling has no concept of caller/callee functions, that is, it has no information about what function called which other function(s).

Sampling simply associates instruction addresses where events occurred, and aggregates them at the function, module, and process level.

Callgraph, on the other hand, does understand calling relationships and displays both accumulated and non-accumulated numbers. A function's Self-time is the amount of time spent just inside the function's code. While the function's Total Time is the function's Self-time plus all called function's Self-time, including functions called by those functions, down to the last level.

For example, if function A() called A1(), A2(), and A3(), then A()'s Total Time includes the Total Times (of Self-time, in this case) of A1(), A2(), A3() and A()'s Self-time. Then, if B() called A(), B()'s Total Timewould include B()'s Self-time plus A()'s Total Time.

Hope that helps.

mfcking
Beginner
84 Views

Hi Dave,

Thanks a lot for your precise answer. It is clearto me now.

L.Y.

84 Views

Great discussion, guys!

Cheers,

jdg

Reply