block: introduce block_io_start/block_io_done tracepoints
authorHengqi Chen <hengqi.chen@gmail.com>
Sat, 20 May 2023 08:40:57 +0000 (08:40 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 May 2023 14:38:59 +0000 (08:38 -0600)
commit5a80bd075f3bce24793ae1aeb06066895ec5aef0
tree55ba9c3be2d53893e59f33f5dfba04818141fa25
parenta13bd91be22318768d55470cbc0b0f4488ef9edf
block: introduce block_io_start/block_io_done tracepoints

Currently, several BCC ([0]) tools (biosnoop/biostacks/biotop) use
kprobes to blk_account_io_start/blk_account_io_done to implement
their functionalities. This is fragile because the target kernel
functions may be renamed ([1]) or inlined ([2]). So introduce two
new tracepoints for such use cases.

  [0]: https://github.com/iovisor/bcc
  [1]: https://github.com/iovisor/bcc/issues/3954
  [2]: https://github.com/iovisor/bcc/issues/4261

Tested-by: Francis Laniel <flaniel@linux.microsoft.com>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Tested-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20230520084057.1467003-1-hengqi.chen@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
include/trace/events/block.h