@@ -226,45 +226,6 @@ DEFINE_EVENT(block_rq, block_rq_merge,
226226 TP_ARGS (q , rq )
227227);
228228
229- /**
230- * block_bio_bounce - used bounce buffer when processing block operation
231- * @q: queue holding the block operation
232- * @bio: block operation
233- *
234- * A bounce buffer was used to handle the block operation @bio in @q.
235- * This occurs when hardware limitations prevent a direct transfer of
236- * data between the @bio data memory area and the IO device. Use of a
237- * bounce buffer requires extra copying of data and decreases
238- * performance.
239- */
240- TRACE_EVENT (block_bio_bounce ,
241-
242- TP_PROTO (struct request_queue * q , struct bio * bio ),
243-
244- TP_ARGS (q , bio ),
245-
246- TP_STRUCT__entry (
247- __field ( dev_t , dev )
248- __field ( sector_t , sector )
249- __field ( unsigned int , nr_sector )
250- __array ( char , rwbs , RWBS_LEN )
251- __array ( char , comm , TASK_COMM_LEN )
252- ),
253-
254- TP_fast_assign (
255- __entry -> dev = bio_dev (bio );
256- __entry -> sector = bio -> bi_iter .bi_sector ;
257- __entry -> nr_sector = bio_sectors (bio );
258- blk_fill_rwbs (__entry -> rwbs , bio -> bi_opf , bio -> bi_iter .bi_size );
259- memcpy (__entry -> comm , current -> comm , TASK_COMM_LEN );
260- ),
261-
262- TP_printk ("%d,%d %s %llu + %u [%s]" ,
263- MAJOR (__entry -> dev ), MINOR (__entry -> dev ), __entry -> rwbs ,
264- (unsigned long long )__entry -> sector ,
265- __entry -> nr_sector , __entry -> comm )
266- );
267-
268229/**
269230 * block_bio_complete - completed all work on the block operation
270231 * @q: queue holding the block operation
@@ -301,11 +262,11 @@ TRACE_EVENT(block_bio_complete,
301262 __entry -> nr_sector , __entry -> error )
302263);
303264
304- DECLARE_EVENT_CLASS (block_bio_merge ,
265+ DECLARE_EVENT_CLASS (block_bio ,
305266
306- TP_PROTO (struct request_queue * q , struct request * rq , struct bio * bio ),
267+ TP_PROTO (struct bio * bio ),
307268
308- TP_ARGS (q , rq , bio ),
269+ TP_ARGS (bio ),
309270
310271 TP_STRUCT__entry (
311272 __field ( dev_t , dev )
@@ -329,116 +290,63 @@ DECLARE_EVENT_CLASS(block_bio_merge,
329290 __entry -> nr_sector , __entry -> comm )
330291);
331292
293+ /**
294+ * block_bio_bounce - used bounce buffer when processing block operation
295+ * @bio: block operation
296+ *
297+ * A bounce buffer was used to handle the block operation @bio in @q.
298+ * This occurs when hardware limitations prevent a direct transfer of
299+ * data between the @bio data memory area and the IO device. Use of a
300+ * bounce buffer requires extra copying of data and decreases
301+ * performance.
302+ */
303+ DEFINE_EVENT (block_bio , block_bio_bounce ,
304+ TP_PROTO (struct bio * bio ),
305+ TP_ARGS (bio )
306+ );
307+
332308/**
333309 * block_bio_backmerge - merging block operation to the end of an existing operation
334- * @q: queue holding operation
335- * @rq: request bio is being merged into
336310 * @bio: new block operation to merge
337311 *
338- * Merging block request @bio to the end of an existing block request
339- * in queue @q.
312+ * Merging block request @bio to the end of an existing block request.
340313 */
341- DEFINE_EVENT (block_bio_merge , block_bio_backmerge ,
342-
343- TP_PROTO (struct request_queue * q , struct request * rq , struct bio * bio ),
344-
345- TP_ARGS (q , rq , bio )
314+ DEFINE_EVENT (block_bio , block_bio_backmerge ,
315+ TP_PROTO (struct bio * bio ),
316+ TP_ARGS (bio )
346317);
347318
348319/**
349320 * block_bio_frontmerge - merging block operation to the beginning of an existing operation
350- * @q: queue holding operation
351- * @rq: request bio is being merged into
352321 * @bio: new block operation to merge
353322 *
354- * Merging block IO operation @bio to the beginning of an existing block
355- * operation in queue @q.
323+ * Merging block IO operation @bio to the beginning of an existing block request.
356324 */
357- DEFINE_EVENT (block_bio_merge , block_bio_frontmerge ,
358-
359- TP_PROTO (struct request_queue * q , struct request * rq , struct bio * bio ),
360-
361- TP_ARGS (q , rq , bio )
325+ DEFINE_EVENT (block_bio , block_bio_frontmerge ,
326+ TP_PROTO (struct bio * bio ),
327+ TP_ARGS (bio )
362328);
363329
364330/**
365331 * block_bio_queue - putting new block IO operation in queue
366- * @q: queue holding operation
367332 * @bio: new block operation
368333 *
369334 * About to place the block IO operation @bio into queue @q.
370335 */
371- TRACE_EVENT (block_bio_queue ,
372-
373- TP_PROTO (struct request_queue * q , struct bio * bio ),
374-
375- TP_ARGS (q , bio ),
376-
377- TP_STRUCT__entry (
378- __field ( dev_t , dev )
379- __field ( sector_t , sector )
380- __field ( unsigned int , nr_sector )
381- __array ( char , rwbs , RWBS_LEN )
382- __array ( char , comm , TASK_COMM_LEN )
383- ),
384-
385- TP_fast_assign (
386- __entry -> dev = bio_dev (bio );
387- __entry -> sector = bio -> bi_iter .bi_sector ;
388- __entry -> nr_sector = bio_sectors (bio );
389- blk_fill_rwbs (__entry -> rwbs , bio -> bi_opf , bio -> bi_iter .bi_size );
390- memcpy (__entry -> comm , current -> comm , TASK_COMM_LEN );
391- ),
392-
393- TP_printk ("%d,%d %s %llu + %u [%s]" ,
394- MAJOR (__entry -> dev ), MINOR (__entry -> dev ), __entry -> rwbs ,
395- (unsigned long long )__entry -> sector ,
396- __entry -> nr_sector , __entry -> comm )
397- );
398-
399- DECLARE_EVENT_CLASS (block_get_rq ,
400-
401- TP_PROTO (struct request_queue * q , struct bio * bio , int rw ),
402-
403- TP_ARGS (q , bio , rw ),
404-
405- TP_STRUCT__entry (
406- __field ( dev_t , dev )
407- __field ( sector_t , sector )
408- __field ( unsigned int , nr_sector )
409- __array ( char , rwbs , RWBS_LEN )
410- __array ( char , comm , TASK_COMM_LEN )
411- ),
412-
413- TP_fast_assign (
414- __entry -> dev = bio ? bio_dev (bio ) : 0 ;
415- __entry -> sector = bio ? bio -> bi_iter .bi_sector : 0 ;
416- __entry -> nr_sector = bio ? bio_sectors (bio ) : 0 ;
417- blk_fill_rwbs (__entry -> rwbs ,
418- bio ? bio -> bi_opf : 0 , __entry -> nr_sector );
419- memcpy (__entry -> comm , current -> comm , TASK_COMM_LEN );
420- ),
421-
422- TP_printk ("%d,%d %s %llu + %u [%s]" ,
423- MAJOR (__entry -> dev ), MINOR (__entry -> dev ), __entry -> rwbs ,
424- (unsigned long long )__entry -> sector ,
425- __entry -> nr_sector , __entry -> comm )
336+ DEFINE_EVENT (block_bio , block_bio_queue ,
337+ TP_PROTO (struct bio * bio ),
338+ TP_ARGS (bio )
426339);
427340
428341/**
429342 * block_getrq - get a free request entry in queue for block IO operations
430- * @q: queue for operations
431343 * @bio: pending block IO operation (can be %NULL)
432- * @rw: low bit indicates a read (%0) or a write (%1)
433344 *
434- * A request struct for queue @q has been allocated to handle the
435- * block IO operation @bio.
345+ * A request struct has been allocated to handle the block IO operation @bio.
436346 */
437- DEFINE_EVENT (block_get_rq , block_getrq ,
438-
439- TP_PROTO (struct request_queue * q , struct bio * bio , int rw ),
440-
441- TP_ARGS (q , bio , rw )
347+ DEFINE_EVENT (block_bio , block_getrq ,
348+ TP_PROTO (struct bio * bio ),
349+ TP_ARGS (bio )
442350);
443351
444352/**
0 commit comments