Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
b87700e3 AG |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM btrfs | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_BTRFS_H | |
b87700e3 | 7 | |
6ec43db8 | 8 | #include <probes/lttng-tracepoint-event.h> |
b87700e3 | 9 | #include <linux/writeback.h> |
2d042821 | 10 | #include <lttng-kernel-version.h> |
b87700e3 AG |
11 | |
12 | #ifndef _TRACE_BTRFS_DEF_ | |
13 | #define _TRACE_BTRFS_DEF_ | |
14 | struct btrfs_root; | |
15 | struct btrfs_fs_info; | |
16 | struct btrfs_inode; | |
17 | struct extent_map; | |
18 | struct btrfs_ordered_extent; | |
19 | struct btrfs_delayed_ref_node; | |
20 | struct btrfs_delayed_tree_ref; | |
21 | struct btrfs_delayed_data_ref; | |
22 | struct btrfs_delayed_ref_head; | |
2d042821 | 23 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 | 24 | struct btrfs_block_group; |
2d042821 | 25 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
b87700e3 | 26 | struct btrfs_block_group_cache; |
5809d816 | 27 | #endif |
2d042821 | 28 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
b87700e3 AG |
29 | struct btrfs_free_cluster; |
30 | #endif | |
31 | struct map_lookup; | |
32 | struct extent_buffer; | |
2d042821 | 33 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) |
b87700e3 AG |
34 | struct extent_state; |
35 | #endif | |
36 | #endif | |
37 | ||
b87700e3 AG |
38 | #define BTRFS_UUID_SIZE 16 |
39 | ||
2d042821 | 40 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0)) |
9d2f1147 MJ |
41 | #define lttng_fs_info_fsid fs_info->fs_devices->fsid |
42 | #else | |
43 | #define lttng_fs_info_fsid fs_info->fsid | |
44 | #endif | |
45 | ||
2d042821 | 46 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
47 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
48 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
49 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 50 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
51 | LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit, |
52 | ||
53 | TP_PROTO(const struct btrfs_root *root), | |
54 | ||
55 | TP_ARGS(root), | |
56 | ||
57 | TP_FIELDS( | |
58 | ctf_integer(u64, generation, root->fs_info->generation) | |
59 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
60 | ) | |
61 | ) | |
62 | ||
63 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode, | |
64 | ||
65 | TP_PROTO(const struct inode *inode), | |
66 | ||
67 | TP_ARGS(inode), | |
68 | ||
69 | TP_FIELDS( | |
70 | ctf_integer(ino_t, ino, inode->i_ino) | |
71 | ctf_integer(blkcnt_t, blocks, inode->i_blocks) | |
72 | ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size) | |
73 | ctf_integer(u64, generation, BTRFS_I(inode)->generation) | |
74 | ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans) | |
75 | ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans) | |
76 | ctf_integer(u64, root_objectid, | |
77 | BTRFS_I(inode)->root->root_key.objectid) | |
78 | ) | |
79 | ) | |
80 | ||
81 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new, | |
82 | ||
83 | TP_PROTO(const struct inode *inode), | |
84 | ||
85 | TP_ARGS(inode) | |
86 | ) | |
87 | ||
88 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request, | |
89 | ||
90 | TP_PROTO(const struct inode *inode), | |
91 | ||
92 | TP_ARGS(inode) | |
93 | ) | |
94 | ||
95 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict, | |
96 | ||
97 | TP_PROTO(const struct inode *inode), | |
98 | ||
99 | TP_ARGS(inode) | |
100 | ) | |
101 | #else | |
3bc29f0a | 102 | LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit, |
b87700e3 AG |
103 | |
104 | TP_PROTO(struct btrfs_root *root), | |
105 | ||
106 | TP_ARGS(root), | |
107 | ||
f127e61e MD |
108 | TP_FIELDS( |
109 | ctf_integer(u64, generation, root->fs_info->generation) | |
110 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
111 | ) | |
b87700e3 AG |
112 | ) |
113 | ||
3bc29f0a | 114 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode, |
b87700e3 AG |
115 | |
116 | TP_PROTO(struct inode *inode), | |
117 | ||
118 | TP_ARGS(inode), | |
119 | ||
f127e61e MD |
120 | TP_FIELDS( |
121 | ctf_integer(ino_t, ino, inode->i_ino) | |
122 | ctf_integer(blkcnt_t, blocks, inode->i_blocks) | |
123 | ctf_integer(u64, disk_i_size, BTRFS_I(inode)->disk_i_size) | |
124 | ctf_integer(u64, generation, BTRFS_I(inode)->generation) | |
125 | ctf_integer(u64, last_trans, BTRFS_I(inode)->last_trans) | |
126 | ctf_integer(u64, logged_trans, BTRFS_I(inode)->logged_trans) | |
127 | ctf_integer(u64, root_objectid, | |
b87700e3 | 128 | BTRFS_I(inode)->root->root_key.objectid) |
f127e61e | 129 | ) |
b87700e3 AG |
130 | ) |
131 | ||
3bc29f0a | 132 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_new, |
b87700e3 AG |
133 | |
134 | TP_PROTO(struct inode *inode), | |
135 | ||
136 | TP_ARGS(inode) | |
137 | ) | |
138 | ||
3bc29f0a | 139 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_request, |
b87700e3 AG |
140 | |
141 | TP_PROTO(struct inode *inode), | |
142 | ||
143 | TP_ARGS(inode) | |
144 | ) | |
145 | ||
3bc29f0a | 146 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict, |
b87700e3 AG |
147 | |
148 | TP_PROTO(struct inode *inode), | |
149 | ||
150 | TP_ARGS(inode) | |
151 | ) | |
1f1ec4ed MJ |
152 | #endif |
153 | ||
2d042821 | 154 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
155 | |
156 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, | |
157 | ||
158 | TP_PROTO(const struct btrfs_root *root, const struct btrfs_inode *inode, | |
159 | const struct extent_map *map), | |
160 | ||
161 | TP_ARGS(root, inode, map), | |
162 | ||
163 | TP_FIELDS( | |
164 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
165 | ctf_integer(u64, ino, btrfs_ino(inode)) | |
166 | ctf_integer(u64, start, map->start) | |
167 | ctf_integer(u64, len, map->len) | |
168 | ctf_integer(u64, orig_start, map->orig_start) | |
169 | ctf_integer(u64, block_start, map->block_start) | |
170 | ctf_integer(u64, block_len, map->block_len) | |
171 | ctf_integer(unsigned long, flags, map->flags) | |
172 | ctf_integer(int, refs, refcount_read(&map->refs)) | |
173 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
174 | ) | |
175 | ) | |
b87700e3 | 176 | |
2d042821 | 177 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0)) |
5807b1af MJ |
178 | |
179 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, | |
180 | ||
181 | TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode, | |
182 | struct extent_map *map), | |
183 | ||
184 | TP_ARGS(root, inode, map), | |
185 | ||
186 | TP_FIELDS( | |
187 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
188 | ctf_integer(u64, ino, btrfs_ino(inode)) | |
189 | ctf_integer(u64, start, map->start) | |
190 | ctf_integer(u64, len, map->len) | |
191 | ctf_integer(u64, orig_start, map->orig_start) | |
192 | ctf_integer(u64, block_start, map->block_start) | |
193 | ctf_integer(u64, block_len, map->block_len) | |
194 | ctf_integer(unsigned long, flags, map->flags) | |
195 | ctf_integer(int, refs, refcount_read(&map->refs)) | |
196 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
197 | ) | |
198 | ) | |
199 | ||
2d042821 | 200 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) |
e52717ea FD |
201 | |
202 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, | |
203 | ||
204 | TP_PROTO(struct btrfs_root *root, struct btrfs_inode *inode, | |
205 | struct extent_map *map), | |
206 | ||
207 | TP_ARGS(root, inode, map), | |
208 | ||
209 | TP_FIELDS( | |
210 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
211 | ctf_integer(u64, ino, btrfs_ino(inode)) | |
212 | ctf_integer(u64, start, map->start) | |
213 | ctf_integer(u64, len, map->len) | |
214 | ctf_integer(u64, orig_start, map->orig_start) | |
215 | ctf_integer(u64, block_start, map->block_start) | |
216 | ctf_integer(u64, block_len, map->block_len) | |
217 | ctf_integer(unsigned long, flags, map->flags) | |
218 | ctf_integer(int, refs, atomic_read(&map->refs)) | |
219 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
220 | ) | |
221 | ) | |
222 | ||
2d042821 | 223 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
f1a87e24 | 224 | |
3bc29f0a | 225 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, |
b87700e3 | 226 | |
f3166f27 MD |
227 | TP_PROTO(struct btrfs_root *root, struct inode *inode, |
228 | struct extent_map *map), | |
b87700e3 | 229 | |
f3166f27 | 230 | TP_ARGS(root, inode, map), |
b87700e3 | 231 | |
f127e61e MD |
232 | TP_FIELDS( |
233 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
f3166f27 | 234 | ctf_integer(u64, ino, btrfs_ino(inode)) |
f127e61e MD |
235 | ctf_integer(u64, start, map->start) |
236 | ctf_integer(u64, len, map->len) | |
237 | ctf_integer(u64, orig_start, map->orig_start) | |
238 | ctf_integer(u64, block_start, map->block_start) | |
239 | ctf_integer(u64, block_len, map->block_len) | |
240 | ctf_integer(unsigned long, flags, map->flags) | |
241 | ctf_integer(int, refs, atomic_read(&map->refs)) | |
242 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
243 | ) | |
b87700e3 AG |
244 | ) |
245 | ||
0badc02f MJ |
246 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
247 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
248 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
249 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
250 | |
251 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, | |
252 | ||
253 | TP_PROTO(const struct btrfs_root *root, const struct extent_map *map), | |
254 | ||
255 | TP_ARGS(root, map), | |
256 | ||
257 | TP_FIELDS( | |
258 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
259 | ctf_integer(u64, start, map->start) | |
260 | ctf_integer(u64, len, map->len) | |
261 | ctf_integer(u64, orig_start, map->orig_start) | |
262 | ctf_integer(u64, block_start, map->block_start) | |
263 | ctf_integer(u64, block_len, map->block_len) | |
264 | ctf_integer(unsigned long, flags, map->flags) | |
265 | ctf_integer(int, refs, atomic_read(&map->refs)) | |
266 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
267 | ) | |
268 | ) | |
269 | ||
2d042821 | 270 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
f1a87e24 MD |
271 | |
272 | LTTNG_TRACEPOINT_EVENT(btrfs_get_extent, | |
273 | ||
274 | TP_PROTO(struct btrfs_root *root, struct extent_map *map), | |
275 | ||
276 | TP_ARGS(root, map), | |
277 | ||
278 | TP_FIELDS( | |
279 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
280 | ctf_integer(u64, start, map->start) | |
281 | ctf_integer(u64, len, map->len) | |
282 | ctf_integer(u64, orig_start, map->orig_start) | |
283 | ctf_integer(u64, block_start, map->block_start) | |
284 | ctf_integer(u64, block_len, map->block_len) | |
285 | ctf_integer(unsigned long, flags, map->flags) | |
286 | ctf_integer(int, refs, atomic_read(&map->refs)) | |
287 | ctf_integer(unsigned int, compress_type, map->compress_type) | |
288 | ) | |
289 | ) | |
290 | ||
2d042821 | 291 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
f1a87e24 | 292 | |
2d042821 | 293 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
ae5af8ea MJ |
294 | LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist, |
295 | ||
296 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
297 | const struct extent_map *existing, const struct extent_map *map, | |
298 | u64 start, u64 len), | |
299 | ||
300 | TP_ARGS(fs_info, existing, map, start, len), | |
301 | ||
302 | TP_FIELDS( | |
303 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
304 | ctf_integer(u64, e_start, existing->start) | |
305 | ctf_integer(u64, e_len, existing->len) | |
306 | ctf_integer(u64, map_start, map->start) | |
307 | ctf_integer(u64, map_len, map->len) | |
308 | ctf_integer(u64, start, start) | |
309 | ctf_integer(u64, len, len) | |
310 | ) | |
311 | ) | |
2d042821 | 312 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0)) |
354b9790 MJ |
313 | LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist, |
314 | ||
315 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
316 | const struct extent_map *existing, const struct extent_map *map, | |
317 | u64 start, u64 len), | |
318 | ||
319 | TP_ARGS(fs_info, existing, map, start, len), | |
320 | ||
321 | TP_FIELDS( | |
9d2f1147 | 322 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
354b9790 MJ |
323 | ctf_integer(u64, e_start, existing->start) |
324 | ctf_integer(u64, e_len, existing->len) | |
325 | ctf_integer(u64, map_start, map->start) | |
326 | ctf_integer(u64, map_len, map->len) | |
327 | ctf_integer(u64, start, start) | |
328 | ctf_integer(u64, len, len) | |
329 | ) | |
330 | ) | |
2d042821 | 331 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0)) |
22df20ca MJ |
332 | LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist, |
333 | ||
334 | TP_PROTO(const struct extent_map *existing, const struct extent_map *map, u64 start, u64 len), | |
335 | ||
336 | TP_ARGS(existing, map, start, len), | |
337 | ||
338 | TP_FIELDS( | |
339 | ctf_integer(u64, e_start, existing->start) | |
340 | ctf_integer(u64, e_len, existing->len) | |
341 | ctf_integer(u64, map_start, map->start) | |
342 | ctf_integer(u64, map_len, map->len) | |
343 | ctf_integer(u64, start, start) | |
344 | ctf_integer(u64, len, len) | |
345 | ) | |
346 | ) | |
347 | #endif | |
348 | ||
2d042821 | 349 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0)) |
ddad4e82 MJ |
350 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
351 | ||
352 | TP_PROTO(const struct btrfs_inode *inode, | |
353 | const struct btrfs_ordered_extent *ordered), | |
354 | ||
355 | TP_ARGS(inode, ordered), | |
356 | ||
357 | TP_FIELDS( | |
358 | ctf_array(u8, fsid, inode->root->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
359 | ctf_integer(ino_t, ino, btrfs_ino(inode)) | |
360 | ctf_integer(u64, file_offset, ordered->file_offset) | |
361 | ctf_integer(u64, start, ordered->disk_bytenr) | |
362 | ctf_integer(u64, len, ordered->num_bytes) | |
363 | ctf_integer(u64, disk_len, ordered->disk_num_bytes) | |
364 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
365 | ctf_integer(unsigned long, flags, ordered->flags) | |
366 | ctf_integer(int, compress_type, ordered->compress_type) | |
367 | ctf_integer(int, refs, refcount_read(&ordered->refs)) | |
368 | ctf_integer(u64, root_objectid, inode->root->root_key.objectid) | |
369 | ) | |
370 | ) | |
2d042821 | 371 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) |
2d7f5dcc MJ |
372 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
373 | ||
374 | TP_PROTO(const struct inode *inode, | |
375 | const struct btrfs_ordered_extent *ordered), | |
376 | ||
377 | TP_ARGS(inode, ordered), | |
378 | ||
379 | TP_FIELDS( | |
380 | ctf_integer(ino_t, ino, inode->i_ino) | |
381 | ctf_integer(u64, file_offset, ordered->file_offset) | |
382 | ctf_integer(u64, start, ordered->disk_bytenr) | |
383 | ctf_integer(u64, len, ordered->num_bytes) | |
384 | ctf_integer(u64, disk_len, ordered->disk_num_bytes) | |
385 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
386 | ctf_integer(unsigned long, flags, ordered->flags) | |
387 | ctf_integer(int, compress_type, ordered->compress_type) | |
388 | ctf_integer(int, refs, refcount_read(&ordered->refs)) | |
389 | ctf_integer(u64, root_objectid, | |
390 | BTRFS_I(inode)->root->root_key.objectid) | |
391 | ) | |
392 | ) | |
2d042821 | 393 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
394 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
395 | ||
396 | TP_PROTO(const struct inode *inode, | |
397 | const struct btrfs_ordered_extent *ordered), | |
398 | ||
399 | TP_ARGS(inode, ordered), | |
400 | ||
401 | TP_FIELDS( | |
402 | ctf_integer(ino_t, ino, inode->i_ino) | |
403 | ctf_integer(u64, file_offset, ordered->file_offset) | |
404 | ctf_integer(u64, start, ordered->start) | |
405 | ctf_integer(u64, len, ordered->len) | |
406 | ctf_integer(u64, disk_len, ordered->disk_len) | |
407 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
408 | ctf_integer(unsigned long, flags, ordered->flags) | |
409 | ctf_integer(int, compress_type, ordered->compress_type) | |
410 | ctf_integer(int, refs, refcount_read(&ordered->refs)) | |
411 | ctf_integer(u64, root_objectid, | |
412 | BTRFS_I(inode)->root->root_key.objectid) | |
413 | ) | |
414 | ) | |
2d042821 | 415 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0)) |
5807b1af MJ |
416 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
417 | ||
418 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
419 | ||
420 | TP_ARGS(inode, ordered), | |
421 | ||
422 | TP_FIELDS( | |
423 | ctf_integer(ino_t, ino, inode->i_ino) | |
424 | ctf_integer(u64, file_offset, ordered->file_offset) | |
425 | ctf_integer(u64, start, ordered->start) | |
426 | ctf_integer(u64, len, ordered->len) | |
427 | ctf_integer(u64, disk_len, ordered->disk_len) | |
428 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
429 | ctf_integer(unsigned long, flags, ordered->flags) | |
430 | ctf_integer(int, compress_type, ordered->compress_type) | |
431 | ctf_integer(int, refs, refcount_read(&ordered->refs)) | |
432 | ctf_integer(u64, root_objectid, | |
433 | BTRFS_I(inode)->root->root_key.objectid) | |
434 | ) | |
435 | ) | |
0badc02f MJ |
436 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
437 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
438 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
439 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
440 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
441 | ||
442 | TP_PROTO(const struct inode *inode, const struct btrfs_ordered_extent *ordered), | |
443 | ||
444 | TP_ARGS(inode, ordered), | |
445 | ||
446 | TP_FIELDS( | |
447 | ctf_integer(ino_t, ino, inode->i_ino) | |
448 | ctf_integer(u64, file_offset, ordered->file_offset) | |
449 | ctf_integer(u64, start, ordered->start) | |
450 | ctf_integer(u64, len, ordered->len) | |
451 | ctf_integer(u64, disk_len, ordered->disk_len) | |
452 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
453 | ctf_integer(unsigned long, flags, ordered->flags) | |
454 | ctf_integer(int, compress_type, ordered->compress_type) | |
455 | ctf_integer(int, refs, atomic_read(&ordered->refs)) | |
456 | ctf_integer(u64, root_objectid, | |
457 | BTRFS_I(inode)->root->root_key.objectid) | |
458 | ) | |
459 | ) | |
5807b1af | 460 | #else |
3bc29f0a | 461 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, |
b87700e3 AG |
462 | |
463 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
464 | ||
465 | TP_ARGS(inode, ordered), | |
466 | ||
f127e61e MD |
467 | TP_FIELDS( |
468 | ctf_integer(ino_t, ino, inode->i_ino) | |
469 | ctf_integer(u64, file_offset, ordered->file_offset) | |
470 | ctf_integer(u64, start, ordered->start) | |
471 | ctf_integer(u64, len, ordered->len) | |
472 | ctf_integer(u64, disk_len, ordered->disk_len) | |
473 | ctf_integer(u64, bytes_left, ordered->bytes_left) | |
474 | ctf_integer(unsigned long, flags, ordered->flags) | |
475 | ctf_integer(int, compress_type, ordered->compress_type) | |
476 | ctf_integer(int, refs, atomic_read(&ordered->refs)) | |
477 | ctf_integer(u64, root_objectid, | |
b87700e3 | 478 | BTRFS_I(inode)->root->root_key.objectid) |
f127e61e | 479 | ) |
b87700e3 | 480 | ) |
5807b1af | 481 | #endif |
b87700e3 | 482 | |
2d042821 | 483 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0)) |
ddad4e82 MJ |
484 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add, |
485 | ||
486 | TP_PROTO(const struct btrfs_inode *inode, | |
487 | const struct btrfs_ordered_extent *ordered), | |
488 | ||
489 | TP_ARGS(inode, ordered) | |
490 | ) | |
491 | ||
492 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove, | |
493 | ||
494 | TP_PROTO(const struct btrfs_inode *inode, | |
495 | const struct btrfs_ordered_extent *ordered), | |
496 | ||
497 | TP_ARGS(inode, ordered) | |
498 | ) | |
499 | ||
500 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start, | |
501 | ||
502 | TP_PROTO(const struct btrfs_inode *inode, | |
503 | const struct btrfs_ordered_extent *ordered), | |
504 | ||
505 | TP_ARGS(inode, ordered) | |
506 | ) | |
507 | ||
508 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put, | |
509 | ||
510 | TP_PROTO(const struct btrfs_inode *inode, | |
511 | const struct btrfs_ordered_extent *ordered), | |
512 | ||
513 | TP_ARGS(inode, ordered) | |
514 | ) | |
2d042821 | 515 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
516 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
517 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
518 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 519 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
520 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add, |
521 | ||
522 | TP_PROTO(const struct inode *inode, | |
523 | const struct btrfs_ordered_extent *ordered), | |
524 | ||
525 | TP_ARGS(inode, ordered) | |
526 | ) | |
527 | ||
528 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove, | |
529 | ||
530 | TP_PROTO(const struct inode *inode, | |
531 | const struct btrfs_ordered_extent *ordered), | |
532 | ||
533 | TP_ARGS(inode, ordered) | |
534 | ) | |
535 | ||
536 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start, | |
537 | ||
538 | TP_PROTO(const struct inode *inode, | |
539 | const struct btrfs_ordered_extent *ordered), | |
540 | ||
541 | TP_ARGS(inode, ordered) | |
542 | ) | |
543 | ||
544 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put, | |
545 | ||
546 | TP_PROTO(const struct inode *inode, | |
547 | const struct btrfs_ordered_extent *ordered), | |
548 | ||
549 | TP_ARGS(inode, ordered) | |
550 | ) | |
ddad4e82 MJ |
551 | #else |
552 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add, | |
553 | ||
554 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
555 | ||
556 | TP_ARGS(inode, ordered) | |
557 | ) | |
558 | ||
559 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_remove, | |
1f1ec4ed | 560 | |
ddad4e82 MJ |
561 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), |
562 | ||
563 | TP_ARGS(inode, ordered) | |
564 | ) | |
565 | ||
566 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_start, | |
567 | ||
568 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
569 | ||
570 | TP_ARGS(inode, ordered) | |
571 | ) | |
572 | ||
573 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put, | |
574 | ||
575 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | |
576 | ||
577 | TP_ARGS(inode, ordered) | |
578 | ) | |
579 | #endif | |
580 | ||
39192dfb MJ |
581 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,14,0)) |
582 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, | |
583 | ||
584 | TP_PROTO(const struct btrfs_inode *inode, u64 start, u64 end, int uptodate), | |
585 | ||
586 | TP_ARGS(inode, start, end, uptodate), | |
587 | ||
588 | TP_FIELDS( | |
589 | ctf_integer(u64, ino, btrfs_ino(inode)) | |
590 | ctf_integer(u64, start, start) | |
591 | ctf_integer(u64, end, end) | |
592 | ctf_integer(int, uptodate, uptodate) | |
593 | ctf_integer(u64, root_objectid, inode->root->root_key.objectid) | |
594 | ) | |
595 | ) | |
596 | ||
597 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ | |
598 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ | |
599 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
600 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
601 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
602 | ||
603 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, | |
604 | ||
605 | TP_PROTO(const struct page *page, u64 start, u64 end, int uptodate), | |
606 | ||
607 | TP_ARGS(page, start, end, uptodate), | |
608 | ||
609 | TP_FIELDS( | |
610 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
611 | ctf_integer(pgoff_t, index, page->index) | |
612 | ctf_integer(u64, start, start) | |
613 | ctf_integer(u64, end, end) | |
614 | ctf_integer(int, uptodate, uptodate) | |
615 | ctf_integer(u64, root_objectid, | |
616 | BTRFS_I(page->mapping->host)->root->root_key.objectid) | |
617 | ) | |
618 | ) | |
619 | ||
620 | #else | |
621 | ||
622 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, | |
623 | ||
624 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | |
625 | ||
626 | TP_ARGS(page, start, end, uptodate), | |
627 | ||
628 | TP_FIELDS( | |
629 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
630 | ctf_integer(pgoff_t, index, page->index) | |
631 | ctf_integer(u64, start, start) | |
632 | ctf_integer(u64, end, end) | |
633 | ctf_integer(int, uptodate, uptodate) | |
634 | ctf_integer(u64, root_objectid, | |
635 | BTRFS_I(page->mapping->host)->root->root_key.objectid) | |
636 | ) | |
637 | ) | |
638 | #endif | |
639 | ||
2d042821 | 640 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
ddad4e82 MJ |
641 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
642 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
643 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
644 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
1f1ec4ed MJ |
645 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage, |
646 | ||
647 | TP_PROTO(const struct page *page, const struct inode *inode, | |
648 | const struct writeback_control *wbc), | |
649 | ||
650 | TP_ARGS(page, inode, wbc), | |
651 | ||
652 | TP_FIELDS( | |
653 | ctf_integer(ino_t, ino, inode->i_ino) | |
654 | ctf_integer(pgoff_t, index, page->index) | |
655 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
656 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
657 | ctf_integer(loff_t, range_start, wbc->range_start) | |
658 | ctf_integer(loff_t, range_end, wbc->range_end) | |
659 | ctf_integer(char, for_kupdate, wbc->for_kupdate) | |
660 | ctf_integer(char, for_reclaim, wbc->for_reclaim) | |
661 | ctf_integer(char, range_cyclic, wbc->range_cyclic) | |
662 | ctf_integer(pgoff_t, writeback_index, | |
663 | inode->i_mapping->writeback_index) | |
664 | ctf_integer(u64, root_objectid, | |
665 | BTRFS_I(inode)->root->root_key.objectid) | |
666 | ) | |
667 | ) | |
668 | ||
669 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage, | |
670 | ||
671 | __extent_writepage, | |
672 | ||
673 | btrfs__extent_writepage, | |
674 | ||
675 | TP_PROTO(const struct page *page, const struct inode *inode, | |
676 | const struct writeback_control *wbc), | |
677 | ||
678 | TP_ARGS(page, inode, wbc) | |
679 | ) | |
680 | ||
1f1ec4ed MJ |
681 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, |
682 | ||
683 | TP_PROTO(const struct file *file, int datasync), | |
684 | ||
685 | TP_ARGS(file, datasync), | |
686 | ||
687 | TP_FIELDS( | |
688 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
689 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
690 | ctf_integer(int, datasync, datasync) | |
691 | ctf_integer(u64, root_objectid, | |
692 | BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid) | |
693 | ) | |
694 | ) | |
695 | #else | |
3bc29f0a | 696 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage, |
b87700e3 AG |
697 | |
698 | TP_PROTO(struct page *page, struct inode *inode, | |
699 | struct writeback_control *wbc), | |
700 | ||
701 | TP_ARGS(page, inode, wbc), | |
702 | ||
f127e61e MD |
703 | TP_FIELDS( |
704 | ctf_integer(ino_t, ino, inode->i_ino) | |
705 | ctf_integer(pgoff_t, index, page->index) | |
706 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
707 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
708 | ctf_integer(loff_t, range_start, wbc->range_start) | |
709 | ctf_integer(loff_t, range_end, wbc->range_end) | |
2d042821 | 710 | #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0)) |
f127e61e | 711 | ctf_integer(char, nonblocking, wbc->nonblocking) |
b87700e3 | 712 | #endif |
f127e61e MD |
713 | ctf_integer(char, for_kupdate, wbc->for_kupdate) |
714 | ctf_integer(char, for_reclaim, wbc->for_reclaim) | |
715 | ctf_integer(char, range_cyclic, wbc->range_cyclic) | |
716 | ctf_integer(pgoff_t, writeback_index, | |
717 | inode->i_mapping->writeback_index) | |
718 | ctf_integer(u64, root_objectid, | |
719 | BTRFS_I(inode)->root->root_key.objectid) | |
720 | ) | |
b87700e3 AG |
721 | ) |
722 | ||
9bbf98da MD |
723 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage, |
724 | ||
725 | __extent_writepage, | |
726 | ||
727 | btrfs__extent_writepage, | |
b87700e3 AG |
728 | |
729 | TP_PROTO(struct page *page, struct inode *inode, | |
730 | struct writeback_control *wbc), | |
731 | ||
732 | TP_ARGS(page, inode, wbc) | |
733 | ) | |
734 | ||
3bc29f0a | 735 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, |
b87700e3 AG |
736 | |
737 | TP_PROTO(struct file *file, int datasync), | |
738 | ||
739 | TP_ARGS(file, datasync), | |
740 | ||
f127e61e MD |
741 | TP_FIELDS( |
742 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
743 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
744 | ctf_integer(int, datasync, datasync) | |
745 | ctf_integer(u64, root_objectid, | |
b87700e3 | 746 | BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid) |
f127e61e | 747 | ) |
b87700e3 | 748 | ) |
1f1ec4ed | 749 | #endif |
b87700e3 | 750 | |
2d042821 | 751 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
752 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
753 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
754 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
755 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
756 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
757 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
758 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
1f1ec4ed MJ |
759 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
760 | ||
761 | TP_PROTO(const struct btrfs_fs_info *fs_info, int wait), | |
762 | ||
763 | TP_ARGS(fs_info, wait), | |
764 | ||
765 | TP_FIELDS( | |
766 | ctf_integer(int, wait, wait) | |
767 | ) | |
768 | ) | |
2d042821 | 769 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fcd0a11c MD |
770 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
771 | ||
772 | TP_PROTO(struct btrfs_fs_info *fs_info, int wait), | |
773 | ||
774 | TP_ARGS(fs_info, wait), | |
775 | ||
776 | TP_FIELDS( | |
777 | ctf_integer(int, wait, wait) | |
778 | ) | |
779 | ) | |
780 | #else | |
3bc29f0a | 781 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
b87700e3 AG |
782 | |
783 | TP_PROTO(int wait), | |
784 | ||
785 | TP_ARGS(wait), | |
786 | ||
f127e61e MD |
787 | TP_FIELDS( |
788 | ctf_integer(int, wait, wait) | |
789 | ) | |
b87700e3 | 790 | ) |
fcd0a11c MD |
791 | #endif |
792 | ||
2d042821 | 793 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
794 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
795 | ||
796 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
797 | const struct btrfs_block_group *block_group, int create), | |
798 | ||
799 | TP_ARGS(fs_info, block_group, create), | |
800 | ||
801 | TP_FIELDS( | |
802 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
803 | ctf_integer(u64, offset, block_group->start) | |
804 | ctf_integer(u64, size, block_group->length) | |
805 | ctf_integer(u64, flags, block_group->flags) | |
806 | ctf_integer(u64, bytes_used, block_group->used) | |
807 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
808 | ctf_integer(int, create, create) | |
809 | ) | |
810 | ) | |
2d042821 | 811 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
812 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
813 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
814 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 815 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
816 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
817 | ||
818 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
819 | const struct btrfs_block_group_cache *block_group, int create), | |
820 | ||
821 | TP_ARGS(fs_info, block_group, create), | |
822 | ||
823 | TP_FIELDS( | |
9d2f1147 | 824 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
825 | ctf_integer(u64, offset, block_group->key.objectid) |
826 | ctf_integer(u64, size, block_group->key.offset) | |
827 | ctf_integer(u64, flags, block_group->flags) | |
828 | ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) | |
829 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
830 | ctf_integer(int, create, create) | |
831 | ) | |
832 | ) | |
833 | #else | |
fcd0a11c | 834 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
b87700e3 | 835 | |
fcd0a11c MD |
836 | TP_PROTO(struct btrfs_fs_info *fs_info, |
837 | struct btrfs_block_group_cache *block_group, int create), | |
838 | ||
839 | TP_ARGS(fs_info, block_group, create), | |
840 | ||
841 | TP_FIELDS( | |
9d2f1147 | 842 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fcd0a11c MD |
843 | ctf_integer(u64, offset, block_group->key.objectid) |
844 | ctf_integer(u64, size, block_group->key.offset) | |
845 | ctf_integer(u64, flags, block_group->flags) | |
846 | ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) | |
847 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
848 | ctf_integer(int, create, create) | |
849 | ) | |
850 | ) | |
1f1ec4ed | 851 | #endif |
fcd0a11c | 852 | |
2d042821 | 853 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
854 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
855 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
856 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
857 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
858 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
859 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
860 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
fde8b34a | 861 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
1f1ec4ed MJ |
862 | |
863 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
864 | const struct btrfs_delayed_ref_node *ref, | |
865 | const struct btrfs_delayed_tree_ref *full_ref, | |
866 | int action), | |
867 | ||
868 | TP_ARGS(fs_info, ref, full_ref, action), | |
869 | ||
870 | TP_FIELDS( | |
9d2f1147 | 871 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
872 | ctf_integer(u64, bytenr, ref->bytenr) |
873 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
874 | ctf_integer(int, action, action) | |
875 | ctf_integer(u64, parent, full_ref->parent) | |
876 | ctf_integer(u64, ref_root, full_ref->root) | |
877 | ctf_integer(int, level, full_ref->level) | |
878 | ctf_integer(int, type, ref->type) | |
879 | ctf_integer(u64, seq, ref->seq) | |
880 | ) | |
881 | ) | |
fde8b34a | 882 | |
426eff93 MD |
883 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
884 | ||
885 | add_delayed_tree_ref, | |
886 | ||
887 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
888 | |
889 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
890 | const struct btrfs_delayed_ref_node *ref, | |
891 | const struct btrfs_delayed_tree_ref *full_ref, | |
892 | int action), | |
893 | ||
894 | TP_ARGS(fs_info, ref, full_ref, action) | |
895 | ) | |
896 | ||
426eff93 MD |
897 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
898 | ||
899 | run_delayed_tree_ref, | |
900 | ||
901 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
902 | |
903 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
904 | const struct btrfs_delayed_ref_node *ref, | |
905 | const struct btrfs_delayed_tree_ref *full_ref, | |
906 | int action), | |
907 | ||
908 | TP_ARGS(fs_info, ref, full_ref, action) | |
909 | ) | |
2d042821 | 910 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fde8b34a | 911 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
fcd0a11c MD |
912 | |
913 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
914 | struct btrfs_delayed_ref_node *ref, | |
915 | struct btrfs_delayed_tree_ref *full_ref, | |
916 | int action), | |
917 | ||
918 | TP_ARGS(fs_info, ref, full_ref, action), | |
919 | ||
920 | TP_FIELDS( | |
9d2f1147 | 921 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fcd0a11c MD |
922 | ctf_integer(u64, bytenr, ref->bytenr) |
923 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
924 | ctf_integer(int, action, action) | |
925 | ctf_integer(u64, parent, full_ref->parent) | |
926 | ctf_integer(u64, ref_root, full_ref->root) | |
927 | ctf_integer(int, level, full_ref->level) | |
928 | ctf_integer(int, type, ref->type) | |
929 | ctf_integer(u64, seq, ref->seq) | |
930 | ) | |
931 | ) | |
fde8b34a | 932 | |
426eff93 MD |
933 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
934 | ||
935 | add_delayed_tree_ref, | |
936 | ||
937 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
938 | |
939 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
940 | struct btrfs_delayed_ref_node *ref, | |
941 | struct btrfs_delayed_tree_ref *full_ref, | |
942 | int action), | |
943 | ||
944 | TP_ARGS(fs_info, ref, full_ref, action) | |
945 | ) | |
946 | ||
426eff93 MD |
947 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
948 | ||
949 | run_delayed_tree_ref, | |
950 | ||
951 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
952 | |
953 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
954 | struct btrfs_delayed_ref_node *ref, | |
955 | struct btrfs_delayed_tree_ref *full_ref, | |
956 | int action), | |
957 | ||
958 | TP_ARGS(fs_info, ref, full_ref, action) | |
959 | ) | |
0badc02f MJ |
960 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
961 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, | |
962 | ||
963 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
964 | const struct btrfs_delayed_tree_ref *full_ref, | |
965 | int action), | |
966 | ||
967 | TP_ARGS(ref, full_ref, action), | |
968 | ||
969 | TP_FIELDS( | |
970 | ctf_integer(u64, bytenr, ref->bytenr) | |
971 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
972 | ctf_integer(int, action, action) | |
973 | ctf_integer(u64, parent, full_ref->parent) | |
974 | ctf_integer(u64, ref_root, full_ref->root) | |
975 | ctf_integer(int, level, full_ref->level) | |
976 | ctf_integer(int, type, ref->type) | |
977 | ctf_integer(u64, seq, ref->seq) | |
978 | ) | |
979 | ) | |
980 | ||
426eff93 MD |
981 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
982 | ||
983 | add_delayed_tree_ref, | |
984 | ||
985 | btrfs_add_delayed_tree_ref, | |
0badc02f MJ |
986 | |
987 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
988 | const struct btrfs_delayed_tree_ref *full_ref, | |
989 | int action), | |
990 | ||
991 | TP_ARGS(ref, full_ref, action) | |
992 | ) | |
993 | ||
426eff93 MD |
994 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
995 | ||
996 | run_delayed_tree_ref, | |
997 | ||
998 | btrfs_run_delayed_tree_ref, | |
0badc02f MJ |
999 | |
1000 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1001 | const struct btrfs_delayed_tree_ref *full_ref, | |
1002 | int action), | |
1003 | ||
1004 | TP_ARGS(ref, full_ref, action) | |
1005 | ) | |
2d042821 | 1006 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
fde8b34a MJ |
1007 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
1008 | ||
1009 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1010 | struct btrfs_delayed_tree_ref *full_ref, | |
1011 | int action), | |
1012 | ||
1013 | TP_ARGS(ref, full_ref, action), | |
1014 | ||
1015 | TP_FIELDS( | |
1016 | ctf_integer(u64, bytenr, ref->bytenr) | |
1017 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1018 | ctf_integer(int, action, action) | |
1019 | ctf_integer(u64, parent, full_ref->parent) | |
1020 | ctf_integer(u64, ref_root, full_ref->root) | |
1021 | ctf_integer(int, level, full_ref->level) | |
1022 | ctf_integer(int, type, ref->type) | |
1023 | ctf_integer(u64, seq, ref->seq) | |
1024 | ) | |
1025 | ) | |
1026 | ||
426eff93 MD |
1027 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
1028 | ||
1029 | add_delayed_tree_ref, | |
1030 | ||
1031 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
1032 | |
1033 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1034 | struct btrfs_delayed_tree_ref *full_ref, | |
1035 | int action), | |
1036 | ||
1037 | TP_ARGS(ref, full_ref, action) | |
1038 | ) | |
1039 | ||
426eff93 MD |
1040 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
1041 | ||
1042 | run_delayed_tree_ref, | |
1043 | ||
1044 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
1045 | |
1046 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1047 | struct btrfs_delayed_tree_ref *full_ref, | |
1048 | int action), | |
1049 | ||
1050 | TP_ARGS(ref, full_ref, action) | |
1051 | ) | |
2d042821 | 1052 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0)) |
3bc29f0a | 1053 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, |
b87700e3 AG |
1054 | |
1055 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1056 | struct btrfs_delayed_tree_ref *full_ref, | |
1057 | int action), | |
1058 | ||
1059 | TP_ARGS(ref, full_ref, action), | |
1060 | ||
f127e61e MD |
1061 | TP_FIELDS( |
1062 | ctf_integer(u64, bytenr, ref->bytenr) | |
1063 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1064 | ctf_integer(int, action, action) | |
1065 | ctf_integer(u64, parent, full_ref->parent) | |
1066 | ctf_integer(u64, ref_root, full_ref->root) | |
1067 | ctf_integer(int, level, full_ref->level) | |
1068 | ctf_integer(int, type, ref->type) | |
f127e61e | 1069 | ctf_integer(u64, seq, ref->seq) |
fde8b34a MJ |
1070 | ) |
1071 | ) | |
1072 | #else | |
1073 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, | |
1074 | ||
1075 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1076 | struct btrfs_delayed_tree_ref *full_ref, | |
1077 | int action), | |
1078 | ||
1079 | TP_ARGS(ref, full_ref, action), | |
1080 | ||
1081 | TP_FIELDS( | |
1082 | ctf_integer(u64, bytenr, ref->bytenr) | |
1083 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1084 | ctf_integer(int, action, action) | |
1085 | ctf_integer(u64, parent, full_ref->parent) | |
1086 | ctf_integer(u64, ref_root, full_ref->root) | |
1087 | ctf_integer(int, level, full_ref->level) | |
1088 | ctf_integer(int, type, ref->type) | |
f127e61e | 1089 | ) |
b87700e3 | 1090 | ) |
fcd0a11c | 1091 | #endif |
b87700e3 | 1092 | |
2d042821 | 1093 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1094 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1095 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1096 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1097 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
1098 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
1099 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
1100 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
fde8b34a MJ |
1101 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1102 | ||
1103 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1104 | const struct btrfs_delayed_ref_node *ref, | |
1105 | const struct btrfs_delayed_data_ref *full_ref, | |
1106 | int action), | |
1107 | ||
1108 | TP_ARGS(fs_info, ref, full_ref, action), | |
1109 | ||
1110 | TP_FIELDS( | |
9d2f1147 | 1111 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fde8b34a MJ |
1112 | ctf_integer(u64, bytenr, ref->bytenr) |
1113 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1114 | ctf_integer(int, action, action) | |
1115 | ctf_integer(u64, parent, full_ref->parent) | |
1116 | ctf_integer(u64, ref_root, full_ref->root) | |
1117 | ctf_integer(u64, owner, full_ref->objectid) | |
1118 | ctf_integer(u64, offset, full_ref->offset) | |
1119 | ctf_integer(int, type, ref->type) | |
1120 | ctf_integer(u64, seq, ref->seq) | |
1121 | ) | |
1122 | ) | |
1123 | ||
426eff93 MD |
1124 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1125 | ||
1126 | add_delayed_data_ref, | |
1127 | ||
1128 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
1129 | |
1130 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1131 | const struct btrfs_delayed_ref_node *ref, | |
1132 | const struct btrfs_delayed_data_ref *full_ref, | |
1133 | int action), | |
1134 | ||
1135 | TP_ARGS(fs_info, ref, full_ref, action) | |
1136 | ) | |
1137 | ||
426eff93 MD |
1138 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1139 | ||
1140 | run_delayed_data_ref, | |
1141 | ||
1142 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1143 | |
1144 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1145 | const struct btrfs_delayed_ref_node *ref, | |
1146 | const struct btrfs_delayed_data_ref *full_ref, | |
1147 | int action), | |
1148 | ||
1149 | TP_ARGS(fs_info, ref, full_ref, action) | |
1150 | ) | |
2d042821 | 1151 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fde8b34a MJ |
1152 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1153 | ||
1154 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1155 | struct btrfs_delayed_ref_node *ref, | |
1156 | struct btrfs_delayed_data_ref *full_ref, | |
1157 | int action), | |
1158 | ||
1159 | TP_ARGS(fs_info, ref, full_ref, action), | |
1160 | ||
1161 | TP_FIELDS( | |
9d2f1147 | 1162 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fde8b34a MJ |
1163 | ctf_integer(u64, bytenr, ref->bytenr) |
1164 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1165 | ctf_integer(int, action, action) | |
1166 | ctf_integer(u64, parent, full_ref->parent) | |
1167 | ctf_integer(u64, ref_root, full_ref->root) | |
1168 | ctf_integer(u64, owner, full_ref->objectid) | |
1169 | ctf_integer(u64, offset, full_ref->offset) | |
1170 | ctf_integer(int, type, ref->type) | |
1171 | ctf_integer(u64, seq, ref->seq) | |
1172 | ) | |
1173 | ) | |
1174 | ||
426eff93 MD |
1175 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1176 | ||
1177 | add_delayed_data_ref, | |
1178 | ||
1179 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
1180 | |
1181 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1182 | struct btrfs_delayed_ref_node *ref, | |
1183 | struct btrfs_delayed_data_ref *full_ref, | |
1184 | int action), | |
1185 | ||
1186 | TP_ARGS(fs_info, ref, full_ref, action) | |
1187 | ) | |
1188 | ||
426eff93 MD |
1189 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1190 | ||
1191 | run_delayed_data_ref, | |
1192 | ||
1193 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1194 | |
1195 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1196 | struct btrfs_delayed_ref_node *ref, | |
1197 | struct btrfs_delayed_data_ref *full_ref, | |
1198 | int action), | |
1199 | ||
1200 | TP_ARGS(fs_info, ref, full_ref, action) | |
1201 | ) | |
0badc02f MJ |
1202 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
1203 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, | |
1204 | ||
1205 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1206 | const struct btrfs_delayed_data_ref *full_ref, | |
1207 | int action), | |
1208 | ||
1209 | TP_ARGS(ref, full_ref, action), | |
1210 | ||
1211 | TP_FIELDS( | |
1212 | ctf_integer(u64, bytenr, ref->bytenr) | |
1213 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1214 | ctf_integer(int, action, action) | |
1215 | ctf_integer(u64, parent, full_ref->parent) | |
1216 | ctf_integer(u64, ref_root, full_ref->root) | |
1217 | ctf_integer(u64, owner, full_ref->objectid) | |
1218 | ctf_integer(u64, offset, full_ref->offset) | |
1219 | ctf_integer(int, type, ref->type) | |
1220 | ctf_integer(u64, seq, ref->seq) | |
1221 | ) | |
1222 | ) | |
1223 | ||
426eff93 MD |
1224 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1225 | ||
1226 | add_delayed_data_ref, | |
1227 | ||
1228 | btrfs_add_delayed_data_ref, | |
0badc02f MJ |
1229 | |
1230 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1231 | const struct btrfs_delayed_data_ref *full_ref, | |
1232 | int action), | |
1233 | ||
1234 | TP_ARGS(fs_info, ref, full_ref, action) | |
1235 | ) | |
1236 | ||
426eff93 MD |
1237 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1238 | ||
1239 | run_delayed_data_ref, | |
1240 | ||
1241 | btrfs_run_delayed_data_ref, | |
0badc02f MJ |
1242 | |
1243 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1244 | const struct btrfs_delayed_data_ref *full_ref, | |
1245 | int action), | |
1246 | ||
1247 | TP_ARGS(fs_info, ref, full_ref, action) | |
1248 | ) | |
2d042821 | 1249 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
fde8b34a MJ |
1250 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1251 | ||
1252 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1253 | struct btrfs_delayed_data_ref *full_ref, | |
1254 | int action), | |
1255 | ||
1256 | TP_ARGS(ref, full_ref, action), | |
1257 | ||
1258 | TP_FIELDS( | |
1259 | ctf_integer(u64, bytenr, ref->bytenr) | |
1260 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1261 | ctf_integer(int, action, action) | |
1262 | ctf_integer(u64, parent, full_ref->parent) | |
1263 | ctf_integer(u64, ref_root, full_ref->root) | |
1264 | ctf_integer(u64, owner, full_ref->objectid) | |
1265 | ctf_integer(u64, offset, full_ref->offset) | |
1266 | ctf_integer(int, type, ref->type) | |
1267 | ctf_integer(u64, seq, ref->seq) | |
1268 | ) | |
1269 | ) | |
1270 | ||
426eff93 MD |
1271 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1272 | ||
1273 | add_delayed_data_ref, | |
1274 | ||
1275 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
1276 | |
1277 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1278 | struct btrfs_delayed_data_ref *full_ref, | |
1279 | int action), | |
1280 | ||
1281 | TP_ARGS(fs_info, ref, full_ref, action) | |
1282 | ) | |
1283 | ||
426eff93 MD |
1284 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1285 | ||
1286 | run_delayed_data_ref, | |
1287 | ||
1288 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1289 | |
1290 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1291 | struct btrfs_delayed_data_ref *full_ref, | |
1292 | int action), | |
1293 | ||
1294 | TP_ARGS(fs_info, ref, full_ref, action) | |
1295 | ) | |
2d042821 | 1296 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0)) |
3bc29f0a | 1297 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, |
b87700e3 AG |
1298 | |
1299 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1300 | struct btrfs_delayed_data_ref *full_ref, | |
1301 | int action), | |
1302 | ||
1303 | TP_ARGS(ref, full_ref, action), | |
1304 | ||
f127e61e MD |
1305 | TP_FIELDS( |
1306 | ctf_integer(u64, bytenr, ref->bytenr) | |
1307 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1308 | ctf_integer(int, action, action) | |
1309 | ctf_integer(u64, parent, full_ref->parent) | |
1310 | ctf_integer(u64, ref_root, full_ref->root) | |
1311 | ctf_integer(u64, owner, full_ref->objectid) | |
1312 | ctf_integer(u64, offset, full_ref->offset) | |
1313 | ctf_integer(int, type, ref->type) | |
f127e61e | 1314 | ctf_integer(u64, seq, ref->seq) |
f127e61e | 1315 | ) |
b87700e3 | 1316 | ) |
fde8b34a MJ |
1317 | #else |
1318 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, | |
1319 | ||
1320 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1321 | struct btrfs_delayed_data_ref *full_ref, | |
1322 | int action), | |
1323 | ||
1324 | TP_ARGS(ref, full_ref, action), | |
1325 | ||
1326 | TP_FIELDS( | |
1327 | ctf_integer(u64, bytenr, ref->bytenr) | |
1328 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1329 | ctf_integer(int, action, action) | |
1330 | ctf_integer(u64, parent, full_ref->parent) | |
1331 | ctf_integer(u64, ref_root, full_ref->root) | |
1332 | ctf_integer(u64, owner, full_ref->objectid) | |
1333 | ctf_integer(u64, offset, full_ref->offset) | |
1334 | ctf_integer(int, type, ref->type) | |
1335 | ) | |
1336 | ) | |
1337 | #endif | |
b87700e3 | 1338 | |
2d042821 | 1339 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) |
ab9ebe67 MJ |
1340 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1341 | ||
1342 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1343 | const struct btrfs_delayed_ref_head *head_ref, | |
1344 | int action), | |
1345 | ||
1346 | TP_ARGS(fs_info, head_ref, action), | |
1347 | ||
1348 | TP_FIELDS( | |
1349 | ctf_integer(u64, bytenr, head_ref->bytenr) | |
1350 | ctf_integer(u64, num_bytes, head_ref->num_bytes) | |
1351 | ctf_integer(int, action, action) | |
1352 | ctf_integer(int, is_data, head_ref->is_data) | |
1353 | ) | |
1354 | ) | |
1355 | ||
d7921a5f MD |
1356 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1357 | ||
1358 | add_delayed_ref_head, | |
1359 | ||
1360 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1361 | |
1362 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1363 | const struct btrfs_delayed_ref_head *head_ref, | |
1364 | int action), | |
1365 | ||
1366 | TP_ARGS(fs_info, head_ref, action) | |
1367 | ) | |
1368 | ||
d7921a5f MD |
1369 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1370 | ||
1371 | run_delayed_ref_head, | |
1372 | ||
1373 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1374 | |
1375 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1376 | const struct btrfs_delayed_ref_head *head_ref, | |
1377 | int action), | |
1378 | ||
1379 | TP_ARGS(fs_info, head_ref, action) | |
1380 | ) | |
1381 | ||
2d042821 | 1382 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1383 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1384 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1385 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1386 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
1387 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
1388 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
1389 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
1390 | ||
ab9ebe67 MJ |
1391 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1392 | ||
1393 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1394 | const struct btrfs_delayed_ref_node *ref, | |
1395 | const struct btrfs_delayed_ref_head *head_ref, | |
1396 | int action), | |
1397 | ||
1398 | TP_ARGS(fs_info, ref, head_ref, action), | |
1399 | ||
1400 | TP_FIELDS( | |
1401 | ctf_integer(u64, bytenr, ref->bytenr) | |
1402 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1403 | ctf_integer(int, action, action) | |
1404 | ctf_integer(int, is_data, head_ref->is_data) | |
1405 | ) | |
1406 | ) | |
1407 | ||
d7921a5f MD |
1408 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1409 | ||
1410 | add_delayed_ref_head, | |
1411 | ||
1412 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1413 | |
1414 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1415 | const struct btrfs_delayed_ref_node *ref, | |
1416 | const struct btrfs_delayed_ref_head *head_ref, | |
1417 | int action), | |
1418 | ||
1419 | TP_ARGS(fs_info, ref, head_ref, action) | |
1420 | ) | |
1421 | ||
d7921a5f MD |
1422 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1423 | ||
1424 | run_delayed_ref_head, | |
1425 | ||
1426 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1427 | |
1428 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1429 | const struct btrfs_delayed_ref_node *ref, | |
1430 | const struct btrfs_delayed_ref_head *head_ref, | |
1431 | int action), | |
1432 | ||
1433 | TP_ARGS(fs_info, ref, head_ref, action) | |
1434 | ) | |
1435 | ||
2d042821 | 1436 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
ab9ebe67 | 1437 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
fcd0a11c MD |
1438 | |
1439 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1440 | struct btrfs_delayed_ref_node *ref, | |
1441 | struct btrfs_delayed_ref_head *head_ref, | |
1442 | int action), | |
1443 | ||
1444 | TP_ARGS(fs_info, ref, head_ref, action), | |
1445 | ||
1446 | TP_FIELDS( | |
1447 | ctf_integer(u64, bytenr, ref->bytenr) | |
1448 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1449 | ctf_integer(int, action, action) | |
1450 | ctf_integer(int, is_data, head_ref->is_data) | |
1451 | ) | |
1452 | ) | |
1453 | ||
d7921a5f MD |
1454 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1455 | ||
1456 | add_delayed_ref_head, | |
1457 | ||
1458 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1459 | |
1460 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1461 | struct btrfs_delayed_ref_node *ref, | |
1462 | struct btrfs_delayed_ref_head *head_ref, | |
1463 | int action), | |
1464 | ||
1465 | TP_ARGS(fs_info, ref, head_ref, action) | |
1466 | ) | |
1467 | ||
d7921a5f MD |
1468 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1469 | ||
1470 | run_delayed_ref_head, | |
1471 | ||
1472 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1473 | |
1474 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1475 | struct btrfs_delayed_ref_node *ref, | |
1476 | struct btrfs_delayed_ref_head *head_ref, | |
1477 | int action), | |
1478 | ||
1479 | TP_ARGS(fs_info, ref, head_ref, action) | |
1480 | ) | |
1481 | ||
0badc02f | 1482 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
0b3f6dcb MJ |
1483 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1484 | ||
1485 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1486 | const struct btrfs_delayed_ref_head *head_ref, | |
1487 | int action), | |
1488 | ||
1489 | TP_ARGS(ref, head_ref, action), | |
1490 | ||
1491 | TP_FIELDS( | |
1492 | ctf_integer(u64, bytenr, ref->bytenr) | |
1493 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1494 | ctf_integer(int, action, action) | |
1495 | ctf_integer(int, is_data, head_ref->is_data) | |
1496 | ) | |
1497 | ) | |
1498 | ||
d7921a5f MD |
1499 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1500 | ||
1501 | add_delayed_ref_head, | |
1502 | ||
1503 | btrfs_add_delayed_ref_head, | |
0b3f6dcb MJ |
1504 | |
1505 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1506 | const struct btrfs_delayed_ref_head *head_ref, | |
1507 | int action), | |
1508 | ||
1509 | TP_ARGS(ref, head_ref, action) | |
1510 | ) | |
1511 | ||
d7921a5f MD |
1512 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1513 | ||
1514 | run_delayed_ref_head, | |
1515 | ||
1516 | btrfs_run_delayed_ref_head, | |
0b3f6dcb MJ |
1517 | |
1518 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1519 | const struct btrfs_delayed_ref_head *head_ref, | |
1520 | int action), | |
1521 | ||
1522 | TP_ARGS(ref, head_ref, action) | |
1523 | ) | |
1524 | ||
2d042821 | 1525 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
ab9ebe67 MJ |
1526 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1527 | ||
1528 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1529 | struct btrfs_delayed_ref_head *head_ref, | |
1530 | int action), | |
1531 | ||
1532 | TP_ARGS(ref, head_ref, action), | |
1533 | ||
1534 | TP_FIELDS( | |
1535 | ctf_integer(u64, bytenr, ref->bytenr) | |
1536 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1537 | ctf_integer(int, action, action) | |
1538 | ctf_integer(int, is_data, head_ref->is_data) | |
1539 | ) | |
1540 | ) | |
1541 | ||
d7921a5f MD |
1542 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1543 | ||
1544 | add_delayed_ref_head, | |
1545 | ||
1546 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1547 | |
1548 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1549 | struct btrfs_delayed_ref_head *head_ref, | |
1550 | int action), | |
1551 | ||
1552 | TP_ARGS(ref, head_ref, action) | |
1553 | ) | |
1554 | ||
d7921a5f MD |
1555 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1556 | ||
1557 | run_delayed_ref_head, | |
1558 | ||
1559 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1560 | |
1561 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1562 | struct btrfs_delayed_ref_head *head_ref, | |
1563 | int action), | |
1564 | ||
1565 | TP_ARGS(ref, head_ref, action) | |
1566 | ) | |
1567 | ||
fcd0a11c | 1568 | #else |
3bc29f0a | 1569 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, |
b87700e3 AG |
1570 | |
1571 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1572 | struct btrfs_delayed_ref_head *head_ref, | |
1573 | int action), | |
1574 | ||
1575 | TP_ARGS(ref, head_ref, action), | |
1576 | ||
f127e61e MD |
1577 | TP_FIELDS( |
1578 | ctf_integer(u64, bytenr, ref->bytenr) | |
1579 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1580 | ctf_integer(int, action, action) | |
1581 | ctf_integer(int, is_data, head_ref->is_data) | |
1582 | ) | |
b87700e3 | 1583 | ) |
fcd0a11c | 1584 | #endif |
b87700e3 | 1585 | |
2d042821 | 1586 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
1587 | |
1588 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1589 | ||
1590 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, | |
1591 | u64 offset, u64 size), | |
1592 | ||
1593 | TP_ARGS(fs_info, map, offset, size), | |
1594 | ||
1595 | TP_FIELDS( | |
1596 | ctf_integer(int, num_stripes, map->num_stripes) | |
1597 | ctf_integer(u64, type, map->type) | |
1598 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1599 | ctf_integer(u64, offset, offset) | |
1600 | ctf_integer(u64, size, size) | |
1601 | ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid) | |
1602 | ) | |
1603 | ) | |
1604 | ||
1605 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1606 | ||
9d2f1147 | 1607 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, |
1f1ec4ed MJ |
1608 | u64 offset, u64 size), |
1609 | ||
9d2f1147 | 1610 | TP_ARGS(fs_info, map, offset, size) |
1f1ec4ed MJ |
1611 | ) |
1612 | ||
1613 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
1614 | ||
9d2f1147 | 1615 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, |
1f1ec4ed MJ |
1616 | u64 offset, u64 size), |
1617 | ||
9d2f1147 | 1618 | TP_ARGS(fs_info, map, offset, size) |
1f1ec4ed MJ |
1619 | ) |
1620 | ||
2d042821 | 1621 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
ff8bdcc2 MD |
1622 | |
1623 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1624 | ||
1625 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, | |
1626 | u64 offset, u64 size), | |
1627 | ||
1628 | TP_ARGS(fs_info, map, offset, size), | |
1629 | ||
1630 | TP_FIELDS( | |
1631 | ctf_integer(int, num_stripes, map->num_stripes) | |
1632 | ctf_integer(u64, type, map->type) | |
1633 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1634 | ctf_integer(u64, offset, offset) | |
1635 | ctf_integer(u64, size, size) | |
1636 | ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid) | |
1637 | ) | |
1638 | ) | |
1639 | ||
1640 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1641 | ||
9d2f1147 | 1642 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, |
ff8bdcc2 MD |
1643 | u64 offset, u64 size), |
1644 | ||
9d2f1147 | 1645 | TP_ARGS(fs_info, map, offset, size) |
ff8bdcc2 MD |
1646 | ) |
1647 | ||
1648 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
1649 | ||
9d2f1147 | 1650 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, |
ff8bdcc2 MD |
1651 | u64 offset, u64 size), |
1652 | ||
9d2f1147 | 1653 | TP_ARGS(fs_info, map, offset, size) |
ff8bdcc2 MD |
1654 | ) |
1655 | ||
0badc02f MJ |
1656 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1657 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1658 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1659 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
1660 | |
1661 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1662 | ||
1663 | TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map, | |
1664 | u64 offset, u64 size), | |
1665 | ||
1666 | TP_ARGS(root, map, offset, size), | |
1667 | ||
1668 | TP_FIELDS( | |
1669 | ctf_integer(int, num_stripes, map->num_stripes) | |
1670 | ctf_integer(u64, type, map->type) | |
1671 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1672 | ctf_integer(u64, offset, offset) | |
1673 | ctf_integer(u64, size, size) | |
1674 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1675 | ) | |
1676 | ) | |
1677 | ||
1678 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1679 | ||
1680 | TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map, | |
1681 | u64 offset, u64 size), | |
1682 | ||
1683 | TP_ARGS(root, map, offset, size) | |
1684 | ) | |
1685 | ||
1686 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
1687 | ||
1688 | TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map, | |
1689 | u64 offset, u64 size), | |
1690 | ||
1691 | TP_ARGS(root, map, offset, size) | |
1692 | ) | |
1693 | ||
2d042821 | 1694 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1695 | |
3bc29f0a | 1696 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, |
b87700e3 AG |
1697 | |
1698 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
1699 | u64 offset, u64 size), | |
1700 | ||
1701 | TP_ARGS(root, map, offset, size), | |
1702 | ||
f127e61e MD |
1703 | TP_FIELDS( |
1704 | ctf_integer(int, num_stripes, map->num_stripes) | |
1705 | ctf_integer(u64, type, map->type) | |
1706 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1707 | ctf_integer(u64, offset, offset) | |
1708 | ctf_integer(u64, size, size) | |
1709 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1710 | ) | |
b87700e3 AG |
1711 | ) |
1712 | ||
3bc29f0a | 1713 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, |
b87700e3 AG |
1714 | |
1715 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
1716 | u64 offset, u64 size), | |
1717 | ||
1718 | TP_ARGS(root, map, offset, size) | |
1719 | ) | |
1720 | ||
3bc29f0a | 1721 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, |
b87700e3 AG |
1722 | |
1723 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
1724 | u64 offset, u64 size), | |
1725 | ||
1726 | TP_ARGS(root, map, offset, size) | |
1727 | ) | |
1728 | ||
2d042821 | 1729 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1730 | |
2d042821 | 1731 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1732 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1733 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1734 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 1735 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
1736 | LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, |
1737 | ||
1738 | TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf, | |
1739 | const struct extent_buffer *cow), | |
1740 | ||
1741 | TP_ARGS(root, buf, cow), | |
1742 | ||
1743 | TP_FIELDS( | |
1744 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1745 | ctf_integer(u64, buf_start, buf->start) | |
1746 | ctf_integer(int, refs, atomic_read(&buf->refs)) | |
1747 | ctf_integer(u64, cow_start, cow->start) | |
1748 | ctf_integer(int, buf_level, btrfs_header_level(buf)) | |
1749 | ctf_integer(int, cow_level, btrfs_header_level(cow)) | |
1750 | ) | |
1751 | ) | |
1752 | #else | |
3bc29f0a | 1753 | LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, |
b87700e3 AG |
1754 | |
1755 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | |
1756 | struct extent_buffer *cow), | |
1757 | ||
1758 | TP_ARGS(root, buf, cow), | |
1759 | ||
f127e61e MD |
1760 | TP_FIELDS( |
1761 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1762 | ctf_integer(u64, buf_start, buf->start) | |
1763 | ctf_integer(int, refs, atomic_read(&buf->refs)) | |
1764 | ctf_integer(u64, cow_start, cow->start) | |
1765 | ctf_integer(int, buf_level, btrfs_header_level(buf)) | |
1766 | ctf_integer(int, cow_level, btrfs_header_level(cow)) | |
1767 | ) | |
b87700e3 | 1768 | ) |
1f1ec4ed | 1769 | #endif |
b87700e3 | 1770 | |
2d042821 | 1771 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
ae5af8ea MJ |
1772 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
1773 | ||
1774 | TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val, | |
1775 | u64 bytes, int reserve), | |
1776 | ||
1777 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1778 | ||
1779 | TP_FIELDS( | |
1780 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1781 | ctf_string(type, type) | |
1782 | ctf_integer(u64, val, val) | |
1783 | ctf_integer(u64, bytes, bytes) | |
1784 | ctf_integer(int, reserve, reserve) | |
1785 | ) | |
1786 | ) | |
2d042821 | 1787 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1788 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1789 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1790 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 1791 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
1792 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
1793 | ||
1794 | TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val, | |
1795 | u64 bytes, int reserve), | |
1796 | ||
1797 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1798 | ||
1799 | TP_FIELDS( | |
9d2f1147 | 1800 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
1801 | ctf_string(type, type) |
1802 | ctf_integer(u64, val, val) | |
1803 | ctf_integer(u64, bytes, bytes) | |
1804 | ctf_integer(int, reserve, reserve) | |
1805 | ) | |
1806 | ) | |
2d042821 | 1807 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
3bc29f0a | 1808 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
b87700e3 AG |
1809 | |
1810 | TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val, | |
1811 | u64 bytes, int reserve), | |
1812 | ||
1813 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1814 | ||
f127e61e | 1815 | TP_FIELDS( |
9d2f1147 | 1816 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
f127e61e MD |
1817 | ctf_string(type, type) |
1818 | ctf_integer(u64, val, val) | |
1819 | ctf_integer(u64, bytes, bytes) | |
1820 | ctf_integer(int, reserve, reserve) | |
1821 | ) | |
b87700e3 AG |
1822 | ) |
1823 | #endif | |
1824 | ||
2d042821 | 1825 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
1826 | |
1827 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1828 | ||
9d2f1147 | 1829 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1830 | |
9d2f1147 | 1831 | TP_ARGS(fs_info, start, len), |
1f1ec4ed MJ |
1832 | |
1833 | TP_FIELDS( | |
1834 | ctf_integer(u64, start, start) | |
1835 | ctf_integer(u64, len, len) | |
1836 | ) | |
1837 | ) | |
1838 | ||
1839 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1840 | ||
9d2f1147 | 1841 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1842 | |
9d2f1147 | 1843 | TP_ARGS(fs_info, start, len) |
1f1ec4ed MJ |
1844 | ) |
1845 | ||
1846 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1847 | ||
9d2f1147 | 1848 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1849 | |
9d2f1147 | 1850 | TP_ARGS(fs_info, start, len) |
1f1ec4ed MJ |
1851 | ) |
1852 | ||
2d042821 | 1853 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
ff8bdcc2 MD |
1854 | |
1855 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1856 | ||
9d2f1147 | 1857 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1858 | |
9d2f1147 | 1859 | TP_ARGS(fs_info, start, len), |
ff8bdcc2 MD |
1860 | |
1861 | TP_FIELDS( | |
1862 | ctf_integer(u64, start, start) | |
1863 | ctf_integer(u64, len, len) | |
1864 | ) | |
1865 | ) | |
1866 | ||
1867 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1868 | ||
9d2f1147 | 1869 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1870 | |
9d2f1147 | 1871 | TP_ARGS(fs_info, start, len) |
ff8bdcc2 MD |
1872 | ) |
1873 | ||
1874 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1875 | ||
9d2f1147 | 1876 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1877 | |
9d2f1147 | 1878 | TP_ARGS(fs_info, start, len) |
ff8bdcc2 MD |
1879 | ) |
1880 | ||
0badc02f MJ |
1881 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1882 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1883 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1884 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
1885 | |
1886 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1887 | ||
1888 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1889 | ||
1890 | TP_ARGS(root, start, len), | |
1891 | ||
1892 | TP_FIELDS( | |
1893 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1894 | ctf_integer(u64, start, start) | |
1895 | ctf_integer(u64, len, len) | |
1896 | ) | |
1897 | ) | |
1898 | ||
1899 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1900 | ||
1901 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1902 | ||
1903 | TP_ARGS(root, start, len) | |
1904 | ) | |
1905 | ||
1906 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1907 | ||
1908 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1909 | ||
1910 | TP_ARGS(root, start, len) | |
1911 | ) | |
1912 | ||
2d042821 | 1913 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1914 | |
3bc29f0a | 1915 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, |
b87700e3 AG |
1916 | |
1917 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1918 | ||
1919 | TP_ARGS(root, start, len), | |
1920 | ||
f127e61e MD |
1921 | TP_FIELDS( |
1922 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1923 | ctf_integer(u64, start, start) | |
1924 | ctf_integer(u64, len, len) | |
1925 | ) | |
b87700e3 AG |
1926 | ) |
1927 | ||
3bc29f0a | 1928 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, |
b87700e3 AG |
1929 | |
1930 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1931 | ||
1932 | TP_ARGS(root, start, len) | |
1933 | ) | |
1934 | ||
3bc29f0a | 1935 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, |
b87700e3 AG |
1936 | |
1937 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1938 | ||
1939 | TP_ARGS(root, start, len) | |
1940 | ) | |
1941 | ||
2d042821 | 1942 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1943 | |
2d042821 | 1944 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \ |
be71b60a | 1945 | LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \ |
90b248d1 MJ |
1946 | LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \ |
1947 | LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0)) | |
e13a7d26 MJ |
1948 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, |
1949 | ||
1950 | btrfs_find_free_extent, | |
1951 | ||
1952 | TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
1953 | u64 data), | |
1954 | ||
1955 | TP_ARGS(root, num_bytes, empty_size, data), | |
1956 | ||
1957 | TP_FIELDS( | |
1958 | ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1959 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1960 | ctf_integer(u64, num_bytes, num_bytes) | |
1961 | ctf_integer(u64, empty_size, empty_size) | |
1962 | ctf_integer(u64, data, data) | |
1963 | ) | |
1964 | ) | |
1965 | ||
2d042821 | 1966 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
e13a7d26 | 1967 | |
5809d816 MJ |
1968 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, |
1969 | ||
1970 | btrfs_find_free_extent, | |
1971 | ||
1972 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
1973 | u64 data), | |
1974 | ||
1975 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
1976 | ||
1977 | TP_FIELDS( | |
1978 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1979 | ctf_integer(u64, num_bytes, num_bytes) | |
1980 | ctf_integer(u64, empty_size, empty_size) | |
1981 | ctf_integer(u64, data, data) | |
1982 | ) | |
1983 | ) | |
1984 | ||
2d042821 | 1985 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0)) |
e13a7d26 MJ |
1986 | |
1987 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
1988 | ||
1989 | btrfs_find_free_extent, | |
1990 | ||
1991 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
1992 | u64 data), | |
1993 | ||
1994 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
1995 | ||
1996 | TP_FIELDS( | |
1997 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1998 | ctf_integer(u64, num_bytes, num_bytes) | |
1999 | ctf_integer(u64, empty_size, empty_size) | |
2000 | ctf_integer(u64, data, data) | |
2001 | ) | |
2002 | ) | |
2003 | ||
2d042821 | 2004 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
e13a7d26 MJ |
2005 | |
2006 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2007 | ||
2008 | btrfs_find_free_extent, | |
2009 | ||
2010 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
2011 | u64 data), | |
2012 | ||
2013 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
2014 | ||
2015 | TP_FIELDS( | |
2016 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
2017 | ctf_integer(u64, num_bytes, num_bytes) | |
2018 | ctf_integer(u64, empty_size, empty_size) | |
2019 | ctf_integer(u64, data, data) | |
2020 | ) | |
2021 | ) | |
2022 | ||
2d042821 | 2023 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
e13a7d26 MJ |
2024 | |
2025 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2026 | ||
2027 | btrfs_find_free_extent, | |
2028 | ||
2029 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
2030 | u64 data), | |
2031 | ||
2032 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
2033 | ||
2034 | TP_FIELDS( | |
2035 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
2036 | ctf_integer(u64, num_bytes, num_bytes) | |
2037 | ctf_integer(u64, empty_size, empty_size) | |
2038 | ctf_integer(u64, data, data) | |
2039 | ) | |
2040 | ) | |
2041 | ||
2042 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ | |
2043 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2044 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
2045 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
2046 | ||
2047 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2048 | ||
2049 | btrfs_find_free_extent, | |
2050 | ||
2051 | TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
2052 | u64 data), | |
2053 | ||
2054 | TP_ARGS(root, num_bytes, empty_size, data), | |
2055 | ||
2056 | TP_FIELDS( | |
2057 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2058 | ctf_integer(u64, num_bytes, num_bytes) | |
2059 | ctf_integer(u64, empty_size, empty_size) | |
2060 | ctf_integer(u64, data, data) | |
2061 | ) | |
2062 | ) | |
2d042821 | 2063 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
e13a7d26 MJ |
2064 | |
2065 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2066 | ||
2067 | btrfs_find_free_extent, | |
2068 | ||
2069 | TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
2070 | u64 data), | |
2071 | ||
2072 | TP_ARGS(root, num_bytes, empty_size, data), | |
2073 | ||
2074 | TP_FIELDS( | |
2075 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2076 | ctf_integer(u64, num_bytes, num_bytes) | |
2077 | ctf_integer(u64, empty_size, empty_size) | |
2078 | ctf_integer(u64, data, data) | |
2079 | ) | |
2080 | ) | |
2081 | #endif | |
2082 | ||
2d042821 | 2083 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
2084 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2085 | ||
2086 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2087 | u64 len), | |
2088 | ||
2089 | TP_ARGS(block_group, start, len), | |
2090 | ||
2091 | TP_FIELDS( | |
2092 | ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
2093 | ctf_integer(u64, bg_objectid, block_group->start) | |
2094 | ctf_integer(u64, flags, block_group->flags) | |
2095 | ctf_integer(u64, start, start) | |
2096 | ctf_integer(u64, len, len) | |
2097 | ) | |
2098 | ) | |
2099 | ||
2100 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2101 | ||
2102 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2103 | u64 len), | |
2104 | ||
2105 | TP_ARGS(block_group, start, len) | |
2106 | ) | |
2107 | ||
2108 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2109 | ||
2110 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2111 | u64 len), | |
2112 | ||
2113 | TP_ARGS(block_group, start, len) | |
2114 | ) | |
2115 | ||
2d042821 | 2116 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0)) |
51ab0b1d MJ |
2117 | |
2118 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | |
2119 | ||
2120 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2121 | u64 len), | |
2122 | ||
2123 | TP_ARGS(block_group, start, len), | |
2124 | ||
2125 | TP_FIELDS( | |
9d2f1147 | 2126 | ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
51ab0b1d MJ |
2127 | ctf_integer(u64, bg_objectid, block_group->key.objectid) |
2128 | ctf_integer(u64, flags, block_group->flags) | |
2129 | ctf_integer(u64, start, start) | |
2130 | ctf_integer(u64, len, len) | |
2131 | ) | |
2132 | ) | |
2133 | ||
2134 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2135 | ||
2136 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2137 | u64 len), | |
2138 | ||
2139 | TP_ARGS(block_group, start, len) | |
2140 | ) | |
2141 | ||
2142 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2143 | ||
2144 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2145 | u64 len), | |
2146 | ||
2147 | TP_ARGS(block_group, start, len) | |
2148 | ) | |
ff8bdcc2 | 2149 | |
2d042821 | 2150 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
2151 | |
2152 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | |
2153 | ||
9d2f1147 | 2154 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2155 | const struct btrfs_block_group_cache *block_group, u64 start, |
2156 | u64 len), | |
2157 | ||
9d2f1147 | 2158 | TP_ARGS(fs_info, block_group, start, len), |
1f1ec4ed MJ |
2159 | |
2160 | TP_FIELDS( | |
9d2f1147 | 2161 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
2162 | ctf_integer(u64, bg_objectid, block_group->key.objectid) |
2163 | ctf_integer(u64, flags, block_group->flags) | |
2164 | ctf_integer(u64, start, start) | |
2165 | ctf_integer(u64, len, len) | |
2166 | ) | |
2167 | ) | |
2168 | ||
2169 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2170 | ||
9d2f1147 | 2171 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2172 | const struct btrfs_block_group_cache *block_group, u64 start, |
2173 | u64 len), | |
2174 | ||
9d2f1147 | 2175 | TP_ARGS(fs_info, block_group, start, len) |
1f1ec4ed MJ |
2176 | ) |
2177 | ||
2178 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2179 | ||
9d2f1147 | 2180 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2181 | const struct btrfs_block_group_cache *block_group, u64 start, |
2182 | u64 len), | |
2183 | ||
9d2f1147 | 2184 | TP_ARGS(fs_info, block_group, start, len) |
1f1ec4ed MJ |
2185 | ) |
2186 | ||
2d042821 | 2187 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
1f1ec4ed | 2188 | |
ff8bdcc2 MD |
2189 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2190 | ||
9d2f1147 | 2191 | TP_PROTO(struct btrfs_fs_info *fs_info, |
ff8bdcc2 MD |
2192 | struct btrfs_block_group_cache *block_group, u64 start, |
2193 | u64 len), | |
2194 | ||
9d2f1147 | 2195 | TP_ARGS(fs_info, block_group, start, len), |
ff8bdcc2 MD |
2196 | |
2197 | TP_FIELDS( | |
2198 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2199 | ctf_integer(u64, flags, block_group->flags) | |
2200 | ctf_integer(u64, start, start) | |
2201 | ctf_integer(u64, len, len) | |
2202 | ) | |
2203 | ) | |
2204 | ||
2205 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2206 | ||
9d2f1147 | 2207 | TP_PROTO(struct btrfs_fs_info *fs_info, |
ff8bdcc2 MD |
2208 | struct btrfs_block_group_cache *block_group, u64 start, |
2209 | u64 len), | |
2210 | ||
9d2f1147 | 2211 | TP_ARGS(fs_info, block_group, start, len) |
ff8bdcc2 MD |
2212 | ) |
2213 | ||
2214 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2215 | ||
9d2f1147 | 2216 | TP_PROTO(struct btrfs_fs_info *fs_info, |
ff8bdcc2 MD |
2217 | struct btrfs_block_group_cache *block_group, u64 start, |
2218 | u64 len), | |
2219 | ||
9d2f1147 | 2220 | TP_ARGS(fs_info, block_group, start, len) |
ff8bdcc2 | 2221 | ) |
0badc02f MJ |
2222 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2223 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2224 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
2225 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e | 2226 | |
7ca7cd6e MJ |
2227 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2228 | ||
2229 | TP_PROTO(const struct btrfs_root *root, | |
2230 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2231 | u64 len), | |
2232 | ||
2233 | TP_ARGS(root, block_group, start, len), | |
2234 | ||
2235 | TP_FIELDS( | |
2236 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2237 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2238 | ctf_integer(u64, flags, block_group->flags) | |
2239 | ctf_integer(u64, start, start) | |
2240 | ctf_integer(u64, len, len) | |
2241 | ) | |
2242 | ) | |
2243 | ||
2244 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2245 | ||
2246 | TP_PROTO(const struct btrfs_root *root, | |
2247 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2248 | u64 len), | |
2249 | ||
2250 | TP_ARGS(root, block_group, start, len) | |
2251 | ) | |
2252 | ||
2253 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2254 | ||
2255 | TP_PROTO(const struct btrfs_root *root, | |
2256 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2257 | u64 len), | |
2258 | ||
2259 | TP_ARGS(root, block_group, start, len) | |
2260 | ) | |
ff8bdcc2 | 2261 | |
2d042821 | 2262 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
ff8bdcc2 | 2263 | |
3bc29f0a | 2264 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
b87700e3 AG |
2265 | |
2266 | TP_PROTO(struct btrfs_root *root, | |
2267 | struct btrfs_block_group_cache *block_group, u64 start, | |
2268 | u64 len), | |
2269 | ||
2270 | TP_ARGS(root, block_group, start, len), | |
2271 | ||
f127e61e MD |
2272 | TP_FIELDS( |
2273 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2274 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2275 | ctf_integer(u64, flags, block_group->flags) | |
2276 | ctf_integer(u64, start, start) | |
2277 | ctf_integer(u64, len, len) | |
2278 | ) | |
b87700e3 AG |
2279 | ) |
2280 | ||
3bc29f0a | 2281 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, |
b87700e3 AG |
2282 | |
2283 | TP_PROTO(struct btrfs_root *root, | |
2284 | struct btrfs_block_group_cache *block_group, u64 start, | |
2285 | u64 len), | |
2286 | ||
2287 | TP_ARGS(root, block_group, start, len) | |
2288 | ) | |
2289 | ||
3bc29f0a | 2290 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, |
b87700e3 AG |
2291 | |
2292 | TP_PROTO(struct btrfs_root *root, | |
2293 | struct btrfs_block_group_cache *block_group, u64 start, | |
2294 | u64 len), | |
2295 | ||
2296 | TP_ARGS(root, block_group, start, len) | |
2297 | ) | |
2298 | ||
2d042821 | 2299 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 2300 | |
2d042821 | 2301 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
2302 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
2303 | ||
2304 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2305 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2306 | ||
2307 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2308 | ||
2309 | TP_FIELDS( | |
2310 | ctf_integer(u64, bg_objectid, block_group->start) | |
2311 | ctf_integer(u64, flags, block_group->flags) | |
2312 | ctf_integer(u64, start, start) | |
2313 | ctf_integer(u64, bytes, bytes) | |
2314 | ctf_integer(u64, empty_size, empty_size) | |
2315 | ctf_integer(u64, min_bytes, min_bytes) | |
2316 | ) | |
2317 | ) | |
2318 | ||
2319 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, | |
2320 | ||
2321 | TP_PROTO(const struct btrfs_block_group *block_group), | |
2322 | ||
2323 | TP_ARGS(block_group), | |
2324 | ||
2325 | TP_FIELDS( | |
2326 | ctf_integer(u64, bg_objectid, block_group->start) | |
2327 | ) | |
2328 | ) | |
2329 | ||
2330 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, | |
2331 | ||
2332 | TP_PROTO(const struct btrfs_block_group *block_group, | |
2333 | const struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2334 | ||
2335 | TP_ARGS(block_group, cluster, size, bitmap), | |
2336 | ||
2337 | TP_FIELDS( | |
2338 | ctf_integer(u64, bg_objectid, block_group->start) | |
2339 | ctf_integer(u64, flags, block_group->flags) | |
2340 | ctf_integer(u64, start, cluster->window_start) | |
2341 | ctf_integer(u64, max_size, cluster->max_size) | |
2342 | ctf_integer(u64, size, size) | |
2343 | ctf_integer(int, bitmap, bitmap) | |
2344 | ) | |
2345 | ) | |
2d042821 | 2346 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
2347 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2348 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2349 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 2350 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
2351 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
2352 | ||
2353 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2354 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2355 | ||
2356 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2357 | ||
2358 | TP_FIELDS( | |
2359 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2360 | ctf_integer(u64, flags, block_group->flags) | |
2361 | ctf_integer(u64, start, start) | |
2362 | ctf_integer(u64, bytes, bytes) | |
2363 | ctf_integer(u64, empty_size, empty_size) | |
2364 | ctf_integer(u64, min_bytes, min_bytes) | |
2365 | ) | |
2366 | ) | |
2367 | ||
2368 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, | |
2369 | ||
2370 | TP_PROTO(const struct btrfs_block_group_cache *block_group), | |
2371 | ||
2372 | TP_ARGS(block_group), | |
2373 | ||
2374 | TP_FIELDS( | |
2375 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2376 | ) | |
2377 | ) | |
2378 | ||
2379 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, | |
2380 | ||
2381 | TP_PROTO(const struct btrfs_block_group_cache *block_group, | |
2382 | const struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2383 | ||
2384 | TP_ARGS(block_group, cluster, size, bitmap), | |
2385 | ||
2386 | TP_FIELDS( | |
2387 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2388 | ctf_integer(u64, flags, block_group->flags) | |
2389 | ctf_integer(u64, start, cluster->window_start) | |
2390 | ctf_integer(u64, max_size, cluster->max_size) | |
2391 | ctf_integer(u64, size, size) | |
2392 | ctf_integer(int, bitmap, bitmap) | |
2393 | ) | |
2394 | ) | |
2d042821 | 2395 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
3bc29f0a | 2396 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
b87700e3 AG |
2397 | |
2398 | TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start, | |
2399 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2400 | ||
2401 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2402 | ||
f127e61e MD |
2403 | TP_FIELDS( |
2404 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2405 | ctf_integer(u64, flags, block_group->flags) | |
2406 | ctf_integer(u64, start, start) | |
2407 | ctf_integer(u64, bytes, bytes) | |
2408 | ctf_integer(u64, empty_size, empty_size) | |
2409 | ctf_integer(u64, min_bytes, min_bytes) | |
2410 | ) | |
b87700e3 AG |
2411 | ) |
2412 | ||
3bc29f0a | 2413 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, |
b87700e3 AG |
2414 | |
2415 | TP_PROTO(struct btrfs_block_group_cache *block_group), | |
2416 | ||
2417 | TP_ARGS(block_group), | |
2418 | ||
f127e61e MD |
2419 | TP_FIELDS( |
2420 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2421 | ) | |
b87700e3 AG |
2422 | ) |
2423 | ||
3bc29f0a | 2424 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, |
b87700e3 AG |
2425 | |
2426 | TP_PROTO(struct btrfs_block_group_cache *block_group, | |
2427 | struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2428 | ||
2429 | TP_ARGS(block_group, cluster, size, bitmap), | |
2430 | ||
f127e61e MD |
2431 | TP_FIELDS( |
2432 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2433 | ctf_integer(u64, flags, block_group->flags) | |
2434 | ctf_integer(u64, start, cluster->window_start) | |
2435 | ctf_integer(u64, max_size, cluster->max_size) | |
2436 | ctf_integer(u64, size, size) | |
2437 | ctf_integer(int, bitmap, bitmap) | |
2438 | ) | |
b87700e3 AG |
2439 | ) |
2440 | #endif | |
2441 | ||
2d042821 | 2442 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
2443 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2444 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2445 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 2446 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
2447 | LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, |
2448 | ||
2449 | btrfs_alloc_extent_state, | |
2450 | ||
2451 | TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP), | |
2452 | ||
2453 | TP_ARGS(state, mask, IP), | |
2454 | ||
2455 | TP_FIELDS( | |
2456 | ctf_integer_hex(const struct extent_state *, state, state) | |
2457 | ctf_integer(gfp_t, mask, mask) | |
2458 | ctf_integer(unsigned long, ip, IP) | |
2459 | ) | |
2460 | ) | |
2461 | ||
2462 | LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, | |
2463 | ||
2464 | btrfs_free_extent_state, | |
2465 | ||
2466 | TP_PROTO(const struct extent_state *state, unsigned long IP), | |
2467 | ||
2468 | TP_ARGS(state, IP), | |
2469 | ||
2470 | TP_FIELDS( | |
2471 | ctf_integer_hex(const struct extent_state *, state, state) | |
2472 | ctf_integer(unsigned long, ip, IP) | |
2473 | ) | |
2474 | ) | |
2d042821 | 2475 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) |
3bc29f0a | 2476 | LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, |
9cf29d3e MD |
2477 | |
2478 | btrfs_alloc_extent_state, | |
b87700e3 AG |
2479 | |
2480 | TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP), | |
2481 | ||
2482 | TP_ARGS(state, mask, IP), | |
2483 | ||
f127e61e | 2484 | TP_FIELDS( |
fa91fcac | 2485 | ctf_integer_hex(struct extent_state *, state, state) |
f127e61e MD |
2486 | ctf_integer(gfp_t, mask, mask) |
2487 | ctf_integer(unsigned long, ip, IP) | |
2488 | ) | |
b87700e3 AG |
2489 | ) |
2490 | ||
3bc29f0a | 2491 | LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, |
9cf29d3e MD |
2492 | |
2493 | btrfs_free_extent_state, | |
b87700e3 AG |
2494 | |
2495 | TP_PROTO(struct extent_state *state, unsigned long IP), | |
2496 | ||
2497 | TP_ARGS(state, IP), | |
2498 | ||
f127e61e | 2499 | TP_FIELDS( |
fa91fcac | 2500 | ctf_integer_hex(struct extent_state *, state, state) |
f127e61e MD |
2501 | ctf_integer(unsigned long, ip, IP) |
2502 | ) | |
b87700e3 AG |
2503 | ) |
2504 | #endif | |
2505 | ||
3bc29f0a | 2506 | #endif /* LTTNG_TRACE_BTRFS_H */ |
b87700e3 AG |
2507 | |
2508 | /* This part must be outside protection */ | |
6ec43db8 | 2509 | #include <probes/define_trace.h> |