X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fblock.h;h=16043a01294df83c88f96fd01534fc879abfce37;hb=5ec891b9a67f6c055619f51e91d0077c614f92f5;hp=d42ebd4e4cff2fbc73f0b0741bd4916305441b36;hpb=7c68b363332170e4db100327ecc9e09b8a79cf29;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index d42ebd4e..16043a01 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -365,7 +365,7 @@ DECLARE_EVENT_CLASS(block_bio, ), TP_fast_assign( - tp_assign(dev, bio->bi_bdev->bd_dev) + tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0) tp_assign(sector, bio->bi_sector) tp_assign(nr_sector, bio->bi_size >> 9) blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size) @@ -389,9 +389,15 @@ DECLARE_EVENT_CLASS(block_bio, */ DEFINE_EVENT(block_bio, block_bio_backmerge, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) + TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio), + + TP_ARGS(q, rq, bio) +#else TP_PROTO(struct request_queue *q, struct bio *bio), TP_ARGS(q, bio) +#endif ) /** @@ -404,9 +410,15 @@ DEFINE_EVENT(block_bio, block_bio_backmerge, */ DEFINE_EVENT(block_bio, block_bio_frontmerge, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) + TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio), + + TP_ARGS(q, rq, bio) +#else TP_PROTO(struct request_queue *q, struct bio *bio), TP_ARGS(q, bio) +#endif ) /**