From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <1210860693-22245-4-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1210860693-22245-3-git-send-email-jason.wessel@windriver.com>
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 <jason.wessel@windriver.com>
---
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
next prev parent reply other threads:[~2008-05-15 14:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 14:11 [Qemu-devel] [PATCH 0/5] gdbstub and single step improvments Jason Wessel
2008-05-15 14:11 ` [Qemu-devel] [PATCH 1/5] gdbstub: replace singlestep q packets with qRcmd packets Jason Wessel
2008-05-15 14:11 ` [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support Jason Wessel
2008-05-15 14:11 ` Jason Wessel [this message]
2008-05-15 14:11 ` [Qemu-devel] [PATCH 4/5] gdbstub: support for gdb "detach/kill/quit" Jason Wessel
2008-05-15 14:11 ` [Qemu-devel] [PATCH 5/5] ppc: fix crash in ppc system single step support Jason Wessel
2008-05-15 21:13 ` [Qemu-devel] [PATCH 4/5] gdbstub: support for gdb "detach/kill/quit" Edgar E. Iglesias
2008-05-15 22:17 ` [Qemu-devel] [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support Edgar E. Iglesias
2008-05-19 13:29 ` Jason Wessel
2008-05-19 16:30 ` Paul Brook
2008-05-21 12:58 ` Maxim Gorbachyov
2008-05-21 17:03 ` Jason Wessel
2008-05-22 13:24 ` [Qemu-devel] " Jan Kiszka
2008-05-22 13:45 ` Jason Wessel
2008-05-22 13:53 ` Jan Kiszka
2008-05-22 16:55 ` Jason Wessel
2008-05-23 15:33 ` Jan Kiszka
2008-05-15 21:33 ` [Qemu-devel] [PATCH 1/5] gdbstub: replace singlestep q packets with qRcmd packets Edgar E. Iglesias
2008-05-19 13:27 ` Jason Wessel
2008-05-19 15:14 ` Edgar E. Iglesias
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1210860693-22245-4-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).