Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cptanpanic
Beginner
114 Views

Use VTune to determine optimal function inlining?

I have inherited a project that has speed and size constraints. It currently has I think too many methods inlined, and to make code smaller, I want to only inline functions that actually increase performance. How can I use Vtune to determine this?
Thanks,
Brian
0 Kudos
3 Replies
bnshah
Beginner
114 Views

If you are using a Pentium 4 you should see how efficiently you are using the trace cache. If you have excessive inlining the code will be too big to fit in the trace cache and you will have a lot of misses. I suggest that you use measure the following ratios: TC Delivery Rate and Trace Cache (TC) Miss Performance Impact. This will tell you if you have excess trace cache misses.
cptanpanic
Beginner
114 Views

This is for a Pentium 3.
Daniel_B_Intel2
Employee
114 Views

Hi Brian,

In my mind call graph can help you a lot with this task.
You'll get the # of times the function was called and the numer of functions that called it.
my advice is "more time the function was called from less places(# of callers)" - a good candidate to be inlined.

Some more VTune useful features:
-you can define your own ratios, like "#of calls / # of callers" and you can sort all functions by this new ratio column in call graph view.

-there is possibility to see "call list" by "call sites" e.g. func A calls func B from 5 different code lines inside the func A. you can see this also in VTune.

-Daniel
Reply