Very Slow Capture on large Managed C++ project

Code and memory profiling for .NET developers.

Moderators: Brian Donahue, richardjm, StephenC

Very Slow Capture on large Managed C++ project

Postby shopsinc » Thu Feb 26, 2009 5:55 pm

I am using Ants v4 to profile an app that makes calls into a very large managed c++ project.

There is a particular method I'm calling that exercises quite a bit of this code. The first time I call this method it is taking roughly 40 minutes to profile (this method takes about 10 seconds to run when outside of the profiler). The second time I call the method it is only taking roughly a minute to profile.

When I initially ran these tests with the profiler it said that virtually all of the time was being taken in JIT Overhead.

This makes sense as there is a lot of code to JIT. However, I've compiled the bytecode with ngen (with profiler scenario turned on) and it still takes just as long. But the method that now takes all of the time is <Module>._initterm_m(void**()* pfbegin, void* *()* pfend).

Do you have any tips on how I can speed this up? Or possibly start profiling after this initial load? It's almost impossible to use the profiler in this situation...
shopsinc
 
Posts: 2
Joined: Thu Feb 26, 2009 5:45 pm

Postby StephenC » Thu Feb 26, 2009 7:26 pm

Hi,

You can change the level of profiling in the opening dialog to reduce overhead - line level which is the default can also be the most expensive although the case you describe is extreme by the sounds of it.

Switch to the 'Method Level Timing; only methods with source' profiling mode and it should improve.

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby shopsinc » Thu Feb 26, 2009 8:04 pm

I have tried that and it makes very little difference. I've just installed an old ants v3 build and tried using that. When I disable profiling the first time I call the method, then enable it the second time, everything works fine and it takes about 30 seconds....
shopsinc
 
Posts: 2
Joined: Thu Feb 26, 2009 5:45 pm

Postby StephenC » Thu Feb 26, 2009 8:49 pm

That's a bit strange then.

I'll check with the developer tomorrow for possible explanations for this and get back to you.

Cheers,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge

Postby StephenC » Fri Feb 27, 2009 3:00 pm

Hi,

could you try one thing for me - delete all the PDB files of anything which you are not interested in seeing the source code for and then trying to line-level profile again.

Thanks,

Stephen
StephenC
 
Posts: 306
Joined: Mon Oct 15, 2007 9:18 am
Location: Cambridge


Return to ANTS Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest