| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM jbd |
| 4 | |
| 5 | #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define LTTNG_TRACE_JBD_H |
| 7 | |
| 8 | #include <lttng/tracepoint-event.h> |
| 9 | #include <linux/jbd.h> |
| 10 | #include <lttng/kernel-version.h> |
| 11 | |
| 12 | LTTNG_TRACEPOINT_EVENT(jbd_checkpoint, |
| 13 | |
| 14 | TP_PROTO(journal_t *journal, int result), |
| 15 | |
| 16 | TP_ARGS(journal, result), |
| 17 | |
| 18 | TP_FIELDS( |
| 19 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 20 | ctf_integer(int, result, result) |
| 21 | ) |
| 22 | ) |
| 23 | |
| 24 | LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit, |
| 25 | |
| 26 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 27 | |
| 28 | TP_ARGS(journal, commit_transaction), |
| 29 | |
| 30 | TP_FIELDS( |
| 31 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 32 | ctf_integer(int, transaction, commit_transaction->t_tid) |
| 33 | ) |
| 34 | ) |
| 35 | |
| 36 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_start_commit, |
| 37 | |
| 38 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 39 | |
| 40 | TP_ARGS(journal, commit_transaction) |
| 41 | ) |
| 42 | |
| 43 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_locking, |
| 44 | |
| 45 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 46 | |
| 47 | TP_ARGS(journal, commit_transaction) |
| 48 | ) |
| 49 | |
| 50 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_flushing, |
| 51 | |
| 52 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 53 | |
| 54 | TP_ARGS(journal, commit_transaction) |
| 55 | ) |
| 56 | |
| 57 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_logging, |
| 58 | |
| 59 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 60 | |
| 61 | TP_ARGS(journal, commit_transaction) |
| 62 | ) |
| 63 | |
| 64 | LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction, |
| 65 | |
| 66 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 67 | |
| 68 | TP_ARGS(journal, commit_transaction), |
| 69 | |
| 70 | TP_FIELDS( |
| 71 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 72 | ctf_integer(int, transaction, commit_transaction->t_tid) |
| 73 | ) |
| 74 | ) |
| 75 | |
| 76 | LTTNG_TRACEPOINT_EVENT(jbd_end_commit, |
| 77 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 78 | |
| 79 | TP_ARGS(journal, commit_transaction), |
| 80 | |
| 81 | TP_FIELDS( |
| 82 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 83 | ctf_integer(int, transaction, commit_transaction->t_tid) |
| 84 | ctf_integer(int, head, journal->j_tail_sequence) |
| 85 | ) |
| 86 | ) |
| 87 | |
| 88 | LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data, |
| 89 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 90 | |
| 91 | TP_ARGS(journal, commit_transaction), |
| 92 | |
| 93 | TP_FIELDS( |
| 94 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 95 | ctf_integer(int, transaction, commit_transaction->t_tid) |
| 96 | ) |
| 97 | ) |
| 98 | |
| 99 | LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail, |
| 100 | |
| 101 | TP_PROTO(journal_t *journal, tid_t first_tid, |
| 102 | unsigned long block_nr, unsigned long freed), |
| 103 | |
| 104 | TP_ARGS(journal, first_tid, block_nr, freed), |
| 105 | |
| 106 | TP_FIELDS( |
| 107 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 108 | ctf_integer(tid_t, tail_sequence, journal->j_tail_sequence) |
| 109 | ctf_integer(tid_t, first_tid, first_tid) |
| 110 | ctf_integer(unsigned long, block_nr, block_nr) |
| 111 | ctf_integer(unsigned long, freed, freed) |
| 112 | ) |
| 113 | ) |
| 114 | |
| 115 | LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock, |
| 116 | |
| 117 | jbd_journal_write_superblock, |
| 118 | |
| 119 | TP_PROTO(journal_t *journal, int write_op), |
| 120 | |
| 121 | TP_ARGS(journal, write_op), |
| 122 | |
| 123 | TP_FIELDS( |
| 124 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) |
| 125 | ctf_integer(int, write_op, write_op) |
| 126 | ) |
| 127 | ) |
| 128 | |
| 129 | #endif /* LTTNG_TRACE_JBD_H */ |
| 130 | |
| 131 | /* This part must be outside protection */ |
| 132 | #include <lttng/define_trace.h> |