| @@ -226,45 +226,6 @@ DEFINE_EVENT(block_rq, block_rq_merge, · 225 unmodified lines |
| 226 | TP_ARGS(q, rq) | 226 | TP_ARGS(q, rq) |
| 227 | ); | 227 | ); |
| 228 | | 228 | |
| 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 | | | |
| 268 | /** | 229 | /** |
| 269 | * block_bio_complete - completed all work on the block operation | 230 | * block_bio_complete - completed all work on the block operation |
| 270 | * @q: queue holding the block operation | 231 | * @q: queue holding the block operation |
| @@ -301,11 +262,11 @@ TRACE_EVENT(block_bio_complete, · 30 unmodified lines |
| 301 | __entry->nr_sector, __entry->error) | 262 | __entry->nr_sector, __entry->error) |
| 302 | ); | 263 | ); |
| 303 | | 264 | |
| 304 | DECLARE_EVENT_CLASS(block_bio_merge, | 265 | DECLARE_EVENT_CLASS(block_bio, |
| 305 | | 266 | |
| 306 | TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio), | 267 | TP_PROTO(struct bio *bio), |
| 307 | | 268 | |
| 308 | TP_ARGS(q, rq, bio), | 269 | TP_ARGS(bio), |
| 309 | | 270 | |
| 310 | TP_STRUCT__entry( | 271 | TP_STRUCT__entry( |
| 311 | __field( dev_t, dev ) | 272 | __field( dev_t, dev ) |
| @@ -329,116 +290,63 @@ DECLARE_EVENT_CLASS(block_bio_merge, · 17 unmodified lines |
| 329 | __entry->nr_sector, __entry->comm) | 290 | __entry->nr_sector, __entry->comm) |
| 330 | ); | 291 | ); |
| 331 | | 292 | |
| | 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 | |
| 332 | /** | 308 | /** |
| 333 | * block_bio_backmerge - merging block operation to the end of an existing operation | 309 | * 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 | | |
| 336 | * @bio: new block operation to merge | 310 | * @bio: new block operation to merge |
| 337 | * | 311 | * |
| 338 | * Merging block request @bio to the end of an existing block request | 312 | * Merging block request @bio to the end of an existing block request. |
| 339 | * in queue @q. | | |
| 340 | */ | 313 | */ |
| 341 | DEFINE_EVENT(block_bio_merge, block_bio_backmerge, | 314 | DEFINE_EVENT(block_bio, block_bio_backmerge, |
| 342 | | 315 | TP_PROTO(struct bio *bio), |
| 343 | TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio), | 316 | TP_ARGS(bio) |
| 344 | | | |
| 345 | TP_ARGS(q, rq, bio) | | |
| 346 | ); | 317 | ); |
| 347 | | 318 | |
| 348 | /** | 319 | /** |
| 349 | * block_bio_frontmerge - merging block operation to the beginning of an existing operation | 320 | * 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 | | |
| 352 | * @bio: new block operation to merge | 321 | * @bio: new block operation to merge |
| 353 | * | 322 | * |
| 354 | * Merging block IO operation @bio to the beginning of an existing block | 323 | * Merging block IO operation @bio to the beginning of an existing block request. |
| 355 | * operation in queue @q. | | |
| 356 | */ | 324 | */ |
| 357 | DEFINE_EVENT(block_bio_merge, block_bio_frontmerge, | 325 | DEFINE_EVENT(block_bio, block_bio_frontmerge, |
| 358 | | 326 | TP_PROTO(struct bio *bio), |
| 359 | TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio), | 327 | TP_ARGS(bio) |
| 360 | | | |
| 361 | TP_ARGS(q, rq, bio) | | |
| 362 | ); | 328 | ); |
| 363 | | 329 | |
| 364 | /** | 330 | /** |
| 365 | * block_bio_queue - putting new block IO operation in queue | 331 | * block_bio_queue - putting new block IO operation in queue |
| 366 | * @q: queue holding operation | | |
| 367 | * @bio: new block operation | 332 | * @bio: new block operation |
| 368 | * | 333 | * |
| 369 | * About to place the block IO operation @bio into queue @q. | 334 | * About to place the block IO operation @bio into queue @q. |
| 370 | */ | 335 | */ |
| 371 | TRACE_EVENT(block_bio_queue, | 336 | DEFINE_EVENT(block_bio, block_bio_queue, |
| 372 | | 337 | TP_PROTO(struct bio *bio), |
| 373 | TP_PROTO(struct request_queue *q, struct bio *bio), | 338 | TP_ARGS(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) | | |
| 426 | ); | 339 | ); |
| 427 | | 340 | |
| 428 | /** | 341 | /** |
| 429 | * block_getrq - get a free request entry in queue for block IO operations | 342 | * block_getrq - get a free request entry in queue for block IO operations |
| 430 | * @q: queue for operations | | |
| 431 | * @bio: pending block IO operation (can be %NULL) | 343 | * @bio: pending block IO operation (can be %NULL) |
| 432 | * @rw: low bit indicates a read (%0) or a write (%1) | | |
| 433 | * | 344 | * |
| 434 | * A request struct for queue @q has been allocated to handle the | 345 | * A request struct has been allocated to handle the block IO operation @bio. |
| 435 | * block IO operation @bio. | | |
| 436 | */ | 346 | */ |
| 437 | DEFINE_EVENT(block_get_rq, block_getrq, | 347 | DEFINE_EVENT(block_bio, block_getrq, |
| 438 | | 348 | TP_PROTO(struct bio *bio), |
| 439 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 349 | TP_ARGS(bio) |
| 440 | | | |
| 441 | TP_ARGS(q, bio, rw) | | |
| 442 | ); | 350 | ); |
| 443 | | 351 | |
| 444 | /** | 352 | /** |