aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-05-23 12:33:02 -0400
committerJan Kara <jack@suse.cz>2011-06-25 11:29:51 -0400
commit99cb1a318c37bf462c53d43f4dacb7b4896ce0c9 (patch)
tree32a9046649777e8cc589bbc8e0afb382642ba450 /include
parent785c4bcc0d88ff006a0b2120815a71e86ecf21ce (diff)
jbd: Add fixed tracepoints
This commit adds fixed tracepoint for jbd. It has been based on fixed tracepoints for jbd2, however there are missing those for collecting statistics, since I think that it will require more intrusive patch so I should have its own commit, if someone decide that it is needed. Also there are new tracepoints in __journal_drop_transaction() and journal_update_superblock(). The list of jbd tracepoints: jbd_checkpoint jbd_start_commit jbd_commit_locking jbd_commit_flushing jbd_commit_logging jbd_drop_transaction jbd_end_commit jbd_do_submit_data jbd_cleanup_journal_tail jbd_update_superblock_end Signed-off-by: Lukas Czerner <lczerner@redhat.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/jbd.h203
1 files changed, 203 insertions, 0 deletions
diff --git a/include/trace/events/jbd.h b/include/trace/events/jbd.h
new file mode 100644
index 000000000000..aff64d82d713
--- /dev/null
+++ b/include/trace/events/jbd.h
@@ -0,0 +1,203 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM jbd
3
4#if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_JBD_H
6
7#include <linux/jbd.h>
8#include <linux/tracepoint.h>
9
10TRACE_EVENT(jbd_checkpoint,
11
12 TP_PROTO(journal_t *journal, int result),
13
14 TP_ARGS(journal, result),
15
16 TP_STRUCT__entry(
17 __field( dev_t, dev )
18 __field( int, result )
19 ),
20
21 TP_fast_assign(
22 __entry->dev = journal->j_fs_dev->bd_dev;
23 __entry->result = result;
24 ),
25
26 TP_printk("dev %d,%d result %d",
27 MAJOR(__entry->dev), MINOR(__entry->dev),
28 __entry->result)
29);
30
31DECLARE_EVENT_CLASS(jbd_commit,
32
33 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
34
35 TP_ARGS(journal, commit_transaction),
36
37 TP_STRUCT__entry(
38 __field( dev_t, dev )
39 __field( char, sync_commit )
40 __field( int, transaction )
41 ),
42
43 TP_fast_assign(
44 __entry->dev = journal->j_fs_dev->bd_dev;
45 __entry->sync_commit = commit_transaction->t_synchronous_commit;
46 __entry->transaction = commit_transaction->t_tid;
47 ),
48
49 TP_printk("dev %d,%d transaction %d sync %d",
50 MAJOR(__entry->dev), MINOR(__entry->dev),
51 __entry->transaction, __entry->sync_commit)
52);
53
54DEFINE_EVENT(jbd_commit, jbd_start_commit,
55
56 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
57
58 TP_ARGS(journal, commit_transaction)
59);
60
61DEFINE_EVENT(jbd_commit, jbd_commit_locking,
62
63 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
64
65 TP_ARGS(journal, commit_transaction)
66);
67
68DEFINE_EVENT(jbd_commit, jbd_commit_flushing,
69
70 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
71
72 TP_ARGS(journal, commit_transaction)
73);
74
75DEFINE_EVENT(jbd_commit, jbd_commit_logging,
76
77 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
78
79 TP_ARGS(journal, commit_transaction)
80);
81
82TRACE_EVENT(jbd_drop_transaction,
83
84 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
85
86 TP_ARGS(journal, commit_transaction),
87
88 TP_STRUCT__entry(
89 __field( dev_t, dev )
90 __field( char, sync_commit )
91 __field( int, transaction )
92 ),
93
94 TP_fast_assign(
95 __entry->dev = journal->j_fs_dev->bd_dev;
96 __entry->sync_commit = commit_transaction->t_synchronous_commit;
97 __entry->transaction = commit_transaction->t_tid;
98 ),
99
100 TP_printk("dev %d,%d transaction %d sync %d",
101 MAJOR(__entry->dev), MINOR(__entry->dev),
102 __entry->transaction, __entry->sync_commit)
103);
104
105TRACE_EVENT(jbd_end_commit,
106 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
107
108 TP_ARGS(journal, commit_transaction),
109
110 TP_STRUCT__entry(
111 __field( dev_t, dev )
112 __field( char, sync_commit )
113 __field( int, transaction )
114 __field( int, head )
115 ),
116
117 TP_fast_assign(
118 __entry->dev = journal->j_fs_dev->bd_dev;
119 __entry->sync_commit = commit_transaction->t_synchronous_commit;
120 __entry->transaction = commit_transaction->t_tid;
121 __entry->head = journal->j_tail_sequence;
122 ),
123
124 TP_printk("dev %d,%d transaction %d sync %d head %d",
125 MAJOR(__entry->dev), MINOR(__entry->dev),
126 __entry->transaction, __entry->sync_commit, __entry->head)
127);
128
129TRACE_EVENT(jbd_do_submit_data,
130 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
131
132 TP_ARGS(journal, commit_transaction),
133
134 TP_STRUCT__entry(
135 __field( dev_t, dev )
136 __field( char, sync_commit )
137 __field( int, transaction )
138 ),
139
140 TP_fast_assign(
141 __entry->dev = journal->j_fs_dev->bd_dev;
142 __entry->sync_commit = commit_transaction->t_synchronous_commit;
143 __entry->transaction = commit_transaction->t_tid;
144 ),
145
146 TP_printk("dev %d,%d transaction %d sync %d",
147 MAJOR(__entry->dev), MINOR(__entry->dev),
148 __entry->transaction, __entry->sync_commit)
149);
150
151TRACE_EVENT(jbd_cleanup_journal_tail,
152
153 TP_PROTO(journal_t *journal, tid_t first_tid,
154 unsigned long block_nr, unsigned long freed),
155
156 TP_ARGS(journal, first_tid, block_nr, freed),
157
158 TP_STRUCT__entry(
159 __field( dev_t, dev )
160 __field( tid_t, tail_sequence )
161 __field( tid_t, first_tid )
162 __field(unsigned long, block_nr )
163 __field(unsigned long, freed )
164 ),
165
166 TP_fast_assign(
167 __entry->dev = journal->j_fs_dev->bd_dev;
168 __entry->tail_sequence = journal->j_tail_sequence;
169 __entry->first_tid = first_tid;
170 __entry->block_nr = block_nr;
171 __entry->freed = freed;
172 ),
173
174 TP_printk("dev %d,%d from %u to %u offset %lu freed %lu",
175 MAJOR(__entry->dev), MINOR(__entry->dev),
176 __entry->tail_sequence, __entry->first_tid,
177 __entry->block_nr, __entry->freed)
178);
179
180TRACE_EVENT(jbd_update_superblock_end,
181 TP_PROTO(journal_t *journal, int wait),
182
183 TP_ARGS(journal, wait),
184
185 TP_STRUCT__entry(
186 __field( dev_t, dev )
187 __field( int, wait )
188 ),
189
190 TP_fast_assign(
191 __entry->dev = journal->j_fs_dev->bd_dev;
192 __entry->wait = wait;
193 ),
194
195 TP_printk("dev %d,%d wait %d",
196 MAJOR(__entry->dev), MINOR(__entry->dev),
197 __entry->wait)
198);
199
200#endif /* _TRACE_JBD_H */
201
202/* This part must be outside protection */
203#include <trace/define_trace.h>