View Full Version : Application Profiling


David Jones vpac org>
10-13-2007, 03:25 PM
I'm posting this here and on the VS Forum.

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?

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

Sean Liming \(MVP\)
10-13-2007, 06:11 PM
You should also post this to the C# newsgroup.

--
Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
"David Jones vpac org>" <davidj <ATDOT> wrote in message
news:526908D7-EFD8-4026-B1DB-E2830C367407@microsoft.com...
> I'm posting this here and on the VS Forum.
>
> 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?
>
> Thx
> --
> David Jones
> Software Developer
> (Embeddded Systems)
> Victorian Partnership of Advanced Computing
> Melbourne, Victoria Australia

David Jones vpac org>
10-14-2007, 03:04 AM
I posted it on C# forum on forums.microsoft.com
Thx
--
David Jones
Software Developer
(Embeddded Systems)
Victorian Partnership of Advanced Computing
Melbourne, Victoria Australia


"Sean Liming (MVP)" wrote:

>
> You should also post this to the C# newsgroup.
>
> --
> Regards,
>
> Sean Liming
> www.sjjmicro.com / www.seanliming.com
> Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
> "David Jones vpac org>" <davidj <ATDOT> wrote in message
> news:526908D7-EFD8-4026-B1DB-E2830C367407@microsoft.com...
> > I'm posting this here and on the VS Forum.
> >
> > 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?
> >
> > Thx
> > --
> > David Jones
> > Software Developer
> > (Embeddded Systems)
> > Victorian Partnership of Advanced Computing
> > Melbourne, Victoria Australia
>
>

David Jones vpac org>
10-14-2007, 03:10 AM
I've also posted it to the C# ng
--
David Jones
Software Developer
(Embeddded Systems)
Victorian Partnership of Advanced Computing
Melbourne, Victoria Australia


"Sean Liming (MVP)" wrote:

>
> You should also post this to the C# newsgroup.
>
> --
> Regards,
>
> Sean Liming
> www.sjjmicro.com / www.seanliming.com
> Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
> "David Jones vpac org>" <davidj <ATDOT> wrote in message
> news:526908D7-EFD8-4026-B1DB-E2830C367407@microsoft.com...
> > I'm posting this here and on the VS Forum.
> >
> > 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?
> >
> > Thx
> > --
> > David Jones
> > Software Developer
> > (Embeddded Systems)
> > Victorian Partnership of Advanced Computing
> > Melbourne, Victoria Australia
>
>

David Jones vpac org>
10-16-2007, 04:23 AM
I found some open source C# profiling links at:
http://csharp-source.net/open-source/profilers

Haven't tried them yet

There are also the XP performance monitoring tools that I could use.

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


"David Jones" wrote:

> I've also posted it to the C# ng
> --
> David Jones
> Software Developer
> (Embeddded Systems)
> Victorian Partnership of Advanced Computing
> Melbourne, Victoria Australia
>
>
> "Sean Liming (MVP)" wrote:
>
> >
> > You should also post this to the C# newsgroup.
> >
> > --
> > Regards,
> >
> > Sean Liming
> > www.sjjmicro.com / www.seanliming.com
> > Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
> > "David Jones vpac org>" <davidj <ATDOT> wrote in message
> > news:526908D7-EFD8-4026-B1DB-E2830C367407@microsoft.com...
> > > I'm posting this here and on the VS Forum.
> > >
> > > 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?
> > >
> > > Thx
> > > --
> > > David Jones
> > > Software Developer
> > > (Embeddded Systems)
> > > Victorian Partnership of Advanced Computing
> > > Melbourne, Victoria Australia
> >
> >