Mark3 Realtime Kernel
profile.h File Reference

High-precision profiling timers Enables the profiling and instrumentation of performance-critical code. Multiple timers can be used simultaneously to enable system-wide performance metrics to be computed in a lightweight manner. More...

#include "kerneltypes.h"
#include "mark3cfg.h"
#include "ll.h"

Go to the source code of this file.

Classes

class  Mark3::ProfileTimer
 Profiling timer. This class is used to perform high-performance profiling of code to see how int32_t certain operations take. useful in instrumenting the performance of key algorithms and time-critical operations to ensure real-timer behavior. More...
 

Namespaces

 Mark3
 

Detailed Description

High-precision profiling timers Enables the profiling and instrumentation of performance-critical code. Multiple timers can be used simultaneously to enable system-wide performance metrics to be computed in a lightweight manner.

Usage:

ProfileTimer clMyTimer;
int i;
clMyTimer.Init();
// Profile the same block of code ten times
for (i = 0; i < 10; i++)
{
clMyTimer.Start();
...
//Block of code to profile
...
clMyTimer.Stop();
}
// Get the average execution time of all iterations
u32AverageTimer = clMyTimer.GetAverage();
// Get the execution time from the last iteration
u32LastTimer = clMyTimer.GetCurrent();

Definition in file profile.h.