diff options
Diffstat (limited to 'include/trace/events/block.h')
-rw-r--r-- | include/trace/events/block.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index e76ae19a8d6f..e8a5eca1dbe5 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -132,6 +132,7 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | |||
132 | * block_rq_complete - block IO operation completed by device driver | 132 | * block_rq_complete - block IO operation completed by device driver |
133 | * @q: queue containing the block operation request | 133 | * @q: queue containing the block operation request |
134 | * @rq: block operations request | 134 | * @rq: block operations request |
135 | * @nr_bytes: number of completed bytes | ||
135 | * | 136 | * |
136 | * The block_rq_complete tracepoint event indicates that some portion | 137 | * The block_rq_complete tracepoint event indicates that some portion |
137 | * of operation request has been completed by the device driver. If | 138 | * of operation request has been completed by the device driver. If |
@@ -139,11 +140,37 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | |||
139 | * do for the request. If @rq->bio is non-NULL then there is | 140 | * do for the request. If @rq->bio is non-NULL then there is |
140 | * additional work required to complete the request. | 141 | * additional work required to complete the request. |
141 | */ | 142 | */ |
142 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, | 143 | TRACE_EVENT(block_rq_complete, |
143 | 144 | ||
144 | TP_PROTO(struct request_queue *q, struct request *rq), | 145 | TP_PROTO(struct request_queue *q, struct request *rq, |
146 | unsigned int nr_bytes), | ||
145 | 147 | ||
146 | TP_ARGS(q, rq) | 148 | TP_ARGS(q, rq, nr_bytes), |
149 | |||
150 | TP_STRUCT__entry( | ||
151 | __field( dev_t, dev ) | ||
152 | __field( sector_t, sector ) | ||
153 | __field( unsigned int, nr_sector ) | ||
154 | __field( int, errors ) | ||
155 | __array( char, rwbs, RWBS_LEN ) | ||
156 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) | ||
157 | ), | ||
158 | |||
159 | TP_fast_assign( | ||
160 | __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; | ||
161 | __entry->sector = blk_rq_pos(rq); | ||
162 | __entry->nr_sector = nr_bytes >> 9; | ||
163 | __entry->errors = rq->errors; | ||
164 | |||
165 | blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes); | ||
166 | blk_dump_cmd(__get_str(cmd), rq); | ||
167 | ), | ||
168 | |||
169 | TP_printk("%d,%d %s (%s) %llu + %u [%d]", | ||
170 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
171 | __entry->rwbs, __get_str(cmd), | ||
172 | (unsigned long long)__entry->sector, | ||
173 | __entry->nr_sector, __entry->errors) | ||
147 | ); | 174 | ); |
148 | 175 | ||
149 | DECLARE_EVENT_CLASS(block_rq, | 176 | DECLARE_EVENT_CLASS(block_rq, |