Daniel P. Berrangé 9dfec5c0e6 net/stream: skip automatic zero-init of large array
The 'net_stream_send' method has a 68k byte array used for copying
data between guest and host. Skip the automatic zero-init of this
array to eliminate the performance overhead in the I/O hot path.

The 'buf1' array will be fully initialized when reading data off
the network socket.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Message-id: 20250610123709.835102-32-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 837b87c4c5)
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-06-25 14:27:33 -04:00
2025-06-16 20:20:11 -04:00
2024-07-22 12:47:28 +04:00
2025-02-17 21:05:27 -05:00
2024-08-13 19:01:42 +02:00
2024-07-12 16:36:20 -04:00
2024-08-06 15:01:01 +10:00
2024-07-22 09:38:16 +01:00
2024-07-03 18:41:26 +02:00
2023-12-21 22:49:27 +01:00
2023-12-21 22:49:27 +01:00
2025-04-15 16:03:40 -04:00
2023-12-21 22:49:27 +01:00
2023-12-21 22:49:27 +01:00
2024-09-26 16:35:25 +02:00
2024-09-03 09:18:26 -07:00

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
QEMU tracing using systemtap-initscript
---------------------------------------

You can capture QEMU trace data all the time using systemtap-initscript.  This
uses SystemTap's flight recorder mode to trace all running guests to a
fixed-size buffer on the host.  Old trace entries are overwritten by new
entries when the buffer size wraps.

1. Install the systemtap-initscript package:
  # yum install systemtap-initscript

2. Install the systemtap scripts and the conf file:
  # cp /usr/share/qemu-kvm/systemtap/script.d/qemu_kvm.stp /etc/systemtap/script.d/
  # cp /usr/share/qemu-kvm/systemtap/conf.d/qemu_kvm.conf /etc/systemtap/conf.d/

The set of trace events to enable is given in qemu_kvm.stp.  This SystemTap
script can be customized to add or remove trace events provided in
/usr/share/systemtap/tapset/qemu-kvm-simpletrace.stp.

SystemTap customizations can be made to qemu_kvm.conf to control the flight
recorder buffer size and whether to store traces in memory only or disk too.
See stap(1) for option documentation.

3. Start the systemtap service.
 # service systemtap start qemu_kvm

4. Make the service start at boot time.
 # chkconfig systemtap on

5. Confirm that the service works.
  # service systemtap status qemu_kvm
  qemu_kvm is running...

When you want to inspect the trace buffer, perform the following steps:

1. Dump the trace buffer.
  # staprun -A qemu_kvm >/tmp/trace.log

2. Start the systemtap service because the preceding step stops the service.
  # service systemtap start qemu_kvm

3. Translate the trace record to readable format.
  # /usr/share/qemu-kvm/simpletrace.py --no-header /usr/share/qemu-kvm/trace-events /tmp/trace.log
Description
No description provided
Readme 871 MiB
Languages
C 83.1%
C++ 6.1%
Python 3.4%
Dylan 2.7%
Shell 1.5%
Other 3%