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