--- hatari/src/debug/profile_priv.h 2019/04/09 08:53:04 1.1 +++ hatari/src/debug/profile_priv.h 2019/04/09 08:54:21 1.1.1.2 @@ -8,18 +8,14 @@ #ifndef HATARI_PROFILE_PRIV_H #define HATARI_PROFILE_PRIV_H -/* caller types */ -#define CALL_UNDEFINED 0 /* = call type information not supported */ -typedef enum { - CALL_UNKNOWN = 1, - CALL_NEXT = 2, - CALL_BRANCH = 4, - CALL_SUBROUTINE = 8, - CALL_SUBRETURN = 16, - CALL_EXCEPTION = 32, - CALL_EXCRETURN = 64, - CALL_INTERRUPT = 128 -} calltype_t; +typedef struct { + char *filename; /* where to write loop info */ + FILE *fp; /* pointer modified by CPU & DSP code */ + Uint32 cpu_limit; /* max limit for profiled CPU loop size */ + Uint32 dsp_limit; /* max limit for profiled DSP loop size */ +} profile_loop_t; + +extern profile_loop_t profile_loop; typedef struct { Uint64 calls, count, cycles, misses; @@ -79,6 +75,7 @@ extern void Profile_FinalizeCalls(callin extern Uint32 Profile_CallEnd(callinfo_t *callinfo, counters_t *totalcost); extern int Profile_AllocCallinfo(callinfo_t *callinfo, int count, const char *info); extern void Profile_FreeCallinfo(callinfo_t *callinfo); +extern bool Profile_LoopReset(void); /* parser helpers */ extern void Profile_CpuGetPointers(bool **enabled, Uint32 **disasm_addr);