From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp9Sl-0003hq-SG for qemu-devel@nongnu.org; Thu, 22 Oct 2015 02:35:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp9Si-0000AM-Lg for qemu-devel@nongnu.org; Thu, 22 Oct 2015 02:34:59 -0400 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:35075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp9Si-0000A7-FZ for qemu-devel@nongnu.org; Thu, 22 Oct 2015 02:34:56 -0400 Received: by pagq8 with SMTP id q8so7024116pag.2 for ; Wed, 21 Oct 2015 23:34:55 -0700 (PDT) Date: Thu, 22 Oct 2015 08:34:50 +0200 From: "Edgar E. Iglesias" Message-ID: <20151022063450.GA20036@toto> References: <1445463779-5823-1-git-send-email-rth@twiddle.net> <1445463779-5823-11-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445463779-5823-11-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PULL 10/10] cpu-exec: Add "nochain" debug flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org On Wed, Oct 21, 2015 at 11:42:59AM -1000, Richard Henderson wrote: > Respect it to avoid linking TBs together. > Reviewed-by: Edgar E. Iglesias > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > cpu-exec.c | 3 ++- > include/qemu/log.h | 1 + > qemu-log.c | 3 +++ > 3 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/cpu-exec.c b/cpu-exec.c > index 8fd56a6..7eef083 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -477,7 +477,8 @@ int cpu_exec(CPUState *cpu) > /* see if we can patch the calling TB. When the TB > spans two pages, we cannot safely do a direct > jump. */ > - if (next_tb != 0 && tb->page_addr[1] == -1) { > + if (next_tb != 0 && tb->page_addr[1] == -1 > + && !qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) { > tb_add_jump((TranslationBlock *)(next_tb & ~TB_EXIT_MASK), > next_tb & TB_EXIT_MASK, tb); > } > diff --git a/include/qemu/log.h b/include/qemu/log.h > index f880e66..7de4500 100644 > --- a/include/qemu/log.h > +++ b/include/qemu/log.h > @@ -41,6 +41,7 @@ static inline bool qemu_log_enabled(void) > #define LOG_UNIMP (1 << 10) > #define LOG_GUEST_ERROR (1 << 11) > #define CPU_LOG_MMU (1 << 12) > +#define CPU_LOG_TB_NOCHAIN (1 << 13) > > /* Returns true if a bit is set in the current loglevel mask > */ > diff --git a/qemu-log.c b/qemu-log.c > index 13f3813..efd07c8 100644 > --- a/qemu-log.c > +++ b/qemu-log.c > @@ -119,6 +119,9 @@ const QEMULogItem qemu_log_items[] = { > { LOG_GUEST_ERROR, "guest_errors", > "log when the guest OS does something invalid (eg accessing a\n" > "non-existent register)" }, > + { CPU_LOG_TB_NOCHAIN, "nochain", > + "do not chain compiled TBs so that \"exec\" and \"cpu\" show\n" > + "complete traces" }, > { 0, NULL, NULL }, > }; > > -- > 2.4.3 > >