From: David Gibson <david@gibson.dropbear.id.au>
To: "Bruno Larsen (billionai)" <bruno.larsen@eldorado.org.br>
Cc: farosas@linux.ibm.com, richard.henderson@linaro.org,
qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>,
lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br,
qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br,
luis.pires@eldorado.org.br
Subject: Re: [PATCH 2/5] target/ppc: remove ppc_cpu_dump_statistics
Date: Thu, 27 May 2021 11:20:01 +1000 [thread overview]
Message-ID: <YK7zwfSC7NGssEN5@yekko> (raw)
In-Reply-To: <20210526202104.127910-3-bruno.larsen@eldorado.org.br>
[-- Attachment #1: Type: text/plain, Size: 4924 bytes --]
On Wed, May 26, 2021 at 05:21:01PM -0300, Bruno Larsen (billionai) wrote:
> 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<richard.henderson@linaro.org>
> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
> ---
> 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, PPCVirtualHypervisorClass,
> 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 reg);
> 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 = ppc_cpu_class_by_name;
> cc->has_work = ppc_cpu_has_work;
> cc->dump_state = ppc_cpu_dump_state;
> -#ifdef CONFIG_TCG
> - cc->dump_statistics = ppc_cpu_dump_statistics;
> -#endif
This confuses me. The ifdefs you're removing aren't present in my
tree, and AFAICT they never existed since your own patch created
cpu_init.c.
So.. please rebase and check that.
> cc->set_pc = ppc_cpu_set_pc;
> cc->gdb_read_register = ppc_cpu_gdb_read_register;
> cc->gdb_write_register = 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;
> }
>
> -
> -void ppc_cpu_dump_statistics(CPUState *cs, int flags)
> -{
> -#if defined(DO_PPC_STATISTICS)
> - PowerPCCPU *cpu = POWERPC_CPU(cs);
> - opc_handler_t **t1, **t2, **t3, *handler;
> - int op1, op2, op3;
> -
> - t1 = cpu->env.opcodes;
> - for (op1 = 0; op1 < 64; op1++) {
> - handler = t1[op1];
> - if (is_indirect_opcode(handler)) {
> - t2 = ind_table(handler);
> - for (op2 = 0; op2 < 32; op2++) {
> - handler = t2[op2];
> - if (is_indirect_opcode(handler)) {
> - t3 = ind_table(handler);
> - for (op3 = 0; op3 < 32; op3++) {
> - handler = t3[op3];
> - if (handler->count == 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 == 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 == 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 insn)
> {
> opc_handler_t **table, *handler;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-05-27 1:52 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 20:20 [PATCH 0/5] stop collection of instruction usage statistics Bruno Larsen (billionai)
2021-05-26 20:21 ` [PATCH 1/5] target/ppc: fixed GEN_OPCODE behavior when PPC_DUMP_CPU is set Bruno Larsen (billionai)
2021-05-26 21:13 ` Luis Fernando Fujita Pires
2021-05-26 21:24 ` Richard Henderson
2021-05-27 1:18 ` david
2021-05-26 20:21 ` [PATCH 2/5] target/ppc: remove ppc_cpu_dump_statistics Bruno Larsen (billionai)
2021-05-26 21:25 ` Richard Henderson
2021-05-26 21:27 ` Luis Fernando Fujita Pires
2021-05-27 1:20 ` David Gibson [this message]
2021-05-27 4:35 ` David Gibson
2021-05-27 13:22 ` Bruno Piazera Larsen
2021-05-27 14:01 ` Greg Kurz
2021-05-29 5:46 ` David Gibson
2021-05-27 6:01 ` Greg Kurz
2021-05-29 5:47 ` David Gibson
2021-05-31 14:26 ` Bruno Piazera Larsen
2021-05-26 20:21 ` [PATCH 3/5] target/ppc: removed mentions to DO_PPC_STATISTICS Bruno Larsen (billionai)
2021-05-26 21:26 ` Richard Henderson
2021-05-26 21:35 ` Luis Fernando Fujita Pires
2021-05-27 4:37 ` David Gibson
2021-05-26 20:21 ` [PATCH 4/5] monitor: removed cpustats command Bruno Larsen (billionai)
2021-05-26 21:28 ` Richard Henderson
2021-05-27 4:40 ` David Gibson
2021-05-26 21:35 ` Luis Fernando Fujita Pires
2021-05-27 6:40 ` Greg Kurz
2021-05-27 8:09 ` Dr. David Alan Gilbert
2021-05-27 8:30 ` Greg Kurz
2021-05-27 11:24 ` Bruno Piazera Larsen
2021-05-27 14:57 ` Greg Kurz
2021-06-08 15:10 ` Markus Armbruster
2021-06-08 15:15 ` Greg Kurz
2021-05-27 8:08 ` Dr. David Alan Gilbert
2021-05-26 20:21 ` [PATCH 5/5] hw/core/cpu: removed cpu_dump_statistics function Bruno Larsen (billionai)
2021-05-26 21:29 ` Richard Henderson
2021-05-26 21:35 ` Luis Fernando Fujita Pires
2021-05-27 1:21 ` David Gibson
2021-05-27 21:05 ` Eduardo Habkost
2021-05-27 13:57 ` [PATCH 0/5] stop collection of instruction usage statistics Alex Bennée
2021-05-27 14:23 ` Bruno Piazera Larsen
2021-05-27 14:25 ` Luis Fernando Fujita Pires
2021-05-27 14:56 ` Alex Bennée
2021-05-27 15:39 ` Luis Fernando Fujita Pires
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=YK7zwfSC7NGssEN5@yekko \
--to=david@gibson.dropbear.id.au \
--cc=bruno.larsen@eldorado.org.br \
--cc=farosas@linux.ibm.com \
--cc=fernando.valle@eldorado.org.br \
--cc=groug@kaod.org \
--cc=lucas.araujo@eldorado.org.br \
--cc=luis.pires@eldorado.org.br \
--cc=matheus.ferst@eldorado.org.br \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.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).