[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/5] vl.c: always run the real time timers when sing
From: |
Jason Wessel |
Subject: |
[Qemu-devel] [PATCH 3/5] vl.c: always run the real time timers when single stepping |
Date: |
Thu, 15 May 2008 09:11:31 -0500 |
The real time timers should always be processed regardless if you are
single stepping or not.
99.9% of the time we are not single stepping so optimize for it.
Signed-off-by: Jason Wessel <address@hidden>
---
cpu-exec.c | 2 +-
vl.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index 435fdf8..5fd9cad 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -420,7 +420,7 @@ int cpu_exec(CPUState *env1)
#if defined(TARGET_I386)
&& env->hflags & HF_GIF_MASK
#endif
- && !(env->singlestep_enabled & SSTEP_NOIRQ)) {
+ && likely(!(env->singlestep_enabled & SSTEP_NOIRQ))) {
if (interrupt_request & CPU_INTERRUPT_DEBUG) {
env->interrupt_request &= ~CPU_INTERRUPT_DEBUG;
env->exception_index = EXCP_DEBUG;
diff --git a/vl.c b/vl.c
index 67712f0..5430ae6 100644
--- a/vl.c
+++ b/vl.c
@@ -7032,7 +7032,7 @@ void main_loop_wait(int timeout)
qemu_aio_poll();
if (vm_running) {
- if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
+ if (likely(!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)))
qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
qemu_get_clock(vm_clock));
/* run dma transfers, if any */
@@ -7040,7 +7040,6 @@ void main_loop_wait(int timeout)
}
/* real time timers */
- if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
qemu_get_clock(rt_clock));
--
1.5.5.1
- [Qemu-devel] [PATCH 0/5] gdbstub and single step improvments, Jason Wessel, 2008/05/15
- [Qemu-devel] [PATCH 1/5] gdbstub: replace singlestep q packets with qRcmd packets, Jason Wessel, 2008/05/15
- Re: [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Edgar E. Iglesias, 2008/05/15
- Re: [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Jason Wessel, 2008/05/19
- Re: [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Paul Brook, 2008/05/19
- Re: [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Maxim Gorbachyov, 2008/05/21
- Re: [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Jason Wessel, 2008/05/21
- [Qemu-devel] Re: [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Jan Kiszka, 2008/05/22
- Re: [Qemu-devel] Re: [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support, Jason Wessel, 2008/05/22