1 #ifndef PROFILER_H
2 #define PROFILER_H
3 
4 /* profiling */
5 enum {
6 	PROFILER_END = -1,
7 	PROFILER_CPU1 = 0,
8 	PROFILER_CPU2,
9 	PROFILER_CPU3,
10 	PROFILER_CPU4,
11 	PROFILER_CPU5,
12 	PROFILER_CPU6,
13 	PROFILER_CPU7,
14 	PROFILER_CPU8,
15 	PROFILER_MEMREAD,
16 	PROFILER_MEMWRITE,
17 	PROFILER_VIDEO,
18 	PROFILER_DRAWGFX,
19 	PROFILER_COPYBITMAP,
20 	PROFILER_TILEMAP_DRAW,
21 	PROFILER_TILEMAP_DRAW_ROZ,
22 	PROFILER_TILEMAP_UPDATE,
23 	PROFILER_ARTWORK,
24 	PROFILER_BLIT,
25 	PROFILER_SOUND,
26 	PROFILER_MIXER,
27 	PROFILER_TIMER_CALLBACK,
28 	PROFILER_HISCORE,	/* high score load can slow things down if incorrectly written */
29 	PROFILER_INPUT,		/* input.c and inptport.c */
30 	PROFILER_EXTRA,		/* everything else */
31 
32 	/* the USER types are available to driver writers to profile */
33 	/* custom sections of the code */
34 	PROFILER_USER1,
35 	PROFILER_USER2,
36 	PROFILER_USER3,
37 	PROFILER_USER4,
38 
39 	PROFILER_PROFILER,
40 	PROFILER_IDLE,
41 	PROFILER_TOTAL
42 };
43 
44 
45 /*
46 To start profiling a certain section, e.g. video:
47 profiler_mark(PROFILER_VIDEO);
48 
49 to end profiling the current section:
50 profiler_mark(PROFILER_END);
51 
52 the profiler handles a FILO list so calls may be nested.
53 */
54 
55 #ifdef MAME_DEBUG
56 #define profiler_mark(type) profiler__mark(type)
57 #else
58 #define profiler_mark(type)
59 #endif
60 
61 void profiler__mark(int type);
62 
63 /* functions called by usrintf.c */
64 void profiler_start(void);
65 void profiler_stop(void);
66 void profiler_show(struct mame_bitmap *bitmap);
67 
68 #endif	/* PROFILER_H */
69