Cleanup: Move lttng-modules instrumentation headers
[lttng-modules.git] / include / instrumentation / events / jbd.h
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 <linux/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 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
33 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
34 #endif
35 ctf_integer(int, transaction, commit_transaction->t_tid)
36 )
37 )
38
39 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_start_commit,
40
41 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
42
43 TP_ARGS(journal, commit_transaction)
44 )
45
46 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_locking,
47
48 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
49
50 TP_ARGS(journal, commit_transaction)
51 )
52
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_flushing,
54
55 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
56
57 TP_ARGS(journal, commit_transaction)
58 )
59
60 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd_commit, jbd_commit_logging,
61
62 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
63
64 TP_ARGS(journal, commit_transaction)
65 )
66
67 LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction,
68
69 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
70
71 TP_ARGS(journal, commit_transaction),
72
73 TP_FIELDS(
74 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
75 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
76 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
77 #endif
78 ctf_integer(int, transaction, commit_transaction->t_tid)
79 )
80 )
81
82 LTTNG_TRACEPOINT_EVENT(jbd_end_commit,
83 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
84
85 TP_ARGS(journal, commit_transaction),
86
87 TP_FIELDS(
88 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
89 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
90 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
91 #endif
92 ctf_integer(int, transaction, commit_transaction->t_tid)
93 ctf_integer(int, head, journal->j_tail_sequence)
94 )
95 )
96
97 LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data,
98 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
99
100 TP_ARGS(journal, commit_transaction),
101
102 TP_FIELDS(
103 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
104 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
105 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
106 #endif
107 ctf_integer(int, transaction, commit_transaction->t_tid)
108 )
109 )
110
111 LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail,
112
113 TP_PROTO(journal_t *journal, tid_t first_tid,
114 unsigned long block_nr, unsigned long freed),
115
116 TP_ARGS(journal, first_tid, block_nr, freed),
117
118 TP_FIELDS(
119 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
120 ctf_integer(tid_t, tail_sequence, journal->j_tail_sequence)
121 ctf_integer(tid_t, first_tid, first_tid)
122 ctf_integer(unsigned long, block_nr, block_nr)
123 ctf_integer(unsigned long, freed, freed)
124 )
125 )
126
127 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
128 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock,
129
130 jbd_journal_write_superblock,
131
132 TP_PROTO(journal_t *journal, int write_op),
133
134 TP_ARGS(journal, write_op),
135
136 TP_FIELDS(
137 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
138 ctf_integer(int, write_op, write_op)
139 )
140 )
141 #else
142 LTTNG_TRACEPOINT_EVENT(jbd_update_superblock_end,
143 TP_PROTO(journal_t *journal, int wait),
144
145 TP_ARGS(journal, wait),
146
147 TP_FIELDS(
148 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
149 ctf_integer(int, wait, wait)
150 )
151 )
152 #endif
153
154 #endif /* LTTNG_TRACE_JBD_H */
155
156 /* This part must be outside protection */
157 #include <lttng/define_trace.h>
This page took 0.031285 seconds and 4 git commands to generate.