File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ LDSCRIPT := $(TOPDIR)/system/amiga.lds
29
29
# Don't reload library base for each call
30
30
CPPFLAGS += -D__CONSTLIBBASEDECL__=const
31
31
CPPFLAGS += -DCHIPMEM_KB=$(CHIPMEM ) -DFASTMEM_KB=$(FASTMEM ) -DLOGOUT=$(LOGOUT )
32
+ CPPFLAGS += -DPROFILER=$(PROFILER )
32
33
33
34
include $(TOPDIR ) /config.mk
34
35
Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ LOGOUT := 2
18
18
# custom environment created by bootstrap code.
19
19
AMIGAOS := 0
20
20
21
+ # 1 => Turn on profiler that reports minimum-average-maximum number of raster
22
+ # lines measured between calls to ProfilerStart / ProfilerStop.
23
+ # The measurement is reported every 50 frames (i.e. once a second).
24
+ # 0 => Disable the profiler.
25
+ PROFILER := 1
26
+
21
27
# [only when AMIGAOS=1] Amount of chip and fast (or public) memory
22
28
# (in kilobytes!) passed to our custom memory allocator.
23
29
# To calculate total memory taken after an executable file
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ typedef struct Profile {
101
101
u_short count ;
102
102
} ProfileT ;
103
103
104
+ #if PROFILER
104
105
#define PROFILE (NAME ) \
105
106
static ProfileT *_##NAME##_profile = &(ProfileT){ \
106
107
.name = #NAME, \
@@ -113,6 +114,11 @@ typedef struct Profile {
113
114
114
115
#define ProfilerStart (NAME ) _ProfilerStart(_##NAME##_profile)
115
116
#define ProfilerStop (NAME ) _ProfilerStop(_##NAME##_profile)
117
+ #else
118
+ #define PROFILE (NAME )
119
+ #define ProfilerStart (NAME )
120
+ #define ProfilerStop (NAME )
121
+ #endif
116
122
117
123
/* Puts a task into sleep waiting for Vertical Blank interrupt.
118
124
* Let's background task do its job. */
You can’t perform that action at this time.
0 commit comments