* [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev
@ 2017-08-04 10:50 Daniel P. Berrange
2017-08-04 12:04 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10] " Eric Blake
2017-08-04 12:51 ` [Qemu-devel] [PATCH] " Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2017-08-04 10:50 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-block, Stefan Hajnoczi, Fam Zheng, Kevin Wolf, Max Reitz,
Daniel P. Berrange
There are trace probes in bdrv_co_readv|writev, however, the
block drivers are being gradually moved over to using the
bdrv_co_preadv|pwritev functions instead. As a result some
block drivers miss the current probes. Move the probes
into bdrv_co_preadv|pwritev instead, so that they are triggered
by more (all?) I/O code paths.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
block/io.c | 8 ++++----
block/trace-events | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/io.c b/block/io.c
index d9dc822173..26003814eb 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1135,6 +1135,8 @@ int coroutine_fn bdrv_co_preadv(BdrvChild *child,
bool use_local_qiov = false;
int ret;
+ trace_bdrv_co_preadv(child->bs, offset, bytes, flags);
+
if (!drv) {
return -ENOMEDIUM;
}
@@ -1207,8 +1209,6 @@ static int coroutine_fn bdrv_co_do_readv(BdrvChild *child,
int coroutine_fn bdrv_co_readv(BdrvChild *child, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
- trace_bdrv_co_readv(child->bs, sector_num, nb_sectors);
-
return bdrv_co_do_readv(child, sector_num, nb_sectors, qiov, 0);
}
@@ -1526,6 +1526,8 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child,
bool use_local_qiov = false;
int ret;
+ trace_bdrv_co_pwritev(child->bs, offset, bytes, flags);
+
if (!bs->drv) {
return -ENOMEDIUM;
}
@@ -1660,8 +1662,6 @@ static int coroutine_fn bdrv_co_do_writev(BdrvChild *child,
int coroutine_fn bdrv_co_writev(BdrvChild *child, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
- trace_bdrv_co_writev(child->bs, sector_num, nb_sectors);
-
return bdrv_co_do_writev(child, sector_num, nb_sectors, qiov, 0);
}
diff --git a/block/trace-events b/block/trace-events
index 071a8d77ba..25dd5a3026 100644
--- a/block/trace-events
+++ b/block/trace-events
@@ -9,8 +9,8 @@ blk_co_preadv(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags
blk_co_pwritev(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags) "blk %p bs %p offset %"PRId64" bytes %u flags 0x%x"
# block/io.c
-bdrv_co_readv(void *bs, int64_t sector_num, int nb_sector) "bs %p sector_num %"PRId64" nb_sectors %d"
-bdrv_co_writev(void *bs, int64_t sector_num, int nb_sector) "bs %p sector_num %"PRId64" nb_sectors %d"
+bdrv_co_preadv(void *bs, int64_t offset, int64_t nbytes, unsigned int flags) "bs %p offset %"PRId64" nbytes %"PRId64" flags 0x%x"
+bdrv_co_pwritev(void *bs, int64_t offset, int64_t nbytes, unsigned int flags) "bs %p offset %"PRId64" nbytes %"PRId64" flags 0x%x"
bdrv_co_pwrite_zeroes(void *bs, int64_t offset, int count, int flags) "bs %p offset %"PRId64" count %d flags 0x%x"
bdrv_co_do_copy_on_readv(void *bs, int64_t offset, unsigned int bytes, int64_t cluster_offset, unsigned int cluster_bytes) "bs %p offset %"PRId64" bytes %u cluster_offset %"PRId64" cluster_bytes %u"
--
2.13.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10] block: move trace probes into bdrv_co_preadv|pwritev
2017-08-04 10:50 [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev Daniel P. Berrange
@ 2017-08-04 12:04 ` Eric Blake
2017-08-04 12:51 ` [Qemu-devel] [PATCH] " Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-08-04 12:04 UTC (permalink / raw)
To: Daniel P. Berrange, qemu-devel
Cc: Kevin Wolf, qemu-block, Max Reitz, Stefan Hajnoczi, Fam Zheng
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
On 08/04/2017 05:50 AM, Daniel P. Berrange wrote:
> There are trace probes in bdrv_co_readv|writev, however, the
> block drivers are being gradually moved over to using the
> bdrv_co_preadv|pwritev functions instead. As a result some
> block drivers miss the current probes. Move the probes
> into bdrv_co_preadv|pwritev instead, so that they are triggered
> by more (all?) I/O code paths.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> block/io.c | 8 ++++----
> block/trace-events | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
Arguably, the traces are broken, so this is a bug fix worthy of 2.10.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev
2017-08-04 10:50 [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev Daniel P. Berrange
2017-08-04 12:04 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10] " Eric Blake
@ 2017-08-04 12:51 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-08-04 12:51 UTC (permalink / raw)
To: Daniel P. Berrange
Cc: qemu-devel, qemu-block, Fam Zheng, Kevin Wolf, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 705 bytes --]
On Fri, Aug 04, 2017 at 11:50:36AM +0100, Daniel P. Berrange wrote:
> There are trace probes in bdrv_co_readv|writev, however, the
> block drivers are being gradually moved over to using the
> bdrv_co_preadv|pwritev functions instead. As a result some
> block drivers miss the current probes. Move the probes
> into bdrv_co_preadv|pwritev instead, so that they are triggered
> by more (all?) I/O code paths.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> block/io.c | 8 ++++----
> block/trace-events | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-04 14:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 10:50 [Qemu-devel] [PATCH] block: move trace probes into bdrv_co_preadv|pwritev Daniel P. Berrange
2017-08-04 12:04 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10] " Eric Blake
2017-08-04 12:51 ` [Qemu-devel] [PATCH] " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).