Howto monitor object creations

Memory profiling for .NET developers

Moderators: StephenC, Alex.Davies, AndrewH, melvyn.harbour

Howto monitor object creations

Postby jaap.q42 » Mon Dec 21, 2009 7:02 pm

I'm using the memoryprofiler to track down memleaks we've been experiencing. I've pinpointed the type of object that is being held into memory.
We're using Lucene which does a lot of internal caching.

Can I use Memory profiler to see at what time an object is created?

I know the CLR Profiler claims to be able to provide this info:
"Which methods allocate which types of objects?"

But I can't get the CLR profiler to work, and there's no chance of any support on that tool.

Hope someone can help me!

Jaap Taal
jaap.q42
 
Posts: 26
Joined: Thu Dec 17, 2009 3:21 pm

Postby Chris.Allen » Tue Dec 22, 2009 9:10 pm

Hi Jaap,

the simple answer is "no" (sorry) but I think you can set Visual Studio to break on the constructor of this object (using "break on function" feature)?
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby jaap.q42 » Tue Dec 22, 2009 11:43 pm

Hi Chris,

I'm using Visual Web Developer 2008. I couldn't find how to run a debugger and the memory profiler at the same time. Do you know whether it's possible?

Also, you may sometimes want to profile a class which in located in de System namespace. How would you set trigger a break point then?


"Off topic":

So maybe a new feature in ANTS Memory Profiler 6 could be that you can navigate from an instance in the instance list back to the reference graph, filtering just 1 object.
From my point of view this should be possible since the Profiler already filters objects, why not allow a single-object filter which can be activated from the instance list!

Anyway, I might be saying something that's technically not possible, or maybe nobody else is interested in such a feature...

Jaap
jaap.q42
 
Posts: 26
Joined: Thu Dec 17, 2009 3:21 pm

Re:

Postby Chris.Allen » Mon Jan 04, 2010 3:14 pm

jaap.q42 wrote:Hi Chris,

I'm using Visual Web Developer 2008. I couldn't find how to run a debugger and the memory profiler at the same time. Do you know whether it's possible?

Also, you may sometimes want to profile a class which in located in de System namespace. How would you set trigger a break point then?

Jaap


Sure- I would use WinDbg and attach it to your process (run under ANTS). But I don't think there is any necessity to run them simulatneously. Profiling and debugging can always be successfully done serially I would say.

To access System code, you may wish to check out Reflector PRO:


Download here:
http://downloads.red-gate.com/EAP/Refle ... Deploy.zip



:)

jaap.q42 wrote:"Off topic":

So maybe a new feature in ANTS Memory Profiler 6 could be that you can navigate from an instance in the instance list back to the reference graph, filtering just 1 object.
From my point of view this should be possible since the Profiler already filters objects, why not allow a single-object filter which can be activated from the instance list!

Jaap


I'm sorry- I don't understand this feature :(
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Memory Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests