- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( sector_t, sector )
- __field( unsigned int, nr_sector )
- __field( unsigned int, rwbs )
- __field( pid_t, tid )
- __array_text( char, comm, TASK_COMM_LEN )
- ),
-
- TP_fast_assign(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
- tp_assign(dev, bio->bi_bdev->bd_dev)
- tp_assign(sector, bio->bi_iter.bi_sector)
- tp_assign(nr_sector, bio_sectors(bio))
- blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_iter.bi_size)
- tp_memcpy(comm, current->comm, TASK_COMM_LEN)
- tp_assign(tid, current->pid)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
- tp_assign(dev, bio->bi_bdev->bd_dev)
- tp_assign(sector, bio->bi_sector)
- tp_assign(nr_sector, bio->bi_size >> 9)
- blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)
- tp_memcpy(comm, current->comm, TASK_COMM_LEN)
- tp_assign(tid, current->pid)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
- ),
-
- TP_printk("%d,%d %s %llu + %u [%s] %d",
- MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
- (unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm, __entry->tid)
-)
-#else
-LTTNG_TRACEPOINT_EVENT_CLASS(block_bio,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio),
-
- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( sector_t, sector )
- __field( unsigned int, nr_sector )
- __field( unsigned int, rwbs )
- __field( pid_t, tid )
- __array_text( char, comm, TASK_COMM_LEN )
- ),
-
- TP_fast_assign(
- 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)
- tp_memcpy(comm, current->comm, TASK_COMM_LEN)
- tp_assign(tid, current->pid)
- ),
-
- TP_printk("%d,%d %s %llu + %u [%s] %d",
- MAJOR(__entry->dev), MINOR(__entry->dev),
- __print_rwbs_flags(__entry->rwbs),
- (unsigned long long)__entry->sector,
- __entry->nr_sector, __entry->comm, __entry->tid)
-)
-
-/**
- * block_bio_backmerge - merging block operation to the end of an existing operation
- * @q: queue holding operation
- * @bio: new block operation to merge
- *
- * Merging block request @bio to the end of an existing block request
- * in queue @q.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_backmerge,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio)
-)
-
-/**
- * block_bio_frontmerge - merging block operation to the beginning of an existing operation
- * @q: queue holding operation
- * @bio: new block operation to merge
- *
- * Merging block IO operation @bio to the beginning of an existing block
- * operation in queue @q.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_frontmerge,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio)
-)
-
-/**
- * block_bio_queue - putting new block IO operation in queue
- * @q: queue holding operation
- * @bio: new block operation
- *
- * About to place the block IO operation @bio into queue @q.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_queue,
-
- TP_PROTO(struct request_queue *q, struct bio *bio),
-
- TP_ARGS(q, bio)