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_VIDEO,
16 	PROFILER_DRAWGFX,
17 	PROFILER_COPYBITMAP,
18 	PROFILER_TILEMAP_UPDATE,
19 	PROFILER_TILEMAP_RENDER,
20 	PROFILER_TILEMAP_DRAW,
21 	PROFILER_BLIT,
22 	PROFILER_SOUND,
23 	PROFILER_MIXER,
24 	PROFILER_TIMER_CALLBACK,
25 	PROFILER_HISCORE,	/* high score load can slow things down if incorrectly written */
26 	PROFILER_INPUT,		/* input.c and inptport.c */
27 	PROFILER_EXTRA,		/* everything else */
28 
29 	/* the USER types are available to driver writers to profile */
30 	/* custom sections of the code */
31 	PROFILER_USER1,
32 	PROFILER_USER2,
33 	PROFILER_USER3,
34 	PROFILER_USER4,
35 
36 	PROFILER_PROFILER,
37 	PROFILER_IDLE,
38 	PROFILER_TOTAL
39 };
40 
41 
42 /*
43 To start profiling a certain section, e.g. video:
44 profiler_mark(PROFILER_VIDEO);
45 
46 to end profiling the current section:
47 profiler_mark(PROFILER_END);
48 
49 the profiler handles a FILO list so calls may be nested.
50 */
51 
52 void profiler_mark(int type);
53 
54 /* functions called by usrintf.c */
55 void profiler_start(void);
56 void profiler_stop(void);
57 void profiler_show(struct osd_bitmap *bitmap);
58 
59 #endif	/* PROFILER_H */
60