diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-11 11:14:11 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-18 16:12:04 -0400 |
commit | 9e4c109ac822395e0aae650e4e3c9e4903f6602f (patch) | |
tree | c59e7fabd8a43e6d3392045760653cbfeb5cd6e3 /fs/xfs | |
parent | 2900b33999e2fc8a8edf0dddaafffec4da25ee10 (diff) |
xfs: add AIL pushing tracepoints
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_trace.h | 37 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_ail.c | 8 |
2 files changed, 45 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index b78f2c65438b..f1d2802b2f07 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h | |||
@@ -30,6 +30,7 @@ struct xfs_buf_log_item; | |||
30 | struct xfs_da_args; | 30 | struct xfs_da_args; |
31 | struct xfs_da_node_entry; | 31 | struct xfs_da_node_entry; |
32 | struct xfs_dquot; | 32 | struct xfs_dquot; |
33 | struct xfs_log_item; | ||
33 | struct xlog_ticket; | 34 | struct xlog_ticket; |
34 | struct log; | 35 | struct log; |
35 | struct xlog_recover; | 36 | struct xlog_recover; |
@@ -853,6 +854,42 @@ DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter); | |||
853 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); | 854 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); |
854 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); | 855 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); |
855 | 856 | ||
857 | DECLARE_EVENT_CLASS(xfs_log_item_class, | ||
858 | TP_PROTO(struct xfs_log_item *lip), | ||
859 | TP_ARGS(lip), | ||
860 | TP_STRUCT__entry( | ||
861 | __field(dev_t, dev) | ||
862 | __field(void *, lip) | ||
863 | __field(uint, type) | ||
864 | __field(uint, flags) | ||
865 | __field(xfs_lsn_t, lsn) | ||
866 | ), | ||
867 | TP_fast_assign( | ||
868 | __entry->dev = lip->li_mountp->m_super->s_dev; | ||
869 | __entry->lip = lip; | ||
870 | __entry->type = lip->li_type; | ||
871 | __entry->flags = lip->li_flags; | ||
872 | __entry->lsn = lip->li_lsn; | ||
873 | ), | ||
874 | TP_printk("dev %d:%d lip 0x%p lsn %d/%d type %s flags %s", | ||
875 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
876 | __entry->lip, | ||
877 | CYCLE_LSN(__entry->lsn), BLOCK_LSN(__entry->lsn), | ||
878 | __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), | ||
879 | __print_flags(__entry->flags, "|", XFS_LI_FLAGS)) | ||
880 | ) | ||
881 | |||
882 | #define DEFINE_LOG_ITEM_EVENT(name) \ | ||
883 | DEFINE_EVENT(xfs_log_item_class, name, \ | ||
884 | TP_PROTO(struct xfs_log_item *lip), \ | ||
885 | TP_ARGS(lip)) | ||
886 | DEFINE_LOG_ITEM_EVENT(xfs_ail_push); | ||
887 | DEFINE_LOG_ITEM_EVENT(xfs_ail_pushbuf); | ||
888 | DEFINE_LOG_ITEM_EVENT(xfs_ail_pushbuf_pinned); | ||
889 | DEFINE_LOG_ITEM_EVENT(xfs_ail_pinned); | ||
890 | DEFINE_LOG_ITEM_EVENT(xfs_ail_locked); | ||
891 | |||
892 | |||
856 | DECLARE_EVENT_CLASS(xfs_file_class, | 893 | DECLARE_EVENT_CLASS(xfs_file_class, |
857 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), | 894 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), |
858 | TP_ARGS(ip, count, offset, flags), | 895 | TP_ARGS(ip, count, offset, flags), |
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index 4e3f9bbe0141..ed9252bcdac9 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "xfs_ag.h" | 26 | #include "xfs_ag.h" |
27 | #include "xfs_mount.h" | 27 | #include "xfs_mount.h" |
28 | #include "xfs_trans_priv.h" | 28 | #include "xfs_trans_priv.h" |
29 | #include "xfs_trace.h" | ||
29 | #include "xfs_error.h" | 30 | #include "xfs_error.h" |
30 | 31 | ||
31 | #ifdef DEBUG | 32 | #ifdef DEBUG |
@@ -425,14 +426,18 @@ xfsaild_push( | |||
425 | switch (lock_result) { | 426 | switch (lock_result) { |
426 | case XFS_ITEM_SUCCESS: | 427 | case XFS_ITEM_SUCCESS: |
427 | XFS_STATS_INC(xs_push_ail_success); | 428 | XFS_STATS_INC(xs_push_ail_success); |
429 | trace_xfs_ail_push(lip); | ||
430 | |||
428 | IOP_PUSH(lip); | 431 | IOP_PUSH(lip); |
429 | ailp->xa_last_pushed_lsn = lsn; | 432 | ailp->xa_last_pushed_lsn = lsn; |
430 | break; | 433 | break; |
431 | 434 | ||
432 | case XFS_ITEM_PUSHBUF: | 435 | case XFS_ITEM_PUSHBUF: |
433 | XFS_STATS_INC(xs_push_ail_pushbuf); | 436 | XFS_STATS_INC(xs_push_ail_pushbuf); |
437 | trace_xfs_ail_pushbuf(lip); | ||
434 | 438 | ||
435 | if (!IOP_PUSHBUF(lip)) { | 439 | if (!IOP_PUSHBUF(lip)) { |
440 | trace_xfs_ail_pushbuf_pinned(lip); | ||
436 | stuck++; | 441 | stuck++; |
437 | ailp->xa_log_flush++; | 442 | ailp->xa_log_flush++; |
438 | } else { | 443 | } else { |
@@ -443,12 +448,15 @@ xfsaild_push( | |||
443 | 448 | ||
444 | case XFS_ITEM_PINNED: | 449 | case XFS_ITEM_PINNED: |
445 | XFS_STATS_INC(xs_push_ail_pinned); | 450 | XFS_STATS_INC(xs_push_ail_pinned); |
451 | trace_xfs_ail_pinned(lip); | ||
452 | |||
446 | stuck++; | 453 | stuck++; |
447 | ailp->xa_log_flush++; | 454 | ailp->xa_log_flush++; |
448 | break; | 455 | break; |
449 | 456 | ||
450 | case XFS_ITEM_LOCKED: | 457 | case XFS_ITEM_LOCKED: |
451 | XFS_STATS_INC(xs_push_ail_locked); | 458 | XFS_STATS_INC(xs_push_ail_locked); |
459 | trace_xfs_ail_locked(lip); | ||
452 | stuck++; | 460 | stuck++; |
453 | break; | 461 | break; |
454 | 462 | ||