I have a project that runs on the .NET Micro Framework (or NETMF) and am looking for a profiler. So far none of the ones I've tried will run on NETMF. Does anyone know of a profiler that will?
-
What is the need? If you want to measure speed, the simple method is timing it. If you want to find the bottlenecks, the simple method is [random-pausing](http://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024). – Mike Dunlavey Jan 30 '11 at 17:18
-
Mike - The need is the same as using a profiler on any .NET code. I understand your alternatives, but working with a profiler is much more convenient and effective. Given that performance is vitally important to embedded programming, I figured someone would have tackled this problem already. – Stefan Moser Jan 31 '11 at 23:01
-
"much more convenient and effective" That's what most people think, especially including profiler builders, but oddly enough there's no [rationale to back it up](http://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343), only people's gut feelings. Anyway, good luck. – Mike Dunlavey Feb 01 '11 at 02:01
1 Answers
A week with no answers.
You have a tough problem, which is getting good measurement data in a very small footprint world.
My company, Semantic Designs provides profilers for a variety of languages including C# in a number of variations.
Our (C#) timing profilers can handle multiple threads of execution but require additional space per function call to track the data. It is unclear if you need this capability, and it is unclear that you have the room to capture it.
Our counting profilers require only enough space for track counts for each basic block (stored in an array) but some additional code space as instrumentation. Typically you need a counter slot for every 4-5 lines of code you have. This is likely your best bet.
You'll likely have to build some custom support machinery; in particular, in small embedded environments, our customers usually have to build a small bit of code that exports the count array content to a disk file. If you can achieve that, you can get profiling data.

- 93,541
- 22
- 172
- 341