| Previous | 199869 Revisions | Next |
| r24656 Friday 2nd August, 2013 at 13:43:10 UTC by Oliver Stöneberg |
|---|
| added makefile define FASTDEBUG to disable some debug-specific stuff, that is causing performance hits (for e.g. profiling) [Oliver Stöneberg] |
| [/trunk] | makefile |
| [src/emu] | emucore.h schedule.c |
| [src/osd/windows] | windows.mak |
| r24655 | r24656 | |
|---|---|---|
| 184 | 184 | # uncomment next line to build a debug version |
| 185 | 185 | # DEBUG = 1 |
| 186 | 186 | |
| 187 | # uncomment next line to disable some debug-related hotspots/slowdowns (e.g. for profiling) | |
| 188 | # FASTDEBUG = 1 | |
| 189 | ||
| 187 | 190 | # uncomment next line to include the internal profiler |
| 188 | 191 | # PROFILER = 1 |
| 189 | 192 | |
| r24655 | r24656 | |
| 443 | 446 | DEFS += -DUSE_SYSTEM_JPEGLIB |
| 444 | 447 | endif |
| 445 | 448 | |
| 449 | ifdef FASTDEBUG | |
| 450 | DEFS += -DMAME_DEBUG_FAST | |
| 451 | endif | |
| 446 | 452 | |
| 447 | 453 | |
| 448 | 454 | #------------------------------------------------- |
| r24655 | r24656 | |
|---|---|---|
| 144 | 144 | |
| 145 | 145 | # enable basic run-time checks in non-optimized build |
| 146 | 146 | ifeq ($(OPTIMIZE),0) |
| 147 | ifndef FASTDEBUG | |
| 147 | 148 | CCOMFLAGS += /RTC1 |
| 149 | else | |
| 150 | # disable the stack check since it has quite a speed impact | |
| 151 | CCOMFLAGS += /RTCu | |
| 148 | 152 | endif |
| 153 | endif | |
| 149 | 154 | |
| 150 | 155 | ifdef MSVC_ANALYSIS |
| 151 | 156 | CCOMFLAGS += /analyze /wd6011 /wd6328 /wd6204 /wd6244 /wd6385 /wd6308 /wd6246 /wd6031 /wd6326 /analyze:stacksize384112 |
| r24655 | r24656 | |
|---|---|---|
| 480 | 480 | attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds; |
| 481 | 481 | if (delta < 0 && target.seconds > exec->m_localtime.seconds) |
| 482 | 482 | delta += ATTOSECONDS_PER_SECOND; |
| 483 | #ifndef MAME_DEBUG_FAST | |
| 483 | 484 | assert(delta == (target - exec->m_localtime).as_attoseconds()); |
| 485 | #endif | |
| 484 | 486 | |
| 485 | 487 | // if we have enough for at least 1 cycle, do the math |
| 486 | 488 | if (delta >= exec->m_attoseconds_per_cycle) |
| r24655 | r24656 | |
|---|---|---|
| 357 | 357 | template<class _Dest, class _Source> |
| 358 | 358 | inline _Dest downcast(_Source *src) |
| 359 | 359 | { |
| 360 | #ifdef MAME_DEBUG | |
| 360 | #if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST) | |
| 361 | 361 | try { |
| 362 | 362 | if (dynamic_cast<_Dest>(src) != src) |
| 363 | 363 | { |
| r24655 | r24656 | |
| 378 | 378 | template<class _Dest, class _Source> |
| 379 | 379 | inline _Dest downcast(_Source &src) |
| 380 | 380 | { |
| 381 | #ifdef MAME_DEBUG | |
| 381 | #if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST) | |
| 382 | 382 | try { |
| 383 | 383 | if (&dynamic_cast<_Dest>(src) != &src) |
| 384 | 384 | { |
| Previous | 199869 Revisions | Next |