函数源码 |
Source File:include\trace\events\writeback.h |
Create Date:2022-07-27 15:32:04 |
首页 | Copyright©Brick |
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | #define DEFINE_WBC_EVENT(name) \ DEFINE_EVENT(wbc_class, name, \ TP_PROTO( struct writeback_control *wbc, struct backing_dev_info *bdi), \ TP_ARGS(wbc, bdi)) DEFINE_WBC_EVENT(wbc_writepage); TRACE_EVENT(writeback_queue_io, TP_PROTO( struct bdi_writeback *wb, struct wb_writeback_work *work, int moved), TP_ARGS(wb, work, moved), TP_STRUCT__entry( __array( char , name, 32) __field(unsigned long , older) __field( long , age) __field( int , moved) __field( int , reason) __field(ino_t, cgroup_ino) ), TP_fast_assign( unsigned long *older_than_this = work->older_than_this; strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32); __entry->older = older_than_this ? *older_than_this : 0; __entry->age = older_than_this ? (jiffies - *older_than_this) * 1000 / HZ : -1; __entry->moved = moved; __entry->reason = work->reason; __entry->cgroup_ino = __trace_wb_assign_cgroup(wb); ), TP_printk( "bdi %s: older=%lu age=%ld enqueue=%d reason=%s cgroup_ino=%lu" , __entry->name, __entry->older, /* older_than_this in jiffies */ __entry->age, /* older_than_this in relative milliseconds */ __entry->moved, __print_symbolic(__entry->reason, WB_WORK_REASON), (unsigned long )__entry->cgroup_ino ) ); |