mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/virtio: add some vhost-user trace events
These are useful for tracing the lifetime of vhost-user connections. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220802095010.3330793-10-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
8d11c10d06
commit
a276123119
2 changed files with 10 additions and 0 deletions
|
@ -1477,6 +1477,8 @@ void vhost_dev_cleanup(struct vhost_dev *hdev)
|
|||
{
|
||||
int i;
|
||||
|
||||
trace_vhost_dev_cleanup(hdev);
|
||||
|
||||
for (i = 0; i < hdev->nvqs; ++i) {
|
||||
vhost_virtqueue_cleanup(hdev->vqs + i);
|
||||
}
|
||||
|
@ -1783,6 +1785,8 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
|
|||
/* should only be called after backend is connected */
|
||||
assert(hdev->vhost_ops);
|
||||
|
||||
trace_vhost_dev_start(hdev, vdev->name);
|
||||
|
||||
vdev->vhost_started = true;
|
||||
hdev->started = true;
|
||||
hdev->vdev = vdev;
|
||||
|
@ -1869,6 +1873,8 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev)
|
|||
/* should only be called after backend is connected */
|
||||
assert(hdev->vhost_ops);
|
||||
|
||||
trace_vhost_dev_stop(hdev, vdev->name);
|
||||
|
||||
if (hdev->vhost_ops->vhost_dev_start) {
|
||||
hdev->vhost_ops->vhost_dev_start(hdev, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue