Move headers under include/
[lttng-modules.git] / include / instrumentation / events / lttng-module / jbd2.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM jbd2
4
5 #if !defined(LTTNG_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_JBD2_H
7
8 #include <lttng/lttng-tracepoint-event.h>
9 #include <linux/jbd2.h>
10
11 #ifndef _TRACE_JBD2_DEF
12 #define _TRACE_JBD2_DEF
13 struct transaction_chp_stats_s;
14 struct transaction_run_stats_s;
15 #endif
16
17 LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint,
18
19 TP_PROTO(journal_t *journal, int result),
20
21 TP_ARGS(journal, result),
22
23 TP_FIELDS(
24 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
25 ctf_integer(int, result, result)
26 )
27 )
28
29 LTTNG_TRACEPOINT_EVENT_CLASS(jbd2_commit,
30
31 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
32
33 TP_ARGS(journal, commit_transaction),
34
35 TP_FIELDS(
36 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
37 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
38 ctf_integer(int, transaction, commit_transaction->t_tid)
39 )
40 )
41
42 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_start_commit,
43
44 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
45
46 TP_ARGS(journal, commit_transaction)
47 )
48
49 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_commit_locking,
50
51 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
52
53 TP_ARGS(journal, commit_transaction)
54 )
55
56 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_commit_flushing,
57
58 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
59
60 TP_ARGS(journal, commit_transaction)
61 )
62
63 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_commit_logging,
64
65 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
66
67 TP_ARGS(journal, commit_transaction)
68 )
69
70 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction,
71
72 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
73
74 TP_ARGS(journal, commit_transaction)
75 )
76
77 LTTNG_TRACEPOINT_EVENT(jbd2_end_commit,
78 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
79
80 TP_ARGS(journal, commit_transaction),
81
82 TP_FIELDS(
83 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
84 ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
85 ctf_integer(int, transaction, commit_transaction->t_tid)
86 ctf_integer(int, head, journal->j_tail_sequence)
87 )
88 )
89
90 LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data,
91 TP_PROTO(struct inode *inode),
92
93 TP_ARGS(inode),
94
95 TP_FIELDS(
96 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
97 ctf_integer(ino_t, ino, inode->i_ino)
98 )
99 )
100
101 LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
102 TP_PROTO(dev_t dev, unsigned long tid,
103 struct transaction_run_stats_s *stats),
104
105 TP_ARGS(dev, tid, stats),
106
107 TP_FIELDS(
108 ctf_integer(dev_t, dev, dev)
109 ctf_integer(unsigned long, tid, tid)
110 ctf_integer(unsigned long, wait, stats->rs_wait)
111 ctf_integer(unsigned long, running, stats->rs_running)
112 ctf_integer(unsigned long, locked, stats->rs_locked)
113 ctf_integer(unsigned long, flushing, stats->rs_flushing)
114 ctf_integer(unsigned long, logging, stats->rs_logging)
115 ctf_integer(__u32, handle_count, stats->rs_handle_count)
116 ctf_integer(__u32, blocks, stats->rs_blocks)
117 ctf_integer(__u32, blocks_logged, stats->rs_blocks_logged)
118 )
119 )
120
121 LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats,
122 TP_PROTO(dev_t dev, unsigned long tid,
123 struct transaction_chp_stats_s *stats),
124
125 TP_ARGS(dev, tid, stats),
126
127 TP_FIELDS(
128 ctf_integer(dev_t, dev, dev)
129 ctf_integer(unsigned long, tid, tid)
130 ctf_integer(unsigned long, chp_time, stats->cs_chp_time)
131 ctf_integer(__u32, forced_to_close, stats->cs_forced_to_close)
132 ctf_integer(__u32, written, stats->cs_written)
133 ctf_integer(__u32, dropped, stats->cs_dropped)
134 )
135 )
136
137 LTTNG_TRACEPOINT_EVENT(jbd2_update_log_tail,
138
139 TP_PROTO(journal_t *journal, tid_t first_tid,
140 unsigned long block_nr, unsigned long freed),
141
142 TP_ARGS(journal, first_tid, block_nr, freed),
143
144 TP_FIELDS(
145 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
146 ctf_integer(tid_t, tail_sequence, journal->j_tail_sequence)
147 ctf_integer(tid_t, first_tid, first_tid)
148 ctf_integer(unsigned long, block_nr, block_nr)
149 ctf_integer(unsigned long, freed, freed)
150 )
151 )
152
153 LTTNG_TRACEPOINT_EVENT(jbd2_write_superblock,
154
155 TP_PROTO(journal_t *journal, int write_op),
156
157 TP_ARGS(journal, write_op),
158
159 TP_FIELDS(
160 ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
161 ctf_integer(int, write_op, write_op)
162 )
163 )
164
165 #endif /* LTTNG_TRACE_JBD2_H */
166
167 /* This part must be outside protection */
168 #include <lttng/define_trace.h>
This page took 0.032138 seconds and 4 git commands to generate.