Re: [RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-25 Thread Wu, Fei
On 3/23/2024 3:14 AM, Atish Kumar Patra wrote: > On Tue, Mar 12, 2024 at 6:53 AM Fei Wu wrote: >> >> The RISC-V Server Platform specification[1] defines a standardized set >> of hardware and software capabilities, that portable system software, >> such as OS and hy

[RFC v2 2/2] hw/riscv: Add server platform reference machine

2024-03-12 Thread Fei Wu
- PCIe AHCI - PCIe NIC - No virtio device - No fw_cfg device - No ACPI table provided - Only minimal device tree nodes [1] https://github.com/riscv-non-isa/riscv-server-platform Signed-off-by: Fei Wu --- configs/devices/riscv64-softmmu/default.mak |1 + hw/riscv/Kconfig

[RFC v2 1/2] target/riscv: Add server platform reference cpu

2024-03-12 Thread Fei Wu
/server_platform_requirements.adoc Signed-off-by: Fei Wu --- target/riscv/cpu-qom.h | 1 + target/riscv/cpu.c | 61 ++ 2 files changed, 62 insertions(+) diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h index 3670cfe6d9..adb934d19e 100644 --- a/target/riscv/cpu-qom.h

[RFC v2 0/2] Add RISC-V Server Platform Reference Board

2024-03-12 Thread Fei Wu
definition the 1st patch - replace sifive_test with power reset syscon - add versioning scheme to fdt - integrate recent changes in virt.c - use g_autofree - create_fdt/finalize_fdt - riscv_isa_write_fdt - some cleanups Fei Wu (2): target/riscv: Add server platform reference cpu hw/riscv

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-12 Thread Wu, Fei
On 3/8/2024 3:15 AM, Daniel Henrique Barboza wrote: > > > On 3/7/24 04:36, Wu, Fei wrote: >> On 3/6/2024 9:26 PM, Wu, Fei wrote: >>> On 3/5/2024 1:58 PM, Wu, Fei wrote: >>>> On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: >>>>> >>

Re: [RFC 0/2] Add RISC-V Server Platform Reference Board

2024-03-12 Thread Wu, Fei
On 3/8/2024 6:15 AM, Marcin Juszkiewicz wrote: > W dniu 4.03.2024 o 11:25, Fei Wu pisze: > >> The RISC-V Server Platform specification[1] defines a standardized >> set of hardware and software capabilities, that portable system >> software, such as OS and hypervisors can

Re: [RISC-V][tech-server-platform] [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-11 Thread Wu, Fei
On 3/8/2024 5:20 PM, Andrew Jones wrote: > On Thu, Mar 07, 2024 at 02:26:18PM +0800, Wu, Fei wrote: >> On 3/7/2024 8:48 AM, Alistair Francis wrote: >>> On Thu, Mar 7, 2024 at 5:13 AM Atish Kumar Patra >>> wrote: >>>> >>>> On Wed, Mar 6, 2024 a

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-06 Thread Wu, Fei
On 3/6/2024 9:26 PM, Wu, Fei wrote: > On 3/5/2024 1:58 PM, Wu, Fei wrote: >> On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: >>> >>> >>> On 3/4/24 07:25, Fei Wu wrote: >>>> The harts requirements of RISC-V server platform [1] require RVA

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-06 Thread Wu, Fei
On 3/7/2024 8:48 AM, Alistair Francis wrote: > On Thu, Mar 7, 2024 at 5:13 AM Atish Kumar Patra wrote: >> >> On Wed, Mar 6, 2024 at 4:56 AM Wu, Fei wrote: >>> >>> On 3/6/2024 8:19 AM, Alistair Francis wrote: >>>> On Mon, Mar 4, 2024 at 8:28 PM

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-06 Thread Wu, Fei
On 3/5/2024 1:58 PM, Wu, Fei wrote: > On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: >> >> >> On 3/4/24 07:25, Fei Wu wrote: >>> The harts requirements of RISC-V server platform [1] require RVA23 ISA >>> profile support, plus Sv48, Svadu, H, Sscofmpf

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-06 Thread Wu, Fei
On 3/6/2024 8:19 AM, Alistair Francis wrote: > On Mon, Mar 4, 2024 at 8:28 PM Fei Wu wrote: >> >> The RISC-V Server Platform specification[1] defines a standardized set >> of hardware and software capabilities, that portable system software, >> such as OS and hypervisor

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-05 Thread Wu, Fei
Hi Conor, On 3/6/2024 8:27 AM, Conor Dooley wrote: > On Mon, Mar 04, 2024 at 06:25:39PM +0800, Fei Wu wrote: > >> +name = riscv_isa_string(cpu_ptr); >> +qemu_fdt_setprop_string(ms->fdt, cpu_name, "riscv,isa", name); >> +g_free(name)

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-04 Thread Wu, Fei
On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: > > > On 3/4/24 07:25, Fei Wu wrote: >> The harts requirements of RISC-V server platform [1] require RVA23 ISA >> profile support, plus Sv48, Svadu, H, Sscofmpf etc. This patch provides >> a virt CPU type (rvsp-re

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-04 Thread Wu, Fei
On 3/5/2024 3:35 AM, Daniel Henrique Barboza wrote: > > > On 3/4/24 07:25, Fei Wu wrote: >> The RISC-V Server Platform specification[1] defines a standardized set >> of hardware and software capabilities, that portable system software, >> such as OS and hypervisors can

[RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-04 Thread Fei Wu
/server_platform_requirements.adoc Signed-off-by: Fei Wu --- hw/riscv/server_platform_ref.c | 6 +++- target/riscv/cpu-qom.h | 1 + target/riscv/cpu.c | 62 ++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/hw/riscv/server_platform_ref.c b/hw/riscv

[RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-04 Thread Fei Wu
- PCIe AHCI - PCIe NIC - No virtio device - No fw_cfg device - No ACPI table provided - Only minimal device tree nodes [1] https://github.com/riscv-non-isa/riscv-server-platform Signed-off-by: Fei Wu --- configs/devices/riscv64-softmmu/default.mak |1 + hw/riscv/Kconfig

[RFC 0/2] Add RISC-V Server Platform Reference Board

2024-03-04 Thread Fei Wu
-II platform (WIP) is needed to provide related ACPI tables. For testing purposes only, we used a workaround to generate the ACPI tables in Qemu with a dedicated downstream patch. [1] https://github.com/riscv-non-isa/riscv-server-platform [2] https://github.com/tianocore/edk2.git Fei Wu (2): hw

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Wu, Fei
On 9/7/2023 11:46 PM, Anup Patel wrote: > On Tue, Aug 1, 2023 at 4:16 AM Daniel Henrique Barboza > wrote: >> >> >> >> On 7/30/23 22:53, Fei Wu wrote: >>> riscv virt platform's memory started at 0x8000 and >>> straddled the 4GiB boundary.

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-09-07 Thread Wu, Fei
On 9/7/2023 5:10 PM, Eric Auger wrote: > Hi, > > On 9/7/23 09:16, Philippe Mathieu-Daudé wrote: >> Widening Cc to ARM/VFIO. >> >> On 4/8/23 11:15, Wu, Fei wrote: >>> On 8/3/2023 11:07 PM, Andrew Jones wrote: >>>> On Mon, Jul 31, 2023 at 09:53:17AM

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-08-04 Thread Wu, Fei
On 8/3/2023 11:07 PM, Andrew Jones wrote: > On Mon, Jul 31, 2023 at 09:53:17AM +0800, Fei Wu wrote: >> riscv virt platform's memory started at 0x8000 and >> straddled the 4GiB boundary. Curiously enough, this choice >> of a memory layout will prevent from launching a

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-08-02 Thread Wu, Fei
On 8/1/2023 6:46 AM, Daniel Henrique Barboza wrote: > > > On 7/30/23 22:53, Fei Wu wrote: >> riscv virt platform's memory started at 0x8000 and >> straddled the 4GiB boundary. Curiously enough, this choice >> of a memory layout will prevent from launching a VM

Re: [PATCH] hw/riscv: split RAM into low and high memory

2023-07-31 Thread Wu, Fei
On 8/1/2023 6:46 AM, Daniel Henrique Barboza wrote: > > > On 7/30/23 22:53, Fei Wu wrote: >> riscv virt platform's memory started at 0x8000 and >> straddled the 4GiB boundary. Curiously enough, this choice >> of a memory layout will prevent from launching a VM

[PATCH] hw/riscv: split RAM into low and high memory

2023-07-30 Thread Fei Wu
n x86, and these (APIC/IOAPIC) live right below 4GiB. So just split the RAM range into two portions: - 1 GiB range from 0x8000 to 0xc000. - The remainder at 0x1 ...leaving a hole between the ranges. Signed-off-by: Andrei Warkentin Signed-off-by: Fei Wu --- hw/riscv/virt.c

Re: [PATCH v16 0/9] TCG code quality tracking

2023-07-03 Thread Wu, Fei
On 6/28/2023 8:04 PM, Fei Wu wrote: > v16 > -- > * rebase to latest commit 4329d049d (Jun 26) > * original patch 1 (remove CONFIG_PROFILER) has already upstreamed so is > removed from here Hi Richard, As CONFIG_PROFILER has been removed in upstream, could you please take a loo

[PATCH v16 5/9] tb-stats: reset the tracked TBs on a tb_flush

2023-06-28 Thread Fei Wu
Henderson Signed-off-by: Fei Wu --- accel/tcg/tb-maint.c| 1 + accel/tcg/tb-stats.c| 18 ++ include/exec/tb-stats.h | 8 3 files changed, 27 insertions(+) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 264bdd84b3..1ebe6fc60e 100644 --- a/accel/tcg/tb

[PATCH v16 6/9] tb-stats: Adding info [tb-list|tb] commands to HMP

2023-06-28 Thread Fei Wu
ned-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-10-vanderson...@gmail.com> [AJB: fix authorship, dropped coverset] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 112 accel/tcg/tb-st

[PATCH v16 2/9] accel: collecting TB execution count

2023-06-28 Thread Fei Wu
..@gmail.com> [AJB: Fix author] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/cpu-exec.c| 6 ++ accel/tcg/tb-stats.c| 18 ++ accel/tcg/tcg-runtime.c | 1 + accel/tcg/translate-all.c | 6 -- accel/tcg/

[PATCH v16 4/9] monitor: adding tb_stats hmp command

2023-06-28 Thread Fei Wu
authorship] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 98 +++ accel/tcg/tb-stats.c | 17 ++ hmp-commands.hx | 16 ++ include/exec/tb-stats-flags.h | 1 + include/exec/tb-stats.h |

[PATCH v16 9/9] docs: add tb-stats how to

2023-06-28 Thread Fei Wu
Signed-off-by: Fei Wu --- docs/devel/index-tcg.rst | 1 + docs/devel/tcg-tbstats.rst | 126 + 2 files changed, 127 insertions(+) create mode 100644 docs/devel/tcg-tbstats.rst diff --git a/docs/devel/index-tcg.rst b/docs/devel/index-tcg.rst index

[PATCH v16 8/9] tb-stats: dump hot TBs at the end of the execution

2023-06-28 Thread Fei Wu
Dump the hottest TBs if -d tb_stats_{all,jit,exec}[:dump_num_at_exit] --- accel/tcg/tb-stats.c | 21 + include/exec/tb-stats-dump.h | 21 + include/exec/tb-stats-flags.h | 1 + linux-user/exit.c | 2 ++ softmmu/runstate.c|

[PATCH v16 7/9] debug: add -d tb_stats to control TBStatistics

2023-06-28 Thread Fei Wu
Capture TBS at startup instead of an explicit 'tb_stats start' command. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- include/exec/tb-stats-flags.h | 1 + include/qemu/log.h| 1 + stubs/meson.build | 1 +

[PATCH v16 3/9] accel/tcg: add jit stats to TBStatistics

2023-06-28 Thread Fei Wu
This collects all the statistics for TBStatistics, not only for the whole emulation but for each TB. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 6 +++ accel/tcg/tb-stats.c | 69

[PATCH v16 1/9] accel/tcg: introduce TBStatistics structure

2023-06-28 Thread Fei Wu
o have all present and future qemu/tcg statistics and meta-data stored in this new structure. Reviewed-by: Alex Bennée Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-2-vanderson...@gmail.com> [AJB: fix git author, review comments] Signed-off-by: Alex Bennée Signe

[PATCH v16 0/9] TCG code quality tracking

2023-06-28 Thread Fei Wu
logs and documents * small change to do_hmp_tbstats_safe() to avoid memory leaking Alex Bennée (1): tb-stats: reset the tracked TBs on a tb_flush Fei Wu (4): accel/tcg: add jit stats to TBStatistics debug: add -d tb_stats to control TBStatistics tb-stats: dump hot TBs at the end of the

Re: [PATCH v15 00/10] TCG code quality tracking

2023-06-15 Thread Wu, Fei
On 6/13/2023 11:29 AM, Wu, Fei wrote: > On 6/7/2023 8:24 PM, Fei Wu wrote: >> v15 >> --- >> This is a large change: >> * remove all time related stuffs, including cmd 'info profile' >> * remove the per-TB flag, use global flag instead >> * remove

Re: [PATCH v15 00/10] TCG code quality tracking

2023-06-12 Thread Wu, Fei
On 6/7/2023 8:24 PM, Fei Wu wrote: > v15 > --- > This is a large change: > * remove all time related stuffs, including cmd 'info profile' > * remove the per-TB flag, use global flag instead > * remove tb_stats pause/filter, but add status > * remove qemu_log changes,

Re: [PATCH v15 00/10] TCG code quality tracking

2023-06-12 Thread Wu, Fei
On 6/7/2023 8:24 PM, Fei Wu wrote: > v15 > --- > This is a large change: > * remove all time related stuffs, including cmd 'info profile' > * remove the per-TB flag, use global flag instead > * remove tb_stats pause/filter, but add status > * remove qemu_log changes,

Re: [PATCH v15 07/10] tb-stats: Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-12 Thread Wu, Fei
On 6/12/2023 3:17 PM, Richard Henderson wrote: > On 6/12/23 03:44, Wu, Fei wrote: >> On 6/7/2023 8:24 PM, Fei Wu wrote: >>> +void hmp_info_tb(Monitor *mon, const QDict *qdict) >>> +{ >>> +    const int id = qdict_get_int(qdict, "id");

Re: [PATCH v15 07/10] tb-stats: Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-11 Thread Wu, Fei
On 6/7/2023 8:24 PM, Fei Wu wrote: > +void hmp_info_tb(Monitor *mon, const QDict *qdict) > +{ > +const int id = qdict_get_int(qdict, "id"); > +g_autoptr(GString) buf = g_string_new(""); > + > +if (!tcg_enabled()) { > +monitor_pri

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-11 Thread Wu, Fei
On 6/9/2023 11:51 PM, Peter Maydell wrote: > On Fri, 9 Jun 2023 at 15:32, Wu, Fei wrote: >> >> On 6/8/2023 5:23 PM, Peter Maydell wrote: >>> On Thu, 8 Jun 2023 at 08:44, Wu, Fei wrote: >>>> Is there any existing function to convert ram_addr_t to guest pa?

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-09 Thread Wu, Fei
On 6/8/2023 5:23 PM, Peter Maydell wrote: > On Thu, 8 Jun 2023 at 08:44, Wu, Fei wrote: >> >> On 6/7/2023 8:49 PM, Wu, Fei wrote: >>> On 6/1/2023 10:40 AM, Richard Henderson wrote: >>>> Did you really need something different than monitor_disas? You almost

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-08 Thread Wu, Fei
On 6/7/2023 8:49 PM, Wu, Fei wrote: > On 6/1/2023 10:40 AM, Richard Henderson wrote: >>> +static int >>> +__attribute__((format(printf, 2, 3))) >>> +fprintf_log(FILE *a, const char *b, ...) >>> +{ >>> +    va_list ap; >>> +    va_start(ap, b

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-07 Thread Wu, Fei
not re-gen the code for userspace virtual address (guest kernel panic on riscv guest). I tried monitor_disas() but it failed to disas too: monitor_disas(mon, mon_get_cpu(mon), tbs->phys_pc, num_inst, true); How to use this function correctly? Thanks, Fei. >> +void qemu_log_to_monito

[PATCH v15 06/10] tb-stats: reset the tracked TBs on a tb_flush

2023-06-07 Thread Fei Wu
Henderson Signed-off-by: Fei Wu --- accel/tcg/tb-maint.c| 1 + accel/tcg/tb-stats.c| 18 ++ include/exec/tb-stats.h | 8 3 files changed, 27 insertions(+) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 0980fca358..11ff0ddd90 100644 --- a/accel/tcg/tb

[PATCH v15 05/10] monitor: adding tb_stats hmp command

2023-06-07 Thread Fei Wu
authorship] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 100 ++ accel/tcg/tb-stats.c | 17 ++ hmp-commands.hx | 16 ++ include/exec/tb-stats-flags.h | 1 + include/exec/tb-stats.h |

[PATCH v15 04/10] accel/tcg: add jit stats to TBStatistics

2023-06-07 Thread Fei Wu
This collects all the statistics for TBStatistics, not only for the whole emulation but for each TB. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 6 +++ accel/tcg/tb-stats.c | 69

[PATCH v15 10/10] docs: add tb-stats how to

2023-06-07 Thread Fei Wu
Signed-off-by: Fei Wu --- docs/devel/tcg-tbstats.rst | 97 ++ 1 file changed, 97 insertions(+) create mode 100644 docs/devel/tcg-tbstats.rst diff --git a/docs/devel/tcg-tbstats.rst b/docs/devel/tcg-tbstats.rst new file mode 100644 index 00

[PATCH v15 01/10] accel/tcg: remove CONFIG_PROFILER

2023-06-07 Thread Fei Wu
TBStats will be introduced to replace CONFIG_PROFILER totally, here remove all CONFIG_PROFILER related stuffs first. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu Reviewed-by: Richard Henderson --- accel/tcg/monitor.c | 31 - accel/tcg

[PATCH v15 08/10] debug: add -d tb_stats to control TBStatistics

2023-06-07 Thread Fei Wu
Capture TBS at startup instead of an explicit 'tb_stats start' command. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- include/exec/tb-stats-flags.h | 1 + include/qemu/log.h| 1 + stubs/meson.build | 1 +

[PATCH v15 02/10] accel/tcg: introduce TBStatistics structure

2023-06-07 Thread Fei Wu
o have all present and future qemu/tcg statistics and meta-data stored in this new structure. Reviewed-by: Alex Bennée Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-2-vanderson...@gmail.com> [AJB: fix git author, review comments] Signed-off-by: Alex Bennée Signe

[PATCH v15 09/10] tb-stats: dump hot TBs at the end of the execution

2023-06-07 Thread Fei Wu
Dump the hottest TBs if -d tb_stats_{all,jit,exec}[:dump_num_at_exit] --- accel/tcg/tb-stats.c | 21 + include/exec/tb-stats-dump.h | 21 + include/exec/tb-stats-flags.h | 1 + linux-user/exit.c | 2 ++ softmmu/runstate.c|

[PATCH v15 07/10] tb-stats: Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-07 Thread Fei Wu
- Acked-by: Dr. David Alan Gilbert Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-10-vanderson...@gmail.com> [AJB: fix authorship, dropped coverset] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 69 accel/tc

[PATCH v15 00/10] TCG code quality tracking

2023-06-07 Thread Fei Wu
g * remove async_safe_run_on_cpu for cmd info tb-list & tb * use monitor_disas instead of regenerate TB, but **doesn't work yet** * other cleanups Alex Bennée (1): tb-stats: reset the tracked TBs on a tb_flush Fei Wu (5): accel/tcg: remove CONFIG_PROFILER accel/tcg: add jit stats to TBStat

[PATCH v15 03/10] accel: collecting TB execution count

2023-06-07 Thread Fei Wu
..@gmail.com> [AJB: Fix author] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/cpu-exec.c | 6 ++ accel/tcg/tb-stats.c | 18 ++ accel/tcg/tcg-runtime.c | 1 + accel/tcg/translate-all.c | 6 -- accel/tc

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-06 Thread Wu, Fei
On 6/1/2023 8:12 PM, Wu, Fei wrote: > On 6/1/2023 10:40 AM, Richard Henderson wrote: >> On 5/30/23 01:35, Fei Wu wrote: >>> +static void do_dump_tbs_info(int total, int sort_by) >>> +{ >>> +    id = 1; >>> +    GList *i; >>> +    int

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-06-01 Thread Wu, Fei
On 6/1/2023 10:03 PM, Richard Henderson wrote: > On 5/31/23 22:44, Wu, Fei wrote: >> On 6/1/2023 8:05 AM, Richard Henderson wrote: >>> On 5/30/23 01:35, Fei Wu wrote: >>>> From: "Vanderson M. do Rosario" >>>> >>>> If a TB has a

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-06-01 Thread Wu, Fei
On 6/1/2023 7:51 PM, Alex Bennée wrote: > > "Wu, Fei" writes: > >> On 5/30/2023 6:08 PM, Alex Bennée wrote: >>> >>> "Wu, Fei" writes: >>> >>>> On 5/30/2023 1:01 PM, Wu, Fei wrote: >>>>&

Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-06-01 Thread Wu, Fei
On 6/1/2023 10:40 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +static void do_dump_tbs_info(int total, int sort_by) >> +{ >> +    id = 1; >> +    GList *i; >> +    int count = total; >> + >> +    g_list_free(last_search); >

Re: [PATCH v14 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:30 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> diff --git a/accel/tcg/tb-stats.c b/accel/tcg/tb-stats.c >> index 805e1fc74d..139f049ffc 100644 >> --- a/accel/tcg/tb-stats.c >> +++ b/accel/tcg/tb-stats.c >> @@ -267,6 +267,25 @@

Re: [PATCH v14 06/10] monitor: adding tb_stats hmp command

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:23 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >> Adding tb_stats [start|pause|stop|filter] command to hmp. >> This allows controlling the collection of statistics. >> It is also poss

Re: [PATCH v14 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-06-01 Thread Wu, Fei
On 6/1/2023 9:18 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >>   -d tb_stats[[,level=(+all+jit+exec+time)][,dump_limit=]] >> >> "dump_limit" is used to limit the number of dumped TBStats

Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-31 Thread Wu, Fei
On 6/1/2023 9:08 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +static void collect_jit_profile_info(void *p, uint32_t hash, void >> *userp) >> +{ >> +    struct jit_profile_info *jpi = userp; >> +    TBStatistics *tbs = p; >

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-05-31 Thread Wu, Fei
On 6/1/2023 8:05 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> From: "Vanderson M. do Rosario" >> >> If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS >> enabled, then we instrument the start code of this TB >> to atomical

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 12:16 PM, Richard Henderson wrote: > On 5/31/23 20:19, Wu, Fei wrote: >> On 6/1/2023 8:01 AM, Richard Henderson wrote: >>> On 5/30/23 01:35, Fei Wu wrote: >>>> +/* TBStatistic collection controls */ >>>> +enum TBStatsStatus { >>>>

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 8:01 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +/* TBStatistic collection controls */ >> +enum TBStatsStatus { >> +    TB_STATS_DISABLED = 0, >> +    TB_STATS_RUNNING, >> +    TB_STATS_PAUSED, >> +    TB_STATS_STOPPED

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-31 Thread Wu, Fei
On 6/1/2023 7:59 AM, Richard Henderson wrote: > On 5/30/23 01:35, Fei Wu wrote: >> +    /* >> + * We want to fetch the stats structure before we start code >> + * generation so we can count interesting things about this >> + * generat

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-30 Thread Wu, Fei
On 5/30/2023 6:08 PM, Alex Bennée wrote: > > "Wu, Fei" writes: > >> On 5/30/2023 1:01 PM, Wu, Fei wrote: >>> On 5/30/2023 12:07 PM, Richard Henderson wrote: >>>> On 5/29/23 04:49, Fei Wu wrote: >>>>> +/* >>>>> + * Th

Re: [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-30 Thread Wu, Fei
On 5/30/2023 5:37 PM, Markus Armbruster wrote: > Fei Wu writes: > >> This collects all the statistics for TBStatistics, not only for the >> whole emulation but for each TB. >> >> Signed-off-by: Vanderson M. do Rosario >> Signed-off-by: Alex Bennée >> S

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-30 Thread Wu, Fei
On 5/30/2023 6:08 PM, Alex Bennée wrote: > > "Wu, Fei" writes: > >> On 5/30/2023 1:01 PM, Wu, Fei wrote: >>> On 5/30/2023 12:07 PM, Richard Henderson wrote: >>>> On 5/29/23 04:49, Fei Wu wrote: >>>>> +/* >>>>> + * Th

[PATCH v14 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-05-30 Thread Fei Wu
ts -d tb_stats,level=jit+time -d tb_stats,dump_limit=15 ... Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-7-vanderson...@gmail.com> [AJB: fix authorship, reword title] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/tb-stats.c | 5 +

[PATCH v14 06/10] monitor: adding tb_stats hmp command

2023-05-30 Thread Fei Wu
...@gmail.com> Message-Id: <20190829173437.5926-9-vanderson...@gmail.com> [AJB: fix authorship] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 45 + accel/tcg/tb-stats.c | 121 +- hmp-commands.

[PATCH v14 09/10] tb-stats: dump hot TBs at the end of the execution

2023-05-30 Thread Fei Wu
000ec1cb (id:13) Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-12-vanderson...@gmail.com> [AJB: fix authorship, ad softmmu support] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/tb-stats.c | 21 + include/e

[PATCH v14 10/10] docs: add tb-stats how to

2023-05-30 Thread Fei Wu
Signed-off-by: Fei Wu --- docs/devel/tcg-tbstats.rst | 129 + 1 file changed, 129 insertions(+) create mode 100644 docs/devel/tcg-tbstats.rst diff --git a/docs/devel/tcg-tbstats.rst b/docs/devel/tcg-tbstats.rst new file mode 100644 index 00

[PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-30 Thread Fei Wu
This collects all the statistics for TBStatistics, not only for the whole emulation but for each TB. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 20 - accel/tcg/tb-stats.c | 146

[PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-05-30 Thread Fei Wu
- Acked-by: Dr. David Alan Gilbert Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-10-vanderson...@gmail.com> [AJB: fix authorship, dropped coverset] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 54 ++

[PATCH v14 02/10] accel/tcg: introduce TBStatistics structure

2023-05-30 Thread Fei Wu
o have all present and future qemu/tcg statistics and meta-data stored in this new structure. Reviewed-by: Alex Bennée Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-2-vanderson...@gmail.com> [AJB: fix git author, review comments] Signed-off-by: Alex Bennée Signe

[PATCH v14 01/10] accel/tcg: remove CONFIG_PROFILER

2023-05-30 Thread Fei Wu
TBStats will be introduced to replace CONFIG_PROFILER totally, here remove all CONFIG_PROFILER related stuffs first. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu Reviewed-by: Richard Henderson --- accel/tcg/monitor.c | 25 accel/tcg

[PATCH v14 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-05-30 Thread Fei Wu
Henderson Signed-off-by: Fei Wu --- accel/tcg/tb-maint.c| 1 + accel/tcg/tb-stats.c| 19 +++ include/exec/tb-stats.h | 8 3 files changed, 28 insertions(+) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 0980fca358..11ff0ddd90 100644 --- a/accel/tcg

[PATCH v14 03/10] accel: collecting TB execution count

2023-05-30 Thread Fei Wu
..@gmail.com> [AJB: Fix author] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/cpu-exec.c | 6 ++ accel/tcg/tb-stats.c | 6 ++ accel/tcg/tcg-runtime.c | 1 + accel/tcg/translate-all.c | 7 +-- accel/tcg/translator.c| 25

[PATCH v14 00/10] TCG code quality tracking

2023-05-30 Thread Fei Wu
v14 --- * cleanup TCGProfile in patch 04 Alex Bennée (1): tb-stats: reset the tracked TBs on a tb_flush Fei Wu (3): accel/tcg: remove CONFIG_PROFILER accel/tcg: add jit stats and time to TBStatistics docs: add tb-stats how to Vanderson M. do Rosario (6): accel/tcg: introduce

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-29 Thread Wu, Fei
On 5/30/2023 1:01 PM, Wu, Fei wrote: > On 5/30/2023 12:07 PM, Richard Henderson wrote: >> On 5/29/23 04:49, Fei Wu wrote: >>> +/* >>> + * The TCGProfile structure holds data for analysing the quality of >>> + * the code generation. The data is split between

Re: [PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-29 Thread Wu, Fei
On 5/30/2023 12:07 PM, Richard Henderson wrote: > On 5/29/23 04:49, Fei Wu wrote: >> +/* >> + * The TCGProfile structure holds data for analysing the quality of >> + * the code generation. The data is split between stuff that is valid >> + * for the lifetime of a single

[PATCH v13 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-05-29 Thread Fei Wu
Henderson Signed-off-by: Fei Wu --- accel/tcg/tb-maint.c| 1 + accel/tcg/tb-stats.c| 19 +++ include/exec/tb-stats.h | 8 3 files changed, 28 insertions(+) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 0980fca358..11ff0ddd90 100644 --- a/accel/tcg

[PATCH v13 02/10] accel/tcg: introduce TBStatistics structure

2023-05-29 Thread Fei Wu
o have all present and future qemu/tcg statistics and meta-data stored in this new structure. Reviewed-by: Alex Bennée Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-2-vanderson...@gmail.com> [AJB: fix git author, review comments] Signed-off-by: Alex Bennée Signe

[PATCH v13 10/10] docs: add tb-stats how to

2023-05-29 Thread Fei Wu
Signed-off-by: Fei Wu --- docs/devel/tcg-tbstats.rst | 129 + 1 file changed, 129 insertions(+) create mode 100644 docs/devel/tcg-tbstats.rst diff --git a/docs/devel/tcg-tbstats.rst b/docs/devel/tcg-tbstats.rst new file mode 100644 index 00

[PATCH v13 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-05-29 Thread Fei Wu
- Acked-by: Dr. David Alan Gilbert Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-10-vanderson...@gmail.com> [AJB: fix authorship, dropped coverset] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 54 ++

[PATCH v13 09/10] tb-stats: dump hot TBs at the end of the execution

2023-05-29 Thread Fei Wu
000ec1cb (id:13) Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-12-vanderson...@gmail.com> [AJB: fix authorship, ad softmmu support] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/tb-stats.c | 21 + include/e

[PATCH v13 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-05-29 Thread Fei Wu
ts -d tb_stats,level=jit+time -d tb_stats,dump_limit=15 ... Signed-off-by: Vanderson M. do Rosario Message-Id: <20190829173437.5926-7-vanderson...@gmail.com> [AJB: fix authorship, reword title] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/tb-stats.c | 5 +

[PATCH v13 06/10] monitor: adding tb_stats hmp command

2023-05-29 Thread Fei Wu
...@gmail.com> Message-Id: <20190829173437.5926-9-vanderson...@gmail.com> [AJB: fix authorship] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 45 + accel/tcg/tb-stats.c | 121 +- hmp-commands.

[PATCH v13 01/10] accel/tcg: remove CONFIG_PROFILER

2023-05-29 Thread Fei Wu
TBStats will be introduced to replace CONFIG_PROFILER totally, here remove all CONFIG_PROFILER related stuffs first. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 25 accel/tcg/tcg-accel-ops.c | 10

[PATCH v13 00/10] TCG code quality tracking

2023-05-29 Thread Fei Wu
on a tb_flush Fei Wu (3): accel/tcg: remove CONFIG_PROFILER accel/tcg: add jit stats and time to TBStatistics docs: add tb-stats how to Vanderson M. do Rosario (6): accel/tcg: introduce TBStatistics structure accel: collecting TB execution count debug: add -d tb_stats to co

[PATCH v13 03/10] accel: collecting TB execution count

2023-05-29 Thread Fei Wu
..@gmail.com> [AJB: Fix author] Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/cpu-exec.c | 6 ++ accel/tcg/tb-stats.c | 6 ++ accel/tcg/tcg-runtime.c | 1 + accel/tcg/translate-all.c | 7 +-- accel/tcg/translator.c| 25

[PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-29 Thread Fei Wu
This collects all the statistics for TBStatistics, not only for the whole emulation but for each TB. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 20 - accel/tcg/tb-stats.c | 146

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-25 Thread Wu, Fei
On 5/25/2023 1:02 AM, Richard Henderson wrote: > On 5/24/23 06:35, Wu, Fei wrote: >> On 5/23/2023 8:45 AM, Richard Henderson wrote: >>> On 5/18/23 06:57, Fei Wu wrote: >>>> +void HELPER(inc_exec_freq)(void *ptr) >>>> +{ >>&g

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-24 Thread Wu, Fei
On 5/25/2023 1:02 AM, Richard Henderson wrote: > On 5/24/23 06:35, Wu, Fei wrote: >> On 5/23/2023 8:45 AM, Richard Henderson wrote: >>> On 5/18/23 06:57, Fei Wu wrote: >>>> +void HELPER(inc_exec_freq)(void *ptr) >>>> +{ >>&g

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-24 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-23 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-22 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal

Re: [PATCH v12 15/15] docs/tb-stats: add how to

2023-05-22 Thread Wu, Fei
On 5/22/2023 6:25 PM, Thomas Huth wrote: > On 18/05/2023 15.57, Fei Wu wrote: >> Signed-off-by: Fei Wu >> --- >>   docs/tb-stats.txt | 116 ++ > > I'd suggest to add this file in the docs/devel folder instead, and may

[PATCH] Makefile: add file entry to ctags

2023-05-18 Thread Fei Wu
It's more convenient to jump among files with --extra=+fq. Signed-off-by: Fei Wu --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3c7d67142f..ffb3bcd4f4 100644 --- a/Makefile +++ b/Makefile @@ -239,8 +239,8 @@

  1   2   3   4   5   >