C# App Profiling

G

Guest

I'm posting this here and on the VS Forum (C#) and on XP Embedded ng

I have an XPe system that runs a .NET (C#) app that works with external hw
via USB ports. The app consists of a number of C# DLLs plus wrappers around
the hw dll APIs (ie platform invoke.

On a 1 Gig system the system maxes out at 100% CPU usage.
On a 1.9 Duo system it runs at about 33% (total) CPU usage.

The code written by someone else needs some profiling etc.
I suspect there are some busy waits that are polling for events rather than
the sw being event driven. I am about to try to improve the app.

Q What tools should I use to profile the app. Any whitepapers or other
references?

--
David Jones
Software Developer
(Embeddded Systems)
Victorian Partnership of Advanced Computing
Melbourne, Victoria Australia
 
J

Jon Harrop

David Jones vpac org> said:
Q What tools should I use to profile the app. Any whitepapers or other
references?

The profiler in Visual Studio Team Edition is good. It is not in Pro
edition.

Red Gate software kindly gave me a trial copy of their ANTS Profiler. I
discovered that it does not support ILX and just crashed on all but the
most trivial of F# programs as a consequence. Hopefully they'll fix it soon
because it looked like a really nice program.
 
B

bob

Hi,
Red Ant has already been suggested, you may want to try JetBrains
Profiler also.
Bob
 
R

Rad [Visual C# MVP]

Hi,
Red Ant has already been suggested, you may want to try JetBrains
Profiler also.
Bob

The JetBrains profiler, DotTrace,is actually pretty good ...
 
R

Rad [Visual C# MVP]

Does it support ILX, i.e. other .NET languages?

Indeed. Profilers don't deal with the program source code itself, but
rather with the compiled executable or class library.

Thus it does not matter what .NET language the application was written
with.

Although having said that having the source code is always good
because you can better analyze the profiler results and establish
problematic code or methods.

I wrote a short tutorial you can take a look at:

http://thinkersroom.com/bytes/2007/10/01/profiling-net-applications-i/
 
J

Jon Harrop

Rad said:
Indeed. Profilers don't deal with the program source code itself, but
rather with the compiled executable or class library.

Thus it does not matter what .NET language the application was written
with.

That is not true of the ANTS profiler by RedGate software, which breaks on
the tail calls (ILX) generated by the F# compiler. I'd like to know if the
same is true of the profiler you cited.
 
R

Rad [Visual C# MVP]

That is not true of the ANTS profiler by RedGate software, which breaks on
the tail calls (ILX) generated by the F# compiler. I'd like to know if the
same is true of the profiler you cited.

Really? Wow. I didn't know that.
Hmm.

Let me investigate DotTrace and see whether it trips up as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top