Skip to contentSkip to conversation

Tracing patches

GIT PULL Applied Stefan Hajnoczi 2 participants 3 messages Aug 7, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

The following changes since commit ac44ed2afb7c60255e989b163301479f5b4ecd04:

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging (2017-08-04 13:46:22 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to f42cf447e2310e84e119b99f7f13c8dc7a6cf3d6:

block: move trace probes into bdrv_co_preadv|pwritev (2017-08-07 09:39:35 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Daniel P. Berrange (1):
block: move trace probes into bdrv_co_preadv|pwritev

 block/io.c         | 8 ++++----
 block/trace-events | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.13.3
#1 lore raw

[Qemu-devel] [PULL 1/1] block: move trace probes into bdrv_co_preadv|pwritev

From: "Daniel P. Berrange" <[email protected]>

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.

Message-id: [email protected]

---
 block/io.c         | 8 ++++----
 block/trace-events | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
block/io.c +4 -4
index d9dc822173..26003814eb 100644
@@ -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);
 }
 
block/trace-events +2 -2
index 071a8d77ba..25dd5a3026 100644
@@ -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"
 
Signature · 1 line
2.13.3
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 14 lines · Stefan Hajnoczi

The following changes since commit ac44ed2afb7c60255e989b163301479f5b4ecd04:

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging (2017-08-04 13:46:22 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to f42cf447e2310e84e119b99f7f13c8dc7a6cf3d6:

block: move trace probes into bdrv_co_preadv|pwritev (2017-08-07 09:39:35 +0100)

----------------------------------------------------------------

Quoted 8 lines

----------------------------------------------------------------

Daniel P. Berrange (1):
block: move trace probes into bdrv_co_preadv|pwritev

 block/io.c         | 8 ++++----
 block/trace-events | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

-- PMM