Commit | Line | Data |
---|---|---|
b283666f PW |
1 | #undef TRACE_SYSTEM |
2 | #define TRACE_SYSTEM jbd | |
3 | ||
3bc29f0a MD |
4 | #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) |
5 | #define LTTNG_TRACE_JBD_H | |
b283666f | 6 | |
6ec43db8 | 7 | #include <probes/lttng-tracepoint-event.h> |
b283666f | 8 | #include <linux/jbd.h> |
7c68b363 | 9 | #include <linux/version.h> |
b283666f | 10 | |
3bc29f0a | 11 | LTTNG_TRACEPOINT_EVENT(jbd_checkpoint, |
b283666f PW |
12 | |
13 | TP_PROTO(journal_t *journal, int result), | |
14 | ||
15 | TP_ARGS(journal, result), | |
16 | ||
f127e61e MD |
17 | TP_FIELDS( |
18 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
19 | ctf_integer(int, result, result) | |
20 | ) | |
b283666f PW |
21 | ) |
22 | ||
3bc29f0a | 23 | LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit, |
b283666f PW |
24 | |
25 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
26 | ||
27 | TP_ARGS(journal, commit_transaction), | |
28 | ||
f127e61e MD |
29 | TP_FIELDS( |
30 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
b283666f | 31 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) |
f127e61e | 32 | ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) |
b283666f | 33 | #endif |
f127e61e MD |
34 | ctf_integer(int, transaction, commit_transaction->t_tid) |
35 | ) | |
b283666f PW |
36 | ) |
37 | ||
3bc29f0a | 38 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_start_commit, |
b283666f PW |
39 | |
40 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
41 | ||
42 | TP_ARGS(journal, commit_transaction) | |
43 | ) | |
44 | ||
3bc29f0a | 45 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_locking, |
b283666f PW |
46 | |
47 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
48 | ||
49 | TP_ARGS(journal, commit_transaction) | |
50 | ) | |
51 | ||
3bc29f0a | 52 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_flushing, |
b283666f PW |
53 | |
54 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
55 | ||
56 | TP_ARGS(journal, commit_transaction) | |
57 | ) | |
58 | ||
3bc29f0a | 59 | LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_logging, |
b283666f PW |
60 | |
61 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
62 | ||
63 | TP_ARGS(journal, commit_transaction) | |
64 | ) | |
65 | ||
3bc29f0a | 66 | LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction, |
b283666f PW |
67 | |
68 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | |
69 | ||
70 | TP_ARGS(journal, commit_transaction), | |
71 | ||
f127e61e MD |
72 | TP_FIELDS( |
73 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
b283666f | 74 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) |
f127e61e | 75 | ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) |
b283666f | 76 | #endif |
f127e61e MD |
77 | ctf_integer(int, transaction, commit_transaction->t_tid) |
78 | ) | |
b283666f PW |
79 | ) |
80 | ||
3bc29f0a | 81 | LTTNG_TRACEPOINT_EVENT(jbd_end_commit, |
b283666f PW |
82 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
83 | ||
84 | TP_ARGS(journal, commit_transaction), | |
85 | ||
f127e61e MD |
86 | TP_FIELDS( |
87 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
b283666f | 88 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) |
f127e61e | 89 | ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) |
b283666f | 90 | #endif |
f127e61e MD |
91 | ctf_integer(int, transaction, commit_transaction->t_tid) |
92 | ctf_integer(int, head, journal->j_tail_sequence) | |
93 | ) | |
b283666f PW |
94 | ) |
95 | ||
3bc29f0a | 96 | LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data, |
b283666f PW |
97 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
98 | ||
99 | TP_ARGS(journal, commit_transaction), | |
100 | ||
f127e61e MD |
101 | TP_FIELDS( |
102 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
b283666f | 103 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) |
f127e61e | 104 | ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit) |
b283666f | 105 | #endif |
f127e61e MD |
106 | ctf_integer(int, transaction, commit_transaction->t_tid) |
107 | ) | |
b283666f PW |
108 | ) |
109 | ||
3bc29f0a | 110 | LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail, |
b283666f PW |
111 | |
112 | TP_PROTO(journal_t *journal, tid_t first_tid, | |
113 | unsigned long block_nr, unsigned long freed), | |
114 | ||
115 | TP_ARGS(journal, first_tid, block_nr, freed), | |
116 | ||
f127e61e MD |
117 | TP_FIELDS( |
118 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
119 | ctf_integer(tid_t, tail_sequence, journal->j_tail_sequence) | |
120 | ctf_integer(tid_t, first_tid, first_tid) | |
121 | ctf_integer(unsigned long, block_nr, block_nr) | |
122 | ctf_integer(unsigned long, freed, freed) | |
123 | ) | |
b283666f PW |
124 | ) |
125 | ||
7c68b363 | 126 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) |
3bc29f0a | 127 | LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock, |
9cf29d3e MD |
128 | |
129 | jbd_journal_write_superblock, | |
130 | ||
7c68b363 AG |
131 | TP_PROTO(journal_t *journal, int write_op), |
132 | ||
133 | TP_ARGS(journal, write_op), | |
134 | ||
f127e61e MD |
135 | TP_FIELDS( |
136 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
137 | ctf_integer(int, write_op, write_op) | |
138 | ) | |
7c68b363 AG |
139 | ) |
140 | #else | |
3bc29f0a | 141 | LTTNG_TRACEPOINT_EVENT(jbd_update_superblock_end, |
b283666f PW |
142 | TP_PROTO(journal_t *journal, int wait), |
143 | ||
144 | TP_ARGS(journal, wait), | |
145 | ||
f127e61e MD |
146 | TP_FIELDS( |
147 | ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev) | |
148 | ctf_integer(int, wait, wait) | |
c94b360d | 149 | ) |
b283666f | 150 | ) |
7c68b363 | 151 | #endif |
b283666f | 152 | |
3bc29f0a | 153 | #endif /* LTTNG_TRACE_JBD_H */ |
b283666f PW |
154 | |
155 | /* This part must be outside protection */ | |
6ec43db8 | 156 | #include <probes/define_trace.h> |