11#define PROFILE_FIELDS_STRUCT( field ) int32_t field;
13struct DSEKAI_PROFILE {
14PROFILE_FIELDS( PROFILE_FIELDS_STRUCT );
17static struct DSEKAI_PROFILE profile;
18static int32_t profile_diff = 0;
20# define profiler_init() memory_zero_ptr( &profile, sizeof( struct DSEKAI_PROFILE ) )
21# define profiler_set() profile_diff = graphics_get_ms(); if( 0 > profile_diff ) { error_printf( "error setting profiler!" ); }
22# define profiler_incr( field ) if( 0 <= profile_diff ) { profile.field += (graphics_get_ms() - profile_diff); }
24#define PROFILE_FIELDS_PRINTF( field ) debug_printf( 3, #field ": %d", profile.field );
26# define profiler_print( profiler_module ) debug_printf( 3, "=== " profiler_module " PROFILER RESULTS ===" ); PROFILE_FIELDS( PROFILE_FIELDS_PRINTF ); debug_printf( 3, "=== END " profiler_module " PROFILER RESULTS ===" );
30# define profiler_print( profiler_module )
31# define profiler_init()
32# define profiler_set()
33# define profiler_incr( field )