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