Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM jbd |
| 3 | |
| 4 | #if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_JBD_H |
| 6 | |
| 7 | #include <linux/jbd.h> |
| 8 | #include <linux/tracepoint.h> |
| 9 | |
| 10 | TRACE_EVENT(jbd_checkpoint, |
| 11 | |
| 12 | TP_PROTO(journal_t *journal, int result), |
| 13 | |
| 14 | TP_ARGS(journal, result), |
| 15 | |
| 16 | TP_STRUCT__entry( |
| 17 | __field( dev_t, dev ) |
| 18 | __field( int, result ) |
| 19 | ), |
| 20 | |
| 21 | TP_fast_assign( |
| 22 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 23 | __entry->result = result; |
| 24 | ), |
| 25 | |
| 26 | TP_printk("dev %d,%d result %d", |
| 27 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 28 | __entry->result) |
| 29 | ); |
| 30 | |
| 31 | DECLARE_EVENT_CLASS(jbd_commit, |
| 32 | |
| 33 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 34 | |
| 35 | TP_ARGS(journal, commit_transaction), |
| 36 | |
| 37 | TP_STRUCT__entry( |
| 38 | __field( dev_t, dev ) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 39 | __field( int, transaction ) |
| 40 | ), |
| 41 | |
| 42 | TP_fast_assign( |
| 43 | __entry->dev = journal->j_fs_dev->bd_dev; |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 44 | __entry->transaction = commit_transaction->t_tid; |
| 45 | ), |
| 46 | |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 47 | TP_printk("dev %d,%d transaction %d", |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 48 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 49 | __entry->transaction) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 50 | ); |
| 51 | |
| 52 | DEFINE_EVENT(jbd_commit, jbd_start_commit, |
| 53 | |
| 54 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 55 | |
| 56 | TP_ARGS(journal, commit_transaction) |
| 57 | ); |
| 58 | |
| 59 | DEFINE_EVENT(jbd_commit, jbd_commit_locking, |
| 60 | |
| 61 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 62 | |
| 63 | TP_ARGS(journal, commit_transaction) |
| 64 | ); |
| 65 | |
| 66 | DEFINE_EVENT(jbd_commit, jbd_commit_flushing, |
| 67 | |
| 68 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 69 | |
| 70 | TP_ARGS(journal, commit_transaction) |
| 71 | ); |
| 72 | |
| 73 | DEFINE_EVENT(jbd_commit, jbd_commit_logging, |
| 74 | |
| 75 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 76 | |
| 77 | TP_ARGS(journal, commit_transaction) |
| 78 | ); |
| 79 | |
| 80 | TRACE_EVENT(jbd_drop_transaction, |
| 81 | |
| 82 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 83 | |
| 84 | TP_ARGS(journal, commit_transaction), |
| 85 | |
| 86 | TP_STRUCT__entry( |
| 87 | __field( dev_t, dev ) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 88 | __field( int, transaction ) |
| 89 | ), |
| 90 | |
| 91 | TP_fast_assign( |
| 92 | __entry->dev = journal->j_fs_dev->bd_dev; |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 93 | __entry->transaction = commit_transaction->t_tid; |
| 94 | ), |
| 95 | |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 96 | TP_printk("dev %d,%d transaction %d", |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 97 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 98 | __entry->transaction) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 99 | ); |
| 100 | |
| 101 | TRACE_EVENT(jbd_end_commit, |
| 102 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 103 | |
| 104 | TP_ARGS(journal, commit_transaction), |
| 105 | |
| 106 | TP_STRUCT__entry( |
| 107 | __field( dev_t, dev ) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 108 | __field( int, transaction ) |
| 109 | __field( int, head ) |
| 110 | ), |
| 111 | |
| 112 | TP_fast_assign( |
| 113 | __entry->dev = journal->j_fs_dev->bd_dev; |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 114 | __entry->transaction = commit_transaction->t_tid; |
| 115 | __entry->head = journal->j_tail_sequence; |
| 116 | ), |
| 117 | |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 118 | TP_printk("dev %d,%d transaction %d head %d", |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 119 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 120 | __entry->transaction, __entry->head) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 121 | ); |
| 122 | |
| 123 | TRACE_EVENT(jbd_do_submit_data, |
| 124 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 125 | |
| 126 | TP_ARGS(journal, commit_transaction), |
| 127 | |
| 128 | TP_STRUCT__entry( |
| 129 | __field( dev_t, dev ) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 130 | __field( int, transaction ) |
| 131 | ), |
| 132 | |
| 133 | TP_fast_assign( |
| 134 | __entry->dev = journal->j_fs_dev->bd_dev; |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 135 | __entry->transaction = commit_transaction->t_tid; |
| 136 | ), |
| 137 | |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 138 | TP_printk("dev %d,%d transaction %d", |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 139 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 2db938b | 2011-02-21 17:25:37 +0100 | [diff] [blame] | 140 | __entry->transaction) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 141 | ); |
| 142 | |
| 143 | TRACE_EVENT(jbd_cleanup_journal_tail, |
| 144 | |
| 145 | TP_PROTO(journal_t *journal, tid_t first_tid, |
| 146 | unsigned long block_nr, unsigned long freed), |
| 147 | |
| 148 | TP_ARGS(journal, first_tid, block_nr, freed), |
| 149 | |
| 150 | TP_STRUCT__entry( |
| 151 | __field( dev_t, dev ) |
| 152 | __field( tid_t, tail_sequence ) |
| 153 | __field( tid_t, first_tid ) |
| 154 | __field(unsigned long, block_nr ) |
| 155 | __field(unsigned long, freed ) |
| 156 | ), |
| 157 | |
| 158 | TP_fast_assign( |
| 159 | __entry->dev = journal->j_fs_dev->bd_dev; |
| 160 | __entry->tail_sequence = journal->j_tail_sequence; |
| 161 | __entry->first_tid = first_tid; |
| 162 | __entry->block_nr = block_nr; |
| 163 | __entry->freed = freed; |
| 164 | ), |
| 165 | |
| 166 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", |
| 167 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 168 | __entry->tail_sequence, __entry->first_tid, |
| 169 | __entry->block_nr, __entry->freed) |
| 170 | ); |
| 171 | |
Jan Kara | 9754e39 | 2012-04-07 12:33:03 +0200 | [diff] [blame] | 172 | TRACE_EVENT(journal_write_superblock, |
Jan Kara | fd2cbd4 | 2012-04-07 11:05:19 +0200 | [diff] [blame] | 173 | TP_PROTO(journal_t *journal, int write_op), |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 174 | |
Jan Kara | fd2cbd4 | 2012-04-07 11:05:19 +0200 | [diff] [blame] | 175 | TP_ARGS(journal, write_op), |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 176 | |
| 177 | TP_STRUCT__entry( |
| 178 | __field( dev_t, dev ) |
Jan Kara | fd2cbd4 | 2012-04-07 11:05:19 +0200 | [diff] [blame] | 179 | __field( int, write_op ) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 180 | ), |
| 181 | |
| 182 | TP_fast_assign( |
| 183 | __entry->dev = journal->j_fs_dev->bd_dev; |
Jan Kara | fd2cbd4 | 2012-04-07 11:05:19 +0200 | [diff] [blame] | 184 | __entry->write_op = write_op; |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 185 | ), |
| 186 | |
Jan Kara | fd2cbd4 | 2012-04-07 11:05:19 +0200 | [diff] [blame] | 187 | TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev), |
| 188 | MINOR(__entry->dev), __entry->write_op) |
Lukas Czerner | 99cb1a3 | 2011-05-23 18:33:02 +0200 | [diff] [blame] | 189 | ); |
| 190 | |
| 191 | #endif /* _TRACE_JBD_H */ |
| 192 | |
| 193 | /* This part must be outside protection */ |
| 194 | #include <trace/define_trace.h> |