summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diexec.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-08-21 22:25:58 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-08-21 22:25:58 +0000
commita2f7346d9099da6582b42bc912a2436d8e9c6f44 (patch)
treea4aec5d15135079bcad4484386e389a7080da494 /src/emu/diexec.c
parente8d644d285d743a93b2442d4c2f9b568a38a4715 (diff)
I had originally wanted to convert the profiler to use scopes (e.g.,
create a stack class that started the profiler in the constructor and stopped it in the destructor). Sadly, doing that causes gcc to call out to hook up the unwind chain, and this tanks performance quite badly, even when the profiler is off. Since I had already class-ified profiler.c, I decided to keep the old way of doing things but wrap it in the newer classes. So at least it wasn't a complete waste of my time. Search & replace: profiler_mark_start -> g_profiler.start profiler_mark_end -> g_profiler.end
Diffstat (limited to 'src/emu/diexec.c')
-rw-r--r--src/emu/diexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/diexec.c b/src/emu/diexec.c
index 11f8f04804a..eb6dfe8eca5 100644
--- a/src/emu/diexec.c
+++ b/src/emu/diexec.c
@@ -267,7 +267,7 @@ device_execute_interface::device_execute_interface(running_machine &machine, con
m_timedint_timer(NULL),
m_iloops(0),
m_partial_frame_timer(NULL),
- m_profiler(0),
+ m_profiler(PROFILER_IDLE),
m_icount(NULL),
m_cycles_running(0),
m_cycles_stolen(0),
@@ -538,7 +538,7 @@ void device_execute_interface::interface_pre_start()
// fill in the initial states
int index = m_machine.m_devicelist.index(&m_device);
m_suspend = SUSPEND_REASON_RESET;
- m_profiler = index + PROFILER_DEVICE_FIRST;
+ m_profiler = profile_type(index + PROFILER_DEVICE_FIRST);
m_inttrigger = index + TRIGGER_INT;
// fill in the input states and IRQ callback information