Does anyone know of a profiler that works with .NET 4 (beta 2)? I normally use the EQATEC profiler but it doesn't seem to be working with .NET 4 executables.
A:
VS2010 Ultimate edition comes with a profiler. It is placed in the Analyze menu. I haven't used it for anything serious yet, but it appears to be an updated version of the one that comes with the TF editions of VS2008/2005.
Brian Rasmussen
2009-11-04 14:34:41
+1
A:
For what it's worth, I've found plenty of performance problems in our .NET app, using the non-profiler.
Mike Dunlavey
2009-11-05 23:45:28
That's a good idea, I'll look into it but I'm not sure if it can help my specific problem - I've got a hobbyist compiler of my own and I'd like to measure the performance characteristics of the compiled .NET executables generated by the compiler.
DrJokepu
2009-11-06 00:23:51
@DrJokepu: That sounds like a really fun project. I've done a few compilers, but never one I would call "serious". For basic testing, I would compare the generated code to another compiler. I suppose you want to get into the whole realm of optimization. My personal view is the whole subject of compiler optimization is way over-emphasized, but people can certainly differ on that point. Good luck.
Mike Dunlavey
2009-11-06 01:15:14
Thanks for your advices. Unfortunately, it's not very easy to get the generated MSIL due to the compiler being a JIT compiler - the compiled code is never written to the disk. While I agree that compiler optimization is over-emphasized (especially in .NET), for a program compiled with my compiler it takes almost a second on a modern computer to calculate the factorial of 20 so there's clearly something wrong and I was hoping that a profiler could help me find the source of the problem.
DrJokepu
2009-11-08 18:47:47
@DrJokepu: Hmmm... I assume you're doing 20! in double precision, because it's about 2.4e18 and requires about 15 digits of precision. In any case, here's what I would do since it's such a simple program. Just set a breakpoint at the start of it, and step through it at the disassembly level, stepping into functions, not over them. What it should do is a series of floating point multiplies, plus whatever control structure you're using for looping or recursion, which shouldn't be much. If it's doing anything *else* you'll see it. But you probably thought of that.
Mike Dunlavey
2009-11-08 23:08:42
... If that's too much work, I would wrap a loop around it to do it lots of times. Then while it was running I would pause it. If it's 100 times slower than it should be, you will see the problem with 99% probability on each pause. It has to be possible to do that.
Mike Dunlavey
2009-11-08 23:11:31
+2
A:
EQATEC Profiler v3.0 has just been released today and it now supports .NET 4.0.
You can get it here: http://www.eqatec.com/tools/profiler
Richard Flamsholt
2009-11-11 16:12:09