From nobody Thu May 2 02:16:09 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622061127; cv=none; d=zohomail.com; s=zohoarc; b=fOwwDck2M/jOzZIPQPgpMgfGHzMiVSllmho/79XWtPcDI70+NkJXANq9PLb20RNNwrzG7k6e53li/FkOG/GMq8p5q6H0++AdLCbsQ1JPQ497lnCAGuGu6oKK5aEgujb+Jee9xgacEvnXkRLDHVq3S3NPBzzqedb6XRlAGNvqCvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061127; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=Zvm+v9VbX5oOSahYrqmjS41piGbnxL36fpAYv466jjo=; b=W7EJfx1oYwBLNSSnuWRBesZ4Tkn3s1naMRkOFMT1n2/DpadP4DH4Ub/iyWkgbBO1fm6nVqJq0YGJtFxnYwHVMP16Fz2lMn3b4eTlWZxbEVJ8eYt0o4Gv7WosPDFzLk0tGtgtFawrI9m5rBLeTy0WniyY3uMr7M2fdRmQAH0gfIA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622061127677988.7612341973553; Wed, 26 May 2021 13:32:07 -0700 (PDT) Received: from localhost ([::1]:57668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm0CE-00071K-Er for importer2@patchew.org; Wed, 26 May 2021 16:32:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm02U-0007Lx-4l; Wed, 26 May 2021 16:22:05 -0400 Received: from [201.28.113.2] (port=2123 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm02S-00019i-Nr; Wed, 26 May 2021 16:22:01 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 26 May 2021 17:21:07 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 42AE58013CA; Wed, 26 May 2021 17:21:07 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 1/5] target/ppc: fixed GEN_OPCODE behavior when PPC_DUMP_CPU is set Date: Wed, 26 May 2021 17:21:00 -0300 Message-Id: <20210526202104.127910-2-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> References: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 26 May 2021 20:21:07.0400 (UTC) FILETIME=[A8E14480:01D7526C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, Greg Kurz , lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Before this patch, when PPC_DUMP_CPU is set, oname is added to opc_handler_t, but GEN_OPCODE* wouldn't set it unless DO_PPC_STATISTICS was set as well. This patch changes it so those changes would happen when PPC_DUMP_CPU is set, but not statistics, because the latter is being removed. Signed-off-by: Bruno Larsen (billionai) --- target/ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index ea200f9637..6c0f424d81 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -1345,7 +1345,7 @@ typedef struct opcode_t { /*************************************************************************= ****/ /* PowerPC instructions table = */ =20 -#if defined(DO_PPC_STATISTICS) +#if defined(PPC_DUMP_CPU) #define GEN_OPCODE(name, op1, op2, op3, invl, _typ, _typ2) = \ { = \ .opc1 =3D op1, = \ --=20 2.17.1 From nobody Thu May 2 02:16:09 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622060928; cv=none; d=zohomail.com; s=zohoarc; b=BdY7tDzDkrEi2iKSk/u9qL7NNig2bWUCMWXczYdHwJjT0ra8h1LD5wEyJsnHqPhZsbyFM27eI4zZusNfI7JEdVHzAurBOBzXLp1O8v6cyF5YcvKj/pQQouGCc4b3h5fRI4wKLGUxhUYa8Y7NZ8AYx2+YBUwiDgR8XFnnCgDK+Yk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622060928; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=yQVMiHSlj1gSXv9ih2TmOEW4DI2dSn5a35GOP18/r0w=; b=bGpTWFnFhmB9NyxK/U68aQuECMxhjm03SbWVuQswFzbDrf39Uu6TvKdQU73FLC8+29XK4wNXZPvx0ZvHW41N8qKKy9vV0kLlsFScz+L23gjNAtnx6r4W1egboXAgrxQF9bcDMP0zg82WZWgX7y72mS0dXbu4n6HuK+44bRXUNm4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622060928301680.6581320787743; Wed, 26 May 2021 13:28:48 -0700 (PDT) Received: from localhost ([::1]:53014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm091-0003qn-5Y for importer2@patchew.org; Wed, 26 May 2021 16:28:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm02a-0007T7-67; Wed, 26 May 2021 16:22:08 -0400 Received: from [201.28.113.2] (port=2123 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm02Y-00019i-KZ; Wed, 26 May 2021 16:22:07 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 26 May 2021 17:21:07 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 7316C8013CA; Wed, 26 May 2021 17:21:07 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 2/5] target/ppc: remove ppc_cpu_dump_statistics Date: Wed, 26 May 2021 17:21:01 -0300 Message-Id: <20210526202104.127910-3-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> References: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 26 May 2021 20:21:07.0604 (UTC) FILETIME=[A9006540:01D7526C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, Greg Kurz , lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function requires surce code modification to be useful, which means it probably is not used often, and the move to using decodetree means the statistics won't even be collected anymore. Also removed setting dump_statistics in ppc_cpu_realize, since it was only useful when in conjunction with ppc_cpu_dump_statistics. Suggested-by: Richard Henderson Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Luis Pires > Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 1 - target/ppc/cpu_init.c | 3 --- target/ppc/translate.c | 51 ------------------------------------------ 3 files changed, 55 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 203f07e48e..c3d1b492e4 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1256,7 +1256,6 @@ DECLARE_OBJ_CHECKERS(PPCVirtualHypervisor, PPCVirtual= HypervisorClass, void ppc_cpu_do_interrupt(CPUState *cpu); bool ppc_cpu_exec_interrupt(CPUState *cpu, int int_req); void ppc_cpu_dump_state(CPUState *cpu, FILE *f, int flags); -void ppc_cpu_dump_statistics(CPUState *cpu, int flags); hwaddr ppc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int ppc_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int ppc_cpu_gdb_read_register_apple(CPUState *cpu, GByteArray *buf, int re= g); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index f5ae2f150d..bd05f53fa4 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -9250,9 +9250,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void = *data) cc->class_by_name =3D ppc_cpu_class_by_name; cc->has_work =3D ppc_cpu_has_work; cc->dump_state =3D ppc_cpu_dump_state; -#ifdef CONFIG_TCG - cc->dump_statistics =3D ppc_cpu_dump_statistics; -#endif cc->set_pc =3D ppc_cpu_set_pc; cc->gdb_read_register =3D ppc_cpu_gdb_read_register; cc->gdb_write_register =3D ppc_cpu_gdb_write_register; diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 6c0f424d81..fc9fd790ca 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -8881,57 +8881,6 @@ int ppc_fixup_cpu(PowerPCCPU *cpu) return 0; } =20 - -void ppc_cpu_dump_statistics(CPUState *cs, int flags) -{ -#if defined(DO_PPC_STATISTICS) - PowerPCCPU *cpu =3D POWERPC_CPU(cs); - opc_handler_t **t1, **t2, **t3, *handler; - int op1, op2, op3; - - t1 =3D cpu->env.opcodes; - for (op1 =3D 0; op1 < 64; op1++) { - handler =3D t1[op1]; - if (is_indirect_opcode(handler)) { - t2 =3D ind_table(handler); - for (op2 =3D 0; op2 < 32; op2++) { - handler =3D t2[op2]; - if (is_indirect_opcode(handler)) { - t3 =3D ind_table(handler); - for (op3 =3D 0; op3 < 32; op3++) { - handler =3D t3[op3]; - if (handler->count =3D=3D 0) { - continue; - } - qemu_printf("%02x %02x %02x (%02x %04d) %16s: " - "%016" PRIx64 " %" PRId64 "\n", - op1, op2, op3, op1, (op3 << 5) | op2, - handler->oname, - handler->count, handler->count); - } - } else { - if (handler->count =3D=3D 0) { - continue; - } - qemu_printf("%02x %02x (%02x %04d) %16s: " - "%016" PRIx64 " %" PRId64 "\n", - op1, op2, op1, op2, handler->oname, - handler->count, handler->count); - } - } - } else { - if (handler->count =3D=3D 0) { - continue; - } - qemu_printf("%02x (%02x ) %16s: %016" PRIx64 - " %" PRId64 "\n", - op1, op1, handler->oname, - handler->count, handler->count); - } - } -#endif -} - static bool decode_legacy(PowerPCCPU *cpu, DisasContext *ctx, uint32_t ins= n) { opc_handler_t **table, *handler; --=20 2.17.1 From nobody Thu May 2 02:16:09 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622061417; cv=none; d=zohomail.com; s=zohoarc; b=Hin2sOev6lbA49EyQdjbffRIt2v+rVsA3AGBP3ezUmm85VgSh+bfkg4eaNI7PmRarj952Qw23dP5wKijDnPxS5sr98fJibwQ8UWxcQ5gJxfXCsGDIi9EboL9vS4TB6IuAwLpT+RJBugk1hJN7beHKTJERNTzaCqnb2Zjpil1vIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061417; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=DZYA0sgDitAvQ6vx9awHF34dUENZ/zqrAYrWV5Be/tA=; b=IqU7iPeUPnEjlmzRIcy/k+028DBtejUXPTPK9pdQwznj5KLsInjAOrOFjWYXt/nVI+h4qaFXTssAv3D6y0ifFWMq9L60uQl9LUVH3JzSzwha6c3xQKmQmKVHnbtz0Xac1aldeb1W/u6IdRrgKLRHpdaW1PecFblNqdKpXPGWxmE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622061417275568.4032760646994; Wed, 26 May 2021 13:36:57 -0700 (PDT) Received: from localhost ([::1]:34554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm0Gs-0002FT-41 for importer2@patchew.org; Wed, 26 May 2021 16:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm02c-0007cS-SF; Wed, 26 May 2021 16:22:10 -0400 Received: from [201.28.113.2] (port=2123 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm02b-00019i-BG; Wed, 26 May 2021 16:22:10 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 26 May 2021 17:21:07 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 9D29B8013E1; Wed, 26 May 2021 17:21:07 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 3/5] target/ppc: removed mentions to DO_PPC_STATISTICS Date: Wed, 26 May 2021 17:21:02 -0300 Message-Id: <20210526202104.127910-4-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> References: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 26 May 2021 20:21:07.0775 (UTC) FILETIME=[A91A7CF0:01D7526C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, Greg Kurz , lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Removed the commented out definition and all ifdefs relating to PPC_DUMP_STATISTICS, as it's hardly ever used. Suggested-by: Richard Henderson Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Luis Pires Reviewed-by: Richard Henderson --- target/ppc/translate.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index fc9fd790ca..0525e1939f 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -47,7 +47,6 @@ =20 /* Include definitions for instructions classes and implementations flags = */ /* #define PPC_DEBUG_DISAS */ -/* #define DO_PPC_STATISTICS */ =20 #ifdef PPC_DEBUG_DISAS # define LOG_DISAS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) @@ -217,12 +216,9 @@ struct opc_handler_t { uint64_t type2; /* handler */ void (*handler)(DisasContext *ctx); -#if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU) +#if defined(PPC_DUMP_CPU) const char *oname; #endif -#if defined(DO_PPC_STATISTICS) - uint64_t count; -#endif }; =20 /* SPR load/store helpers */ @@ -8546,7 +8542,7 @@ static int register_direct_insn(opc_handler_t **ppc_o= pcodes, if (insert_in_table(ppc_opcodes, idx, handler) < 0) { printf("*** ERROR: opcode %02x already assigned in main " "opcode table\n", idx); -#if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU) +#if defined(PPC_DUMP_CPU) printf(" Registered handler '%s' - new handler '%s'\n", ppc_opcodes[idx]->oname, handler->oname); #endif @@ -8570,7 +8566,7 @@ static int register_ind_in_table(opc_handler_t **tabl= e, if (!is_indirect_opcode(table[idx1])) { printf("*** ERROR: idx %02x already assigned to a direct " "opcode\n", idx1); -#if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU) +#if defined(PPC_DUMP_CPU) printf(" Registered handler '%s' - new handler '%s'\= n", ind_table(table[idx1])[idx2]->oname, handler->oname); #endif @@ -8581,7 +8577,7 @@ static int register_ind_in_table(opc_handler_t **tabl= e, insert_in_table(ind_table(table[idx1]), idx2, handler) < 0) { printf("*** ERROR: opcode %02x already assigned in " "opcode table %02x\n", idx2, idx1); -#if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU) +#if defined(PPC_DUMP_CPU) printf(" Registered handler '%s' - new handler '%s'\n", ind_table(table[idx1])[idx2]->oname, handler->oname); #endif @@ -9036,10 +9032,6 @@ static void ppc_tr_translate_insn(DisasContextBase *= dcbase, CPUState *cs) gen_invalid(ctx); } =20 -#if defined(DO_PPC_STATISTICS) - handler->count++; -#endif - translator_loop_temp_check(&ctx->base); } =20 --=20 2.17.1 From nobody Thu May 2 02:16:09 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622061612; cv=none; d=zohomail.com; s=zohoarc; b=OZr103KN4yi79GQx36irMyNYvdD5chV703TnybykurO84m/sSI9VJmu5L8T1FUhdsS0YUKd2KuD+TRERAEbPMDdUJAYGmv9szrtWxQMIwWKHYvnDURMuql9LuE9KTjCkjGL/nO5OkmBJ5RCSeaErzFAomB6ifnTRTJOD632VYKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061612; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=VPqPpvOzdNIh6JYxbxT+B2utovzCQ2PwwUqh3hnBcjI=; b=e76X4pPMIpo8KT4bqMw0CVh81RsCSF7sgwSepABV7L6GLCwwh0YR6zTwMyVq6MV9XFXdbPz4svk+BTMGY+15AemMELamINMHmW84PMdZRUmXRuOlk8HBrF412Ll5poFyh/A32tInM0Us3bbqAdazr0bsCc+kXQihUDdpPQwX4BI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622061612775280.0589427616677; Wed, 26 May 2021 13:40:12 -0700 (PDT) Received: from localhost ([::1]:39446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm0K3-0005gY-F4 for importer2@patchew.org; Wed, 26 May 2021 16:40:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm02f-0007lE-HB; Wed, 26 May 2021 16:22:13 -0400 Received: from [201.28.113.2] (port=2123 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm02d-00019i-Uo; Wed, 26 May 2021 16:22:13 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 26 May 2021 17:21:07 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id CD40E8013CA; Wed, 26 May 2021 17:21:07 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 4/5] monitor: removed cpustats command Date: Wed, 26 May 2021 17:21:03 -0300 Message-Id: <20210526202104.127910-5-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> References: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 26 May 2021 20:21:07.0963 (UTC) FILETIME=[A9372CB0:01D7526C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, Markus Armbruster , richard.henderson@linaro.org, luis.pires@eldorado.org.br, "Dr. David Alan Gilbert" , lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since ppc was the last architecture to collect these statistics and it is currently phasing this collection out, the command that would query this information is being removed. Suggested-by: Richard Henderson Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Luis Pires Reviewed-by: Richard Henderson --- hmp-commands-info.hx | 13 ------------- monitor/misc.c | 11 ----------- 2 files changed, 24 deletions(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index ab0c7aa5ee..b2347a6aea 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -500,19 +500,6 @@ SRST Show the current VM UUID. ERST =20 - { - .name =3D "cpustats", - .args_type =3D "", - .params =3D "", - .help =3D "show CPU statistics", - .cmd =3D hmp_info_cpustats, - }, - -SRST - ``info cpustats`` - Show CPU statistics. -ERST - #if defined(CONFIG_SLIRP) { .name =3D "usernet", diff --git a/monitor/misc.c b/monitor/misc.c index f3a393ea59..1539e18557 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -369,17 +369,6 @@ static void hmp_info_history(Monitor *mon, const QDict= *qdict) } } =20 -static void hmp_info_cpustats(Monitor *mon, const QDict *qdict) -{ - CPUState *cs =3D mon_get_cpu(mon); - - if (!cs) { - monitor_printf(mon, "No CPU available\n"); - return; - } - cpu_dump_statistics(cs, 0); -} - static void hmp_info_trace_events(Monitor *mon, const QDict *qdict) { const char *name =3D qdict_get_try_str(qdict, "name"); --=20 2.17.1 From nobody Thu May 2 02:16:09 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622061454; cv=none; d=zohomail.com; s=zohoarc; b=IlHr/p/p/e2kN5s4k4vNZe0xh+SSITruYMTwTRS7p26Q+SH6eRHEsMiYYJYEuumxrauySG20h9xcaK+iOz4TaC/40i1rj922IYwhER/lLJ36tfimsOUWFm4dhYup0LSf4jRLYy1pJNBLdNvXPMwdICz5bCBRSiIo89IyR+S4O3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622061454; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=HA7c2Gm2mvaLWNGtf3LsvzgeB3UWhUaDMAA3eZHvv5A=; b=P6FMeVK2TkdaD/zffajdXLlMfGtmlVANkH7JgPGgQt/MPIhKWH4oB07BSOcBS8zbv9wE0Dfupb9NB30LldvSM1EO6ZTCXktY4x0+qhCHunvZiV5gm2lwaik2nY0NVXTLmbarjjF2gj+y1lv7aR1k5M+yoA3klYTEec0KlhmfRk4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622061454606651.9452130968879; Wed, 26 May 2021 13:37:34 -0700 (PDT) Received: from localhost ([::1]:35456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm0HV-0002tD-I3 for importer2@patchew.org; Wed, 26 May 2021 16:37:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm02i-0007uB-7U; Wed, 26 May 2021 16:22:16 -0400 Received: from [201.28.113.2] (port=2123 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm02g-00019i-LR; Wed, 26 May 2021 16:22:15 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Wed, 26 May 2021 17:21:08 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 0489F8013CA; Wed, 26 May 2021 17:21:08 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH 5/5] hw/core/cpu: removed cpu_dump_statistics function Date: Wed, 26 May 2021 17:21:04 -0300 Message-Id: <20210526202104.127910-6-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> References: <20210526202104.127910-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 26 May 2021 20:21:08.0166 (UTC) FILETIME=[A9562660:01D7526C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" No more architectures set the pointer to dump_statistics, so there's no point in keeping it, or the related cpu_dump_statistics function. Suggested-by: Richard Henderson Signed-off-by: Bruno Larsen (billionai) Acked-by: Eduardo Habkost Reviewed-by: Luis Pires Reviewed-by: Richard Henderson --- hw/core/cpu.c | 9 --------- include/hw/core/cpu.h | 12 ------------ 2 files changed, 21 deletions(-) diff --git a/hw/core/cpu.c b/hw/core/cpu.c index 00330ba07d..b700d884ad 100644 --- a/hw/core/cpu.c +++ b/hw/core/cpu.c @@ -218,15 +218,6 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags) } } =20 -void cpu_dump_statistics(CPUState *cpu, int flags) -{ - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->dump_statistics) { - cc->dump_statistics(cpu, flags); - } -} - void cpu_reset(CPUState *cpu) { device_cold_reset(DEVICE(cpu)); diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index d45f78290e..6d14923206 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -93,7 +93,6 @@ struct AccelCPUClass; * not be used by any callers other than the pre-1.0 virtio devices. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. - * @dump_statistics: Callback for dumping statistics. * @get_arch_id: Callback for getting architecture-dependent CPU ID. * @get_paging_enabled: Callback for inquiring whether paging is enabled. * @get_memory_mapping: Callback for obtaining the memory mappings. @@ -155,7 +154,6 @@ struct CPUClass { uint8_t *buf, int len, bool is_write); void (*dump_state)(CPUState *cpu, FILE *, int flags); GuestPanicInformation* (*get_crash_info)(CPUState *cpu); - void (*dump_statistics)(CPUState *cpu, int flags); int64_t (*get_arch_id)(CPUState *cpu); bool (*get_paging_enabled)(const CPUState *cpu); void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list, @@ -562,16 +560,6 @@ enum CPUDumpFlags { */ void cpu_dump_state(CPUState *cpu, FILE *f, int flags); =20 -/** - * cpu_dump_statistics: - * @cpu: The CPU whose state is to be dumped. - * @flags: Flags what to dump. - * - * Dump CPU statistics to the current monitor if we have one, else to - * stdout. - */ -void cpu_dump_statistics(CPUState *cpu, int flags); - #ifndef CONFIG_USER_ONLY /** * cpu_get_phys_page_attrs_debug: --=20 2.17.1