From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JweBB-00065h-V2 for qemu-devel@nongnu.org; Thu, 15 May 2008 10:11:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JweBA-00064I-Ic for qemu-devel@nongnu.org; Thu, 15 May 2008 10:11:33 -0400 Received: from [199.232.76.173] (port=47127 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JweB9-000641-VC for qemu-devel@nongnu.org; Thu, 15 May 2008 10:11:32 -0400 Received: from mail.windriver.com ([147.11.1.11]:50475 helo=mail.wrs.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JweB9-0003TM-1Z for qemu-devel@nongnu.org; Thu, 15 May 2008 10:11:31 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id m4FEBTg2000016 for ; Thu, 15 May 2008 07:11:29 -0700 (PDT) From: Jason Wessel Date: Thu, 15 May 2008 09:11:31 -0500 Message-Id: <1210860693-22245-4-git-send-email-jason.wessel@windriver.com> In-Reply-To: <1210860693-22245-3-git-send-email-jason.wessel@windriver.com> References: <1210860693-22245-1-git-send-email-jason.wessel@windriver.com> <1210860693-22245-2-git-send-email-jason.wessel@windriver.com> <1210860693-22245-3-git-send-email-jason.wessel@windriver.com> Subject: [Qemu-devel] [PATCH 3/5] vl.c: always run the real time timers when single stepping Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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