qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 2e2097: *-user: remove the guest_user_syscall


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 2e2097: *-user: remove the guest_user_syscall tracepoints
Date: Thu, 01 Jun 2023 08:31:26 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 2e2097b495990b198c45dd8ecde8cc58ae3fcd1f
      
https://github.com/qemu/qemu/commit/2e2097b495990b198c45dd8ecde8cc58ae3fcd1f
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M bsd-user/freebsd/os-syscall.c
    M include/user/syscall-trace.h
    M trace-events

  Log Message:
  -----------
  *-user: remove the guest_user_syscall tracepoints

This is pure duplication now. Both bsd-user and linux-user have
builtin strace support and we can also track syscalls via the plugins
system.

Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-2-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-2-alex.bennee@linaro.org>
[Remove unused variable in do_freebsd_syscall() reported by Richard
Henderson.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 78f314cf8349a76a757dbcc4da88bf9a0b20d3a1
      
https://github.com/qemu/qemu/commit/78f314cf8349a76a757dbcc4da88bf9a0b20d3a1
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M hw/core/cpu-common.c
    M hw/core/trace-events
    M trace-events
    M trace/control-target.c
    M trace/control.c

  Log Message:
  -----------
  trace-events: remove the remaining vcpu trace events

While these are all in helper functions being designated vcpu events
complicates the removal of the dynamic vcpu state code. TCG plugins
allow you to instrument vcpu_[init|exit|idle].

We rename cpu_reset and make it a normal trace point.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-3-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-3-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 710320137099b8d86cedb4f58de2455acd58cbde
      
https://github.com/qemu/qemu/commit/710320137099b8d86cedb4f58de2455acd58cbde
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M scripts/tracetool/format/c.py
    M scripts/tracetool/format/h.py
    M trace/control-internal.h
    M trace/control.c
    M trace/event-internal.h

  Log Message:
  -----------
  trace: remove vcpu_id from the TraceEvent structure

This does involve temporarily stubbing out some helper functions
before we excise the rest of the code.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-4-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-4-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 9deb999305ef11d1f06a909b29ab625476091552
      
https://github.com/qemu/qemu/commit/9deb999305ef11d1f06a909b29ab625476091552
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M scripts/qapi/gen.py

  Log Message:
  -----------
  scripts/qapi: document the tool that generated the file

This makes it a little easier for developers to find where things
where being generated.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-5-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-5-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 1a8fc85019a49bdc571f57b597198d7503a273f8
      
https://github.com/qemu/qemu/commit/1a8fc85019a49bdc571f57b597198d7503a273f8
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M docs/about/deprecated.rst

  Log Message:
  -----------
  docs/deprecated: move QMP events bellow QMP command section

Also rename the section to make the fact this is part of the
management protocol even clearer.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-6-alex.bennee@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 5485e52a332c3b38e338081a7275b2c7cb4f0813
      
https://github.com/qemu/qemu/commit/5485e52a332c3b38e338081a7275b2c7cb4f0813
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M docs/about/deprecated.rst
    M qapi/trace.json

  Log Message:
  -----------
  qapi: make the vcpu parameters deprecated for 8.1

I don't think I can remove the parameters directly but certainly mark
them as deprecated.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-7-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-6-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 89aafcf2a79307b7d658b174e2d649dd63365bd1
      
https://github.com/qemu/qemu/commit/89aafcf2a79307b7d658b174e2d649dd63365bd1
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M hw/core/cpu-common.c
    M stubs/trace-control.c
    M trace/control-internal.h
    M trace/control-target.c
    M trace/control-vcpu.h
    M trace/control.c
    M trace/control.h
    M trace/qmp.c
    M trace/trace-hmp-cmds.c

  Log Message:
  -----------
  trace: remove code that depends on setting vcpu

Now we no longer have any events that are for vcpus we can start
excising the code from the trace control. As the vcpu parameter is
encoded as part of QMP we just stub out the has_vcpu/vcpu parameters
rather than alter the API.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-8-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-7-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 333df1c6c7a388ddccaaa041b4fa2ce565d1255e
      
https://github.com/qemu/qemu/commit/333df1c6c7a388ddccaaa041b4fa2ce565d1255e
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M scripts/tracetool/format/h.py
    R trace/control-vcpu.h
    M trace/qmp.c

  Log Message:
  -----------
  trace: remove control-vcpu.h

Now we no longer have vcpu controlled trace events we can excise the
code that allows us to query its status.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-9-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-8-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: d0aaf08bb9453c12ab33bd5defa1815c34460595
      
https://github.com/qemu/qemu/commit/d0aaf08bb9453c12ab33bd5defa1815c34460595
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M accel/tcg/tb-hash.h
    M accel/tcg/tb-maint.c
    M accel/tcg/translate-all.c
    M include/exec/exec-all.h
    M include/hw/core/cpu.h

  Log Message:
  -----------
  tcg: remove the final vestiges of dstate

Now we no longer have dynamic state affecting things we can remove the
additional fields in cpu.h and simplify the TB hash calculation.

For the benchmark:

    hyperfine -w 2 -m 20 \
      "./arm-softmmu/qemu-system-arm -cpu cortex-a15 \
        -machine type=virt,highmem=off \
        -display none -m 2048 \
        -serial mon:stdio \
        -netdev user,id=unet,hostfwd=tcp::2222-:22 \
        -device virtio-net-pci,netdev=unet \
        -device virtio-scsi-pci \
        -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf
 \
        -device scsi-hd,drive=hd -smp 4 \
        -kernel /home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage \
        -append 'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' 
\
        -snapshot"

It has a marginal effect on runtime, before:

  Time (mean ± σ):     26.279 s ±  2.438 s    [User: 41.113 s, System: 1.843 s]
  Range (min … max):   24.420 s … 32.565 s    20 runs

after:

  Time (mean ± σ):     24.440 s ±  2.885 s    [User: 34.474 s, System: 2.028 s]
  Range (min … max):   21.663 s … 29.937 s    20 runs

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1358
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-10-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-9-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 80106bc5f906ef965c397515772cc9d3955e6d2a
      
https://github.com/qemu/qemu/commit/80106bc5f906ef965c397515772cc9d3955e6d2a
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M hw/9pfs/9p.c

  Log Message:
  -----------
  hw/9pfs: use qemu_xxhash4

No need to pass zeros as we have helpers that do that for us.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230526165401.574474-11-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-10-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 367189efae8b53ec2ade37a1c079fd8f69244b9e
      
https://github.com/qemu/qemu/commit/367189efae8b53ec2ade37a1c079fd8f69244b9e
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M accel/tcg/tb-hash.h
    M accel/tcg/tb-maint.c
    M include/qemu/xxhash.h
    M util/qsp.c

  Log Message:
  -----------
  accel/tcg: include cs_base in our hash calculations

We weren't using cs_base in the hash calculations before. Since the
arm front end moved a chunk of flags in a378206a20 (target/arm: Move
mode specific TB flags to tb->cs_base) they comprise of an important
part of the execution state.

Widen the tb_hash_func to include cs_base and expand to qemu_xxhash8()
to accommodate it.

My initial benchmark shows very little difference in the
runtime.

Before:

armhf

➜  hyperfine -w 2 -m 20 "./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine 
type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev 
user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device 
virtio-scsi-pci -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf
 -device scsi-hd,drive=hd -smp 4 -kernel 
/home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 
'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot"
Benchmark 1: ./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine 
type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev 
user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device 
virtio-scsi-pci -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf
 -device scsi-hd,drive=hd -smp 4 -kernel 
/home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 
'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot
  Time (mean ± σ):     24.627 s ±  2.708 s    [User: 34.309 s, System: 1.797 s]
  Range (min … max):   22.345 s … 29.864 s    20 runs

arm64

➜  hyperfine -w 2 -n 20 "./qemu-system-aarch64 -cpu max,pauth-impdef=on 
-machine type=virt,virtualization=on,gic-version=3 -display none -serial 
mon:stdio -netdev user,id=unet,hostfwd=tcp::2222-:22,hostfwd=tcp::1234-:1234 
-device virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-arm64
 -device scsi-hd,drive=hd -smp 4 -kernel 
~/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image.gz -append 'console=ttyAMA0 
root=/dev/sda2 systemd.unit=benchmark-pigz.service' -snapshot"
Benchmark 1: 20
  Time (mean ± σ):     62.559 s ±  2.917 s    [User: 189.115 s, System: 4.089 s]
  Range (min … max):   59.997 s … 70.153 s    10 runs

After:

armhf

Benchmark 1: ./arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine 
type=virt,highmem=off -display none -m 2048 -serial mon:stdio -netdev 
user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet -device 
virtio-scsi-pci -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-armhf
 -device scsi-hd,drive=hd -smp 4 -kernel 
/home/alex/lsrc/linux.git/builds/arm/arch/arm/boot/zImage -append 
'console=ttyAMA0 root=/dev/sda2 systemd.unit=benchmark.service' -snapshot
  Time (mean ± σ):     24.223 s ±  2.151 s    [User: 34.284 s, System: 1.906 s]
  Range (min … max):   22.000 s … 28.476 s    20 runs

arm64

hyperfine -w 2 -n 20 "./qemu-system-aarch64 -cpu max,pauth-impdef=on -machine 
type=virt,virtualization=on,gic-version=3 -display none -serial mon:stdio 
-netdev user,id=unet,hostfwd=tcp::2222-:22,hostfwd=tcp::1234-:1234 -device 
virtio-net-pci,netdev=unet -device virtio-scsi-pci -blockdev 
driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-bullseye-arm64
 -device scsi-hd,drive=hd -smp 4 -kernel 
~/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image.gz -append 'console=ttyAMA0 
root=/dev/sda2 systemd.unit=benchmark-pigz.service' -snapshot"
Benchmark 1: 20
  Time (mean ± σ):     62.769 s ±  1.978 s    [User: 188.431 s, System: 5.269 s]
  Range (min … max):   60.285 s … 66.868 s    10 runs

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230526165401.574474-12-alex.bennee@linaro.org
Message-Id: <20230524133952.3971948-11-alex.bennee@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 19a720b74fde7e859d19f12c66a72e545947a657
      
https://github.com/qemu/qemu/commit/19a720b74fde7e859d19f12c66a72e545947a657
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M accel/tcg/cpu-exec.c
    M accel/tcg/tb-hash.h
    M accel/tcg/tb-maint.c
    M accel/tcg/translate-all.c
    M bsd-user/freebsd/os-syscall.c
    M docs/about/deprecated.rst
    M hw/9pfs/9p.c
    M hw/core/cpu-common.c
    M hw/core/trace-events
    M include/exec/exec-all.h
    M include/hw/core/cpu.h
    M include/qemu/xxhash.h
    M include/user/syscall-trace.h
    M qapi/trace.json
    M scripts/qapi/gen.py
    M scripts/tracetool/format/c.py
    M scripts/tracetool/format/h.py
    M stubs/trace-control.c
    M trace-events
    M trace/control-internal.h
    M trace/control-target.c
    R trace/control-vcpu.h
    M trace/control.c
    M trace/control.h
    M trace/event-internal.h
    M trace/qmp.c
    M trace/trace-hmp-cmds.c
    M util/qsp.c

  Log Message:
  -----------
  Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into 
staging

Pull request

This pull request contains Alex Bennée's vcpu trace events removal patches.

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmR4tAMACgkQnKSrs4Gr
# c8ht/AgAiVslnH4vmD5IZloBHVRNEZKifODZbHW75yDgIirj/MhqlXPZ7bWoGwTN
# MLsTVuihhYnJBQKknN7lKyhkoQjgiJSkYhQbXSlcN7T3UE0+iG47FSudYTLDZSov
# M5wu1Edzi4q1uWr7ZIn/NS39iHVvQ7fdDMosHQmI0HKl25yx5936c0T2A4yyj96e
# LEtg4wLKo1uRgEMvCWrpiDz8ohNVwexAxCggwHE17tCebBmik+2cBEWAS+fcTbSr
# Nx3yWRat5VbqHOe3ghudLMNXHySQjNYrexULOVzyUUoaqUDt2eWCr9A4312BflEl
# 8U9FFl99BZX5rWkyUzsHxEmPlRsazQ==
# =oMRe
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 01 Jun 2023 08:06:43 AM PDT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]

* tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu:
  accel/tcg: include cs_base in our hash calculations
  hw/9pfs: use qemu_xxhash4
  tcg: remove the final vestiges of dstate
  trace: remove control-vcpu.h
  trace: remove code that depends on setting vcpu
  qapi: make the vcpu parameters deprecated for 8.1
  docs/deprecated: move QMP events bellow QMP command section
  scripts/qapi: document the tool that generated the file
  trace: remove vcpu_id from the TraceEvent structure
  trace-events: remove the remaining vcpu trace events
  *-user: remove the guest_user_syscall tracepoints

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/c6a5fc2ac76c...19a720b74fde



reply via email to

[Prev in Thread] Current Thread [Next in Thread]