From patchwork Mon Sep 17 16:00:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 184501 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 498F82C0078 for ; Tue, 18 Sep 2012 02:59:33 +1000 (EST) Received: from localhost ([::1]:46629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdlY-0003s0-0T for incoming@patchwork.ozlabs.org; Mon, 17 Sep 2012 12:01:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdlE-0003eb-Mt for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDdl8-0000T4-RM for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:24 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:54240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdl8-0000Hr-Ku for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:18 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so9799681pbb.4 for ; Mon, 17 Sep 2012 09:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=xDrqN91H+dq0rBjPiXuZeZBPWqI1nyoBy9mjYnpj24M=; b=ij63suZ8nsX66RV/ozlwslHD0wSwPcT8eA8icNpAX7aoSC/JWAlU0Q+Ahd4E/7Z9yi H2kcKFvN8OELgHC4Ih9z3SK2S39TkO7UPmajTo+eq+ngdsD4QUHItpTBQvi7HI08RuIW mfAfmuTEQJjoO9/H1ZhkeNvFjTHtd+i0goMCDk8hhAU8WBhLzZPZHg3NxEcnxK2Y/VLV +64nbJBx6Yq0PaaP8mbixaMwvtA77cOp8YMEmhM196NPyesVC6FpJz7kkJ5jcrJXLIwj dNGwcAtpXV7bUfxbx5v33qTv4wOOa603p7OFa34urMg79V8yrI5QF+psSwS1JzUEuzls 508Q== Received: by 10.66.76.231 with SMTP id n7mr20748825paw.68.1347897678130; Mon, 17 Sep 2012 09:01:18 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id pq7sm7151494pbb.25.2012.09.17.09.01.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 09:01:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2012 18:00:45 +0200 Message-Id: <1347897649-23236-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> References: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Subject: [Qemu-devel] [RFC PATCH 06/10] monitor: disable info jit if !TCG X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- exec.c | 5 +++++ monitor.c | 4 ++++ 2 file modificati, 9 inserzioni(+) diff --git a/exec.c b/exec.c index 3e77de2..f7c1099 100644 --- a/exec.c +++ b/exec.c @@ -4157,6 +4157,11 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) int direct_jmp_count, direct_jmp2_count, cross_page; TranslationBlock *tb; + if (!tcg_enabled()) { + cpu_fprintf(f, "TCG not enabled\n"); + return; + } + target_code_size = 0; max_target_code_size = 0; cross_page = 0; diff --git a/monitor.c b/monitor.c index 67064e2..f70201b 100644 --- a/monitor.c +++ b/monitor.c @@ -906,10 +906,12 @@ static void do_info_registers(Monitor *mon) #endif } +#ifdef CONFIG_TCG static void do_info_jit(Monitor *mon) { dump_exec_info((FILE *)mon, monitor_fprintf); } +#endif static void do_info_history(Monitor *mon) { @@ -2558,6 +2560,7 @@ static mon_cmd_t info_cmds[] = { .help = "show memory tree", .mhandler.info = do_info_mtree, }, +#if defined(CONFIG_TCG) { .name = "jit", .args_type = "", @@ -2565,6 +2568,7 @@ static mon_cmd_t info_cmds[] = { .help = "show dynamic compiler info", .mhandler.info = do_info_jit, }, +#endif { .name = "kvm", .args_type = "",