How to measure memory used during program execution under rtems?
joel.sherrill at OARcorp.com
Fri Jun 22 21:51:33 UTC 2012
This is a more complicated question than you think. :)
+ in the tmtests, a bsp provided benchmark timer is used. This is intended to be the most accurate time measure on a board. This device is assumed to conflict with the clock tick source and the tmtests do not do any operations requiring a clock tick. They avoid causing interrupts while timing something.
+ Use any nanosecond time granularity directive. These have the problem that not many bsps have the nanoseconds since last clock tick feature so the times would be very sloppy.
+ Use simulator specific features.
For memory use, you would have to snapshot some stats at the beginning and end of the run. For most purposes, memory not freed is either a bug or global resource. For memory use, I assume you mean heap. For stack usage, there are services.
Xiaochen Pan <panx at seas.upenn.edu> wrote:
>I need to measure the run time memory usage of programs. But I don't know what is the best way to do it? Need help.
>rtems-devel mailing list
>rtems-devel at rtems.org
More information about the devel