1*d0b6e04aSLi Zefan #undef TRACE_SYSTEM 2*d0b6e04aSLi Zefan #define TRACE_SYSTEM jbd2 3*d0b6e04aSLi Zefan 4879c5e6bSTheodore Ts'o #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) 5879c5e6bSTheodore Ts'o #define _TRACE_JBD2_H 6879c5e6bSTheodore Ts'o 7879c5e6bSTheodore Ts'o #include <linux/jbd2.h> 8879c5e6bSTheodore Ts'o #include <linux/tracepoint.h> 9879c5e6bSTheodore Ts'o 10879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_checkpoint, 11879c5e6bSTheodore Ts'o 12879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, int result), 13879c5e6bSTheodore Ts'o 14879c5e6bSTheodore Ts'o TP_ARGS(journal, result), 15879c5e6bSTheodore Ts'o 16879c5e6bSTheodore Ts'o TP_STRUCT__entry( 17879c5e6bSTheodore Ts'o __field( dev_t, dev ) 18879c5e6bSTheodore Ts'o __field( int, result ) 19879c5e6bSTheodore Ts'o ), 20879c5e6bSTheodore Ts'o 21879c5e6bSTheodore Ts'o TP_fast_assign( 22879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 23879c5e6bSTheodore Ts'o __entry->result = result; 24879c5e6bSTheodore Ts'o ), 25879c5e6bSTheodore Ts'o 26879c5e6bSTheodore Ts'o TP_printk("dev %s result %d", 27879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->result) 28879c5e6bSTheodore Ts'o ); 29879c5e6bSTheodore Ts'o 30879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_start_commit, 31879c5e6bSTheodore Ts'o 32879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 33879c5e6bSTheodore Ts'o 34879c5e6bSTheodore Ts'o TP_ARGS(journal, commit_transaction), 35879c5e6bSTheodore Ts'o 36879c5e6bSTheodore Ts'o TP_STRUCT__entry( 37879c5e6bSTheodore Ts'o __field( dev_t, dev ) 38879c5e6bSTheodore Ts'o __field( char, sync_commit ) 39879c5e6bSTheodore Ts'o __field( int, transaction ) 40879c5e6bSTheodore Ts'o ), 41879c5e6bSTheodore Ts'o 42879c5e6bSTheodore Ts'o TP_fast_assign( 43879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 44879c5e6bSTheodore Ts'o __entry->sync_commit = commit_transaction->t_synchronous_commit; 45879c5e6bSTheodore Ts'o __entry->transaction = commit_transaction->t_tid; 46879c5e6bSTheodore Ts'o ), 47879c5e6bSTheodore Ts'o 48879c5e6bSTheodore Ts'o TP_printk("dev %s transaction %d sync %d", 49879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->transaction, 50879c5e6bSTheodore Ts'o __entry->sync_commit) 51879c5e6bSTheodore Ts'o ); 52879c5e6bSTheodore Ts'o 53879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_commit_locking, 54879c5e6bSTheodore Ts'o 55879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 56879c5e6bSTheodore Ts'o 57879c5e6bSTheodore Ts'o TP_ARGS(journal, commit_transaction), 58879c5e6bSTheodore Ts'o 59879c5e6bSTheodore Ts'o TP_STRUCT__entry( 60879c5e6bSTheodore Ts'o __field( dev_t, dev ) 61879c5e6bSTheodore Ts'o __field( char, sync_commit ) 62879c5e6bSTheodore Ts'o __field( int, transaction ) 63879c5e6bSTheodore Ts'o ), 64879c5e6bSTheodore Ts'o 65879c5e6bSTheodore Ts'o TP_fast_assign( 66879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 67879c5e6bSTheodore Ts'o __entry->sync_commit = commit_transaction->t_synchronous_commit; 68879c5e6bSTheodore Ts'o __entry->transaction = commit_transaction->t_tid; 69879c5e6bSTheodore Ts'o ), 70879c5e6bSTheodore Ts'o 71879c5e6bSTheodore Ts'o TP_printk("dev %s transaction %d sync %d", 72879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->transaction, 73879c5e6bSTheodore Ts'o __entry->sync_commit) 74879c5e6bSTheodore Ts'o ); 75879c5e6bSTheodore Ts'o 76879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_commit_flushing, 77879c5e6bSTheodore Ts'o 78879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 79879c5e6bSTheodore Ts'o 80879c5e6bSTheodore Ts'o TP_ARGS(journal, commit_transaction), 81879c5e6bSTheodore Ts'o 82879c5e6bSTheodore Ts'o TP_STRUCT__entry( 83879c5e6bSTheodore Ts'o __field( dev_t, dev ) 84879c5e6bSTheodore Ts'o __field( char, sync_commit ) 85879c5e6bSTheodore Ts'o __field( int, transaction ) 86879c5e6bSTheodore Ts'o ), 87879c5e6bSTheodore Ts'o 88879c5e6bSTheodore Ts'o TP_fast_assign( 89879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 90879c5e6bSTheodore Ts'o __entry->sync_commit = commit_transaction->t_synchronous_commit; 91879c5e6bSTheodore Ts'o __entry->transaction = commit_transaction->t_tid; 92879c5e6bSTheodore Ts'o ), 93879c5e6bSTheodore Ts'o 94879c5e6bSTheodore Ts'o TP_printk("dev %s transaction %d sync %d", 95879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->transaction, 96879c5e6bSTheodore Ts'o __entry->sync_commit) 97879c5e6bSTheodore Ts'o ); 98879c5e6bSTheodore Ts'o 99879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_commit_logging, 100879c5e6bSTheodore Ts'o 101879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 102879c5e6bSTheodore Ts'o 103879c5e6bSTheodore Ts'o TP_ARGS(journal, commit_transaction), 104879c5e6bSTheodore Ts'o 105879c5e6bSTheodore Ts'o TP_STRUCT__entry( 106879c5e6bSTheodore Ts'o __field( dev_t, dev ) 107879c5e6bSTheodore Ts'o __field( char, sync_commit ) 108879c5e6bSTheodore Ts'o __field( int, transaction ) 109879c5e6bSTheodore Ts'o ), 110879c5e6bSTheodore Ts'o 111879c5e6bSTheodore Ts'o TP_fast_assign( 112879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 113879c5e6bSTheodore Ts'o __entry->sync_commit = commit_transaction->t_synchronous_commit; 114879c5e6bSTheodore Ts'o __entry->transaction = commit_transaction->t_tid; 115879c5e6bSTheodore Ts'o ), 116879c5e6bSTheodore Ts'o 117879c5e6bSTheodore Ts'o TP_printk("dev %s transaction %d sync %d", 118879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->transaction, 119879c5e6bSTheodore Ts'o __entry->sync_commit) 120879c5e6bSTheodore Ts'o ); 121879c5e6bSTheodore Ts'o 122879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_end_commit, 123879c5e6bSTheodore Ts'o TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 124879c5e6bSTheodore Ts'o 125879c5e6bSTheodore Ts'o TP_ARGS(journal, commit_transaction), 126879c5e6bSTheodore Ts'o 127879c5e6bSTheodore Ts'o TP_STRUCT__entry( 128879c5e6bSTheodore Ts'o __field( dev_t, dev ) 129879c5e6bSTheodore Ts'o __field( char, sync_commit ) 130879c5e6bSTheodore Ts'o __field( int, transaction ) 131879c5e6bSTheodore Ts'o __field( int, head ) 132879c5e6bSTheodore Ts'o ), 133879c5e6bSTheodore Ts'o 134879c5e6bSTheodore Ts'o TP_fast_assign( 135879c5e6bSTheodore Ts'o __entry->dev = journal->j_fs_dev->bd_dev; 136879c5e6bSTheodore Ts'o __entry->sync_commit = commit_transaction->t_synchronous_commit; 137879c5e6bSTheodore Ts'o __entry->transaction = commit_transaction->t_tid; 138879c5e6bSTheodore Ts'o __entry->head = journal->j_tail_sequence; 139879c5e6bSTheodore Ts'o ), 140879c5e6bSTheodore Ts'o 141879c5e6bSTheodore Ts'o TP_printk("dev %s transaction %d sync %d head %d", 142879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->transaction, 143879c5e6bSTheodore Ts'o __entry->sync_commit, __entry->head) 144879c5e6bSTheodore Ts'o ); 145879c5e6bSTheodore Ts'o 146879c5e6bSTheodore Ts'o TRACE_EVENT(jbd2_submit_inode_data, 147879c5e6bSTheodore Ts'o TP_PROTO(struct inode *inode), 148879c5e6bSTheodore Ts'o 149879c5e6bSTheodore Ts'o TP_ARGS(inode), 150879c5e6bSTheodore Ts'o 151879c5e6bSTheodore Ts'o TP_STRUCT__entry( 152879c5e6bSTheodore Ts'o __field( dev_t, dev ) 153879c5e6bSTheodore Ts'o __field( ino_t, ino ) 154879c5e6bSTheodore Ts'o ), 155879c5e6bSTheodore Ts'o 156879c5e6bSTheodore Ts'o TP_fast_assign( 157879c5e6bSTheodore Ts'o __entry->dev = inode->i_sb->s_dev; 158879c5e6bSTheodore Ts'o __entry->ino = inode->i_ino; 159879c5e6bSTheodore Ts'o ), 160879c5e6bSTheodore Ts'o 161879c5e6bSTheodore Ts'o TP_printk("dev %s ino %lu", 162879c5e6bSTheodore Ts'o jbd2_dev_to_name(__entry->dev), __entry->ino) 163879c5e6bSTheodore Ts'o ); 164879c5e6bSTheodore Ts'o 165879c5e6bSTheodore Ts'o #endif /* _TRACE_JBD2_H */ 166879c5e6bSTheodore Ts'o 167879c5e6bSTheodore Ts'o /* This part must be outside protection */ 168879c5e6bSTheodore Ts'o #include <trace/define_trace.h> 169