profiling c++ templates

Started by
6 comments, last by Jan Wassenberg 18 years, 7 months ago
Hi all. I've been playing arround with the DevPartner profiler to profile some code and i can't seem to make it work with class templates. I'm using Visual C++ .Net and the profiler just skips the class templates, not showing any information about it whatsoever. Other functions and normal classes (.h and .cpp) appear. I guess the problem lies in the fact that i have the class templates programmed in .h files and the compiler (i think) just inlines this and skips any calls to any such funcions/methods. Is there some way arround this? I mean... there must be a way to profile class templates, right? Note: I've been using DevPartner instead of VTune because it's free! Does VTune handles this better? Thxs in advance.
Advertisement
I can't say for certain, but you might want to try disabling inlining. You can find that under the project options, C/C++ options, optimizations.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Thxs for the suggestion Extrarius, but it didn't work..
I've added /Ob0 to the compiler options (which disables inline expansion) and i have the same result :(
I know the AMD codeanalyser takes care of templates.
I love me and you love you.
Does the AMD profiler works on pentium processors? If it does and i cant solve the problem, maybe i'll take a look at it :)
I honestly couldn't tell you, but it'd be worth a try, since they are both x86 architectures.
I love me and you love you.
I guess i'll try that... Last night i tried to profile in Visual Studio 6.0 (the profiler that camed with the compiler), and the templated functions/classes appeared with no problems. My guess is that the DevPartner partner profiler can't handle those things (and if it can, i don't know how).

thxs to both of you.
Quote:I honestly couldn't tell you, but it'd be worth a try, since they are both x86 architectures.

VTune 7 doesn't work on AMD because Intel has again built in a totally unnecessary "G-check". Grrr
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3

This topic is closed to new replies.

Advertisement