1 /* 2 * Hatari - profile.h 3 * 4 * This file is distributed under the GNU General Public License, version 2 5 * or at your option any later version. Read the file gpl.txt for details. 6 */ 7 8 #ifndef HATARI_PROFILE_H 9 #define HATARI_PROFILE_H 10 11 /* caller types */ 12 #define CALL_UNDEFINED 0 /* = call type information not supported */ 13 typedef enum { 14 CALL_UNKNOWN = 1, 15 CALL_NEXT = 2, 16 CALL_BRANCH = 4, 17 CALL_SUBROUTINE = 8, 18 CALL_SUBRETURN = 16, 19 CALL_EXCEPTION = 32, 20 CALL_EXCRETURN = 64, 21 CALL_INTERRUPT = 128 22 } calltype_t; 23 24 /* profile command parsing */ 25 extern const char Profile_Description[]; 26 extern char *Profile_Match(const char *text, int state); 27 extern int Profile_Command(int nArgc, char *psArgs[], bool bForDsp); 28 29 /* CPU profile control */ 30 extern bool Profile_CpuStart(void); 31 extern void Profile_CpuUpdate(void); 32 extern void Profile_CpuStop(void); 33 34 /* CPU profile results */ 35 extern bool Profile_CpuAddressDataStr(char *buffer, size_t maxlen, Uint32 addr); 36 37 /* DSP profile control */ 38 extern bool Profile_DspStart(void); 39 extern void Profile_DspUpdate(void); 40 extern void Profile_DspStop(void); 41 42 /* DSP profile results */ 43 extern bool Profile_DspAddressData(Uint16 addr, float *percentage, Uint64 *count, Uint64 *cycles, Uint16 *cycle_diff); 44 45 #endif 46