Fog Creek Software
Discussion Board




C# Code Profiler?


My app's got a memory leak "somewhere." Before I dig through 27,000 lines of code looking for it, does anyone know of a tool that will help with looking? I've tried FxCop, and it gives some good info, but I don't think it's showing what I need.

AutomatedQA's profiler looks interesting, but I dont' think they've fiinished it yet - I get all kinds of UI problems (tab strip locks up, freezing, etc). Definitely not worth $600.

Ants seems to do less than a good trace file, too.

Any other suggestions?

Philo

Philo
Saturday, July 05, 2003

I haven't tried it with .NET but you might try BoundsChecker at http://www.compuware.com/products/devpartner/bounds.htm ... it has a 14-day evaluation.

Christopher Wells
Saturday, July 05, 2003

Looks like BoundsChecker is just for C++. DevPartner looks good, but it's ***$1500*** - that's more than MSDN Universal!!!

Philo

Philo
Saturday, July 05, 2003

Memory leak?  I thought C# had garbage collection.

I don't know if this is possible in C#, but the no-tools-required solution in C/C++ would be to wrap your allocator and deallocator and print out the file and line of the calling function every time you allocate.

Then run the program and reproduce the memory leak.  And then go through match them by hand or with some sort of text script.

Andy
Saturday, July 05, 2003

Actually let me clarify - it's an ASP.Net web application; the code behind language is C#. Ran out of memory on a 1GB machine yesterday; the ASP.Net process was at 500MB.

Philo

Philo
Saturday, July 05, 2003

Hey Andy, technically they're called loitering objects, but might as well call them memory leaks.

This might be what you're looking for, Philo:
http://www.scitech.se/memprofiler/
I know diddly about C#, but i once solved someone's Java memleak in 10 min tops using JProbe memory debugger, and this looks like it has all the needed features.

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=c%23+memory+profiler&btnG=Google+Search
may help too.

sammy
Saturday, July 05, 2003

Try the Borland Optimizeit Profiler. I've only seen it demoed (I've yet to use the trial myself), but this seems to be exactly what you need. The demo I watched was quite nice.

Marc
Sunday, July 06, 2003

Would this help?- http://www.red-gate.com/advanced_dotnet_testing_system.htm

Ben
Sunday, July 06, 2003

Borland OptimizeIt is a bad product.
Actually it is written in Java, even its version for C#...

Boris Yankov
Tuesday, July 08, 2003

Is it bad because it is written in Java?

I'm currious why you don't like it. It looks quite nice from what I saw.

Marc
Wednesday, July 09, 2003

*  Recent Topics

*  Fog Creek Home