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

trunk/makefile
r24655r24656
184184# uncomment next line to build a debug version
185185# DEBUG = 1
186186
187# uncomment next line to disable some debug-related hotspots/slowdowns (e.g. for profiling)
188# FASTDEBUG = 1
189
187190# uncomment next line to include the internal profiler
188191# PROFILER = 1
189192
r24655r24656
443446DEFS += -DUSE_SYSTEM_JPEGLIB
444447endif
445448
449ifdef FASTDEBUG
450DEFS += -DMAME_DEBUG_FAST
451endif
446452
447453
448454#-------------------------------------------------
trunk/src/osd/windows/windows.mak
r24655r24656
144144
145145# enable basic run-time checks in non-optimized build
146146ifeq ($(OPTIMIZE),0)
147ifndef FASTDEBUG
147148CCOMFLAGS += /RTC1
149else
150# disable the stack check since it has quite a speed impact
151CCOMFLAGS += /RTCu
148152endif
153endif
149154
150155ifdef MSVC_ANALYSIS
151156CCOMFLAGS += /analyze /wd6011 /wd6328 /wd6204 /wd6244 /wd6385 /wd6308 /wd6246 /wd6031 /wd6326 /analyze:stacksize384112
trunk/src/emu/schedule.c
r24655r24656
480480            attoseconds_t delta = target.attoseconds - exec->m_localtime.attoseconds;
481481            if (delta < 0 && target.seconds > exec->m_localtime.seconds)
482482               delta += ATTOSECONDS_PER_SECOND;
483#ifndef MAME_DEBUG_FAST
483484            assert(delta == (target - exec->m_localtime).as_attoseconds());
485#endif
484486
485487            // if we have enough for at least 1 cycle, do the math
486488            if (delta >= exec->m_attoseconds_per_cycle)
trunk/src/emu/emucore.h
r24655r24656
357357template<class _Dest, class _Source>
358358inline _Dest downcast(_Source *src)
359359{
360#ifdef MAME_DEBUG
360#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
361361   try {
362362      if (dynamic_cast<_Dest>(src) != src)
363363      {
r24655r24656
378378template<class _Dest, class _Source>
379379inline _Dest downcast(_Source &src)
380380{
381#ifdef MAME_DEBUG
381#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
382382   try {
383383      if (&dynamic_cast<_Dest>(src) != &src)
384384      {

Previous 199869 Revisions Next


© 1997-2024 The MAME Team