Message ID | 20210526202104.127910-6-bruno.larsen@eldorado.org.br (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | stop collection of instruction usage statistics | expand |
On 5/26/21 1:21 PM, Bruno Larsen (billionai) wrote: > 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<richard.henderson@linaro.org> > Signed-off-by: Bruno Larsen (billionai)<bruno.larsen@eldorado.org.br> > --- > hw/core/cpu.c | 9 --------- > include/hw/core/cpu.h | 12 ------------ > 2 files changed, 21 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
From: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> > 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 <richard.henderson@linaro.org> > Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> > --- > hw/core/cpu.c | 9 --------- > include/hw/core/cpu.h | 12 ------------ > 2 files changed, 21 deletions(-) Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> -- Luis Pires Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br> Departamento de Computação Embarcada Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
On Wed, May 26, 2021 at 05:21:04PM -0300, Bruno Larsen (billionai) wrote: > 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 <richard.henderson@linaro.org> > Signed-off-by: Bruno Larsen (billionai) > <bruno.larsen@eldorado.org.br> I'm happy enough to stage this through my tree, but an ack from Eduardo or Marcel would be good to have. > --- > 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) > } > } > > -void cpu_dump_statistics(CPUState *cpu, int flags) > -{ > - CPUClass *cc = 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); > > -/** > - * 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:
On Wed, May 26, 2021 at 05:21:04PM -0300, Bruno Larsen (billionai) wrote: > 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 <richard.henderson@linaro.org> > Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
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) } } -void cpu_dump_statistics(CPUState *cpu, int flags) -{ - CPUClass *cc = 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); -/** - * 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:
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 <richard.henderson@linaro.org> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> --- hw/core/cpu.c | 9 --------- include/hw/core/cpu.h | 12 ------------ 2 files changed, 21 deletions(-)