Commit | Line | Data |
---|---|---|
b7cdc182 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
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 | |
3b4aafcb | 8 | #include <lttng/tracepoint-event.h> |
b87700e3 | 9 | #include <linux/writeback.h> |
5f4c791e | 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; | |
5f4c791e | 23 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 | 24 | struct btrfs_block_group; |
5f4c791e | 25 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
b87700e3 | 26 | struct btrfs_block_group_cache; |
5809d816 | 27 | #endif |
5f4c791e | 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; | |
5f4c791e | 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 | ||
5f4c791e | 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 | ||
5f4c791e | 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 | ||
5f4c791e | 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 | |
5f4c791e | 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 | ||
5f4c791e | 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 | ||
5f4c791e | 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 | ||
5f4c791e | 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 | ||
5f4c791e | 291 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
f1a87e24 | 292 | |
5f4c791e | 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 | ) | |
5f4c791e | 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 | ) | |
5f4c791e | 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 | ||
5f4c791e | 349 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0)) |
7dc44138 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 | ) | |
5f4c791e | 371 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) |
f7afb954 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 | ) | |
5f4c791e | 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 | ) | |
5f4c791e | 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 | |
5f4c791e | 483 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0)) |
7dc44138 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 | ) | |
5f4c791e | 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 | ) | |
7dc44138 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 | |
7dc44138 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 | ||
5f4c791e | 581 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
7dc44138 MJ |
582 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
583 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
584 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
585 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
1f1ec4ed MJ |
586 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage, |
587 | ||
588 | TP_PROTO(const struct page *page, const struct inode *inode, | |
589 | const struct writeback_control *wbc), | |
590 | ||
591 | TP_ARGS(page, inode, wbc), | |
592 | ||
593 | TP_FIELDS( | |
594 | ctf_integer(ino_t, ino, inode->i_ino) | |
595 | ctf_integer(pgoff_t, index, page->index) | |
596 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
597 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
598 | ctf_integer(loff_t, range_start, wbc->range_start) | |
599 | ctf_integer(loff_t, range_end, wbc->range_end) | |
600 | ctf_integer(char, for_kupdate, wbc->for_kupdate) | |
601 | ctf_integer(char, for_reclaim, wbc->for_reclaim) | |
602 | ctf_integer(char, range_cyclic, wbc->range_cyclic) | |
603 | ctf_integer(pgoff_t, writeback_index, | |
604 | inode->i_mapping->writeback_index) | |
605 | ctf_integer(u64, root_objectid, | |
606 | BTRFS_I(inode)->root->root_key.objectid) | |
607 | ) | |
608 | ) | |
609 | ||
610 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage, | |
611 | ||
612 | __extent_writepage, | |
613 | ||
614 | btrfs__extent_writepage, | |
615 | ||
616 | TP_PROTO(const struct page *page, const struct inode *inode, | |
617 | const struct writeback_control *wbc), | |
618 | ||
619 | TP_ARGS(page, inode, wbc) | |
620 | ) | |
621 | ||
622 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, | |
623 | ||
624 | TP_PROTO(const 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 | ||
639 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, | |
640 | ||
641 | TP_PROTO(const struct file *file, int datasync), | |
642 | ||
643 | TP_ARGS(file, datasync), | |
644 | ||
645 | TP_FIELDS( | |
646 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
647 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
648 | ctf_integer(int, datasync, datasync) | |
649 | ctf_integer(u64, root_objectid, | |
650 | BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid) | |
651 | ) | |
652 | ) | |
653 | #else | |
3bc29f0a | 654 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage, |
b87700e3 AG |
655 | |
656 | TP_PROTO(struct page *page, struct inode *inode, | |
657 | struct writeback_control *wbc), | |
658 | ||
659 | TP_ARGS(page, inode, wbc), | |
660 | ||
f127e61e MD |
661 | TP_FIELDS( |
662 | ctf_integer(ino_t, ino, inode->i_ino) | |
663 | ctf_integer(pgoff_t, index, page->index) | |
664 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
665 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
666 | ctf_integer(loff_t, range_start, wbc->range_start) | |
667 | ctf_integer(loff_t, range_end, wbc->range_end) | |
5f4c791e | 668 | #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0)) |
f127e61e | 669 | ctf_integer(char, nonblocking, wbc->nonblocking) |
b87700e3 | 670 | #endif |
f127e61e MD |
671 | ctf_integer(char, for_kupdate, wbc->for_kupdate) |
672 | ctf_integer(char, for_reclaim, wbc->for_reclaim) | |
673 | ctf_integer(char, range_cyclic, wbc->range_cyclic) | |
674 | ctf_integer(pgoff_t, writeback_index, | |
675 | inode->i_mapping->writeback_index) | |
676 | ctf_integer(u64, root_objectid, | |
677 | BTRFS_I(inode)->root->root_key.objectid) | |
678 | ) | |
b87700e3 AG |
679 | ) |
680 | ||
9bbf98da MD |
681 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage, |
682 | ||
683 | __extent_writepage, | |
684 | ||
685 | btrfs__extent_writepage, | |
b87700e3 AG |
686 | |
687 | TP_PROTO(struct page *page, struct inode *inode, | |
688 | struct writeback_control *wbc), | |
689 | ||
690 | TP_ARGS(page, inode, wbc) | |
691 | ) | |
692 | ||
3bc29f0a | 693 | LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook, |
b87700e3 AG |
694 | |
695 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | |
696 | ||
697 | TP_ARGS(page, start, end, uptodate), | |
698 | ||
f127e61e MD |
699 | TP_FIELDS( |
700 | ctf_integer(ino_t, ino, page->mapping->host->i_ino) | |
701 | ctf_integer(pgoff_t, index, page->index) | |
702 | ctf_integer(u64, start, start) | |
703 | ctf_integer(u64, end, end) | |
704 | ctf_integer(int, uptodate, uptodate) | |
705 | ctf_integer(u64, root_objectid, | |
706 | BTRFS_I(page->mapping->host)->root->root_key.objectid) | |
707 | ) | |
b87700e3 AG |
708 | ) |
709 | ||
3bc29f0a | 710 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, |
b87700e3 AG |
711 | |
712 | TP_PROTO(struct file *file, int datasync), | |
713 | ||
714 | TP_ARGS(file, datasync), | |
715 | ||
f127e61e MD |
716 | TP_FIELDS( |
717 | ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino) | |
718 | ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino) | |
719 | ctf_integer(int, datasync, datasync) | |
720 | ctf_integer(u64, root_objectid, | |
b87700e3 | 721 | BTRFS_I(file->f_path.dentry->d_inode)->root->root_key.objectid) |
f127e61e | 722 | ) |
b87700e3 | 723 | ) |
1f1ec4ed | 724 | #endif |
b87700e3 | 725 | |
5f4c791e | 726 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
727 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
728 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
729 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
730 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
731 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
732 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
733 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
1f1ec4ed MJ |
734 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
735 | ||
736 | TP_PROTO(const struct btrfs_fs_info *fs_info, int wait), | |
737 | ||
738 | TP_ARGS(fs_info, wait), | |
739 | ||
740 | TP_FIELDS( | |
741 | ctf_integer(int, wait, wait) | |
742 | ) | |
743 | ) | |
5f4c791e | 744 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fcd0a11c MD |
745 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
746 | ||
747 | TP_PROTO(struct btrfs_fs_info *fs_info, int wait), | |
748 | ||
749 | TP_ARGS(fs_info, wait), | |
750 | ||
751 | TP_FIELDS( | |
752 | ctf_integer(int, wait, wait) | |
753 | ) | |
754 | ) | |
755 | #else | |
3bc29f0a | 756 | LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, |
b87700e3 AG |
757 | |
758 | TP_PROTO(int wait), | |
759 | ||
760 | TP_ARGS(wait), | |
761 | ||
f127e61e MD |
762 | TP_FIELDS( |
763 | ctf_integer(int, wait, wait) | |
764 | ) | |
b87700e3 | 765 | ) |
fcd0a11c MD |
766 | #endif |
767 | ||
5f4c791e | 768 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
769 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
770 | ||
771 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
772 | const struct btrfs_block_group *block_group, int create), | |
773 | ||
774 | TP_ARGS(fs_info, block_group, create), | |
775 | ||
776 | TP_FIELDS( | |
777 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
778 | ctf_integer(u64, offset, block_group->start) | |
779 | ctf_integer(u64, size, block_group->length) | |
780 | ctf_integer(u64, flags, block_group->flags) | |
781 | ctf_integer(u64, bytes_used, block_group->used) | |
782 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
783 | ctf_integer(int, create, create) | |
784 | ) | |
785 | ) | |
5f4c791e | 786 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
787 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
788 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
789 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 790 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
791 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
792 | ||
793 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
794 | const struct btrfs_block_group_cache *block_group, int create), | |
795 | ||
796 | TP_ARGS(fs_info, block_group, create), | |
797 | ||
798 | TP_FIELDS( | |
9d2f1147 | 799 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
800 | ctf_integer(u64, offset, block_group->key.objectid) |
801 | ctf_integer(u64, size, block_group->key.offset) | |
802 | ctf_integer(u64, flags, block_group->flags) | |
803 | ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) | |
804 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
805 | ctf_integer(int, create, create) | |
806 | ) | |
807 | ) | |
808 | #else | |
fcd0a11c | 809 | LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, |
b87700e3 | 810 | |
fcd0a11c MD |
811 | TP_PROTO(struct btrfs_fs_info *fs_info, |
812 | struct btrfs_block_group_cache *block_group, int create), | |
813 | ||
814 | TP_ARGS(fs_info, block_group, create), | |
815 | ||
816 | TP_FIELDS( | |
9d2f1147 | 817 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fcd0a11c MD |
818 | ctf_integer(u64, offset, block_group->key.objectid) |
819 | ctf_integer(u64, size, block_group->key.offset) | |
820 | ctf_integer(u64, flags, block_group->flags) | |
821 | ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) | |
822 | ctf_integer(u64, bytes_super, block_group->bytes_super) | |
823 | ctf_integer(int, create, create) | |
824 | ) | |
825 | ) | |
1f1ec4ed | 826 | #endif |
fcd0a11c | 827 | |
5f4c791e | 828 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
829 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
830 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
831 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
832 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
833 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
834 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
835 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
fde8b34a | 836 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
1f1ec4ed MJ |
837 | |
838 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
839 | const struct btrfs_delayed_ref_node *ref, | |
840 | const struct btrfs_delayed_tree_ref *full_ref, | |
841 | int action), | |
842 | ||
843 | TP_ARGS(fs_info, ref, full_ref, action), | |
844 | ||
845 | TP_FIELDS( | |
9d2f1147 | 846 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
847 | ctf_integer(u64, bytenr, ref->bytenr) |
848 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
849 | ctf_integer(int, action, action) | |
850 | ctf_integer(u64, parent, full_ref->parent) | |
851 | ctf_integer(u64, ref_root, full_ref->root) | |
852 | ctf_integer(int, level, full_ref->level) | |
853 | ctf_integer(int, type, ref->type) | |
854 | ctf_integer(u64, seq, ref->seq) | |
855 | ) | |
856 | ) | |
fde8b34a | 857 | |
426eff93 MD |
858 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
859 | ||
860 | add_delayed_tree_ref, | |
861 | ||
862 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
863 | |
864 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
865 | const struct btrfs_delayed_ref_node *ref, | |
866 | const struct btrfs_delayed_tree_ref *full_ref, | |
867 | int action), | |
868 | ||
869 | TP_ARGS(fs_info, ref, full_ref, action) | |
870 | ) | |
871 | ||
426eff93 MD |
872 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
873 | ||
874 | run_delayed_tree_ref, | |
875 | ||
876 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
877 | |
878 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
879 | const struct btrfs_delayed_ref_node *ref, | |
880 | const struct btrfs_delayed_tree_ref *full_ref, | |
881 | int action), | |
882 | ||
883 | TP_ARGS(fs_info, ref, full_ref, action) | |
884 | ) | |
5f4c791e | 885 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fde8b34a | 886 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
fcd0a11c MD |
887 | |
888 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
889 | struct btrfs_delayed_ref_node *ref, | |
890 | struct btrfs_delayed_tree_ref *full_ref, | |
891 | int action), | |
892 | ||
893 | TP_ARGS(fs_info, ref, full_ref, action), | |
894 | ||
895 | TP_FIELDS( | |
9d2f1147 | 896 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fcd0a11c MD |
897 | ctf_integer(u64, bytenr, ref->bytenr) |
898 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
899 | ctf_integer(int, action, action) | |
900 | ctf_integer(u64, parent, full_ref->parent) | |
901 | ctf_integer(u64, ref_root, full_ref->root) | |
902 | ctf_integer(int, level, full_ref->level) | |
903 | ctf_integer(int, type, ref->type) | |
904 | ctf_integer(u64, seq, ref->seq) | |
905 | ) | |
906 | ) | |
fde8b34a | 907 | |
426eff93 MD |
908 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
909 | ||
910 | add_delayed_tree_ref, | |
911 | ||
912 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
913 | |
914 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
915 | struct btrfs_delayed_ref_node *ref, | |
916 | struct btrfs_delayed_tree_ref *full_ref, | |
917 | int action), | |
918 | ||
919 | TP_ARGS(fs_info, ref, full_ref, action) | |
920 | ) | |
921 | ||
426eff93 MD |
922 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
923 | ||
924 | run_delayed_tree_ref, | |
925 | ||
926 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
927 | |
928 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
929 | struct btrfs_delayed_ref_node *ref, | |
930 | struct btrfs_delayed_tree_ref *full_ref, | |
931 | int action), | |
932 | ||
933 | TP_ARGS(fs_info, ref, full_ref, action) | |
934 | ) | |
0badc02f MJ |
935 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
936 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, | |
937 | ||
938 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
939 | const struct btrfs_delayed_tree_ref *full_ref, | |
940 | int action), | |
941 | ||
942 | TP_ARGS(ref, full_ref, action), | |
943 | ||
944 | TP_FIELDS( | |
945 | ctf_integer(u64, bytenr, ref->bytenr) | |
946 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
947 | ctf_integer(int, action, action) | |
948 | ctf_integer(u64, parent, full_ref->parent) | |
949 | ctf_integer(u64, ref_root, full_ref->root) | |
950 | ctf_integer(int, level, full_ref->level) | |
951 | ctf_integer(int, type, ref->type) | |
952 | ctf_integer(u64, seq, ref->seq) | |
953 | ) | |
954 | ) | |
955 | ||
426eff93 MD |
956 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
957 | ||
958 | add_delayed_tree_ref, | |
959 | ||
960 | btrfs_add_delayed_tree_ref, | |
0badc02f MJ |
961 | |
962 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
963 | const struct btrfs_delayed_tree_ref *full_ref, | |
964 | int action), | |
965 | ||
966 | TP_ARGS(ref, full_ref, action) | |
967 | ) | |
968 | ||
426eff93 MD |
969 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
970 | ||
971 | run_delayed_tree_ref, | |
972 | ||
973 | btrfs_run_delayed_tree_ref, | |
0badc02f MJ |
974 | |
975 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
976 | const struct btrfs_delayed_tree_ref *full_ref, | |
977 | int action), | |
978 | ||
979 | TP_ARGS(ref, full_ref, action) | |
980 | ) | |
5f4c791e | 981 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
fde8b34a MJ |
982 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref, |
983 | ||
984 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
985 | struct btrfs_delayed_tree_ref *full_ref, | |
986 | int action), | |
987 | ||
988 | TP_ARGS(ref, full_ref, action), | |
989 | ||
990 | TP_FIELDS( | |
991 | ctf_integer(u64, bytenr, ref->bytenr) | |
992 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
993 | ctf_integer(int, action, action) | |
994 | ctf_integer(u64, parent, full_ref->parent) | |
995 | ctf_integer(u64, ref_root, full_ref->root) | |
996 | ctf_integer(int, level, full_ref->level) | |
997 | ctf_integer(int, type, ref->type) | |
998 | ctf_integer(u64, seq, ref->seq) | |
999 | ) | |
1000 | ) | |
1001 | ||
426eff93 MD |
1002 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
1003 | ||
1004 | add_delayed_tree_ref, | |
1005 | ||
1006 | btrfs_add_delayed_tree_ref, | |
fde8b34a MJ |
1007 | |
1008 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1009 | struct btrfs_delayed_tree_ref *full_ref, | |
1010 | int action), | |
1011 | ||
1012 | TP_ARGS(ref, full_ref, action) | |
1013 | ) | |
1014 | ||
426eff93 MD |
1015 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref, |
1016 | ||
1017 | run_delayed_tree_ref, | |
1018 | ||
1019 | btrfs_run_delayed_tree_ref, | |
fde8b34a MJ |
1020 | |
1021 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1022 | struct btrfs_delayed_tree_ref *full_ref, | |
1023 | int action), | |
1024 | ||
1025 | TP_ARGS(ref, full_ref, action) | |
1026 | ) | |
5f4c791e | 1027 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0)) |
3bc29f0a | 1028 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, |
b87700e3 AG |
1029 | |
1030 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1031 | struct btrfs_delayed_tree_ref *full_ref, | |
1032 | int action), | |
1033 | ||
1034 | TP_ARGS(ref, full_ref, action), | |
1035 | ||
f127e61e MD |
1036 | TP_FIELDS( |
1037 | ctf_integer(u64, bytenr, ref->bytenr) | |
1038 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1039 | ctf_integer(int, action, action) | |
1040 | ctf_integer(u64, parent, full_ref->parent) | |
1041 | ctf_integer(u64, ref_root, full_ref->root) | |
1042 | ctf_integer(int, level, full_ref->level) | |
1043 | ctf_integer(int, type, ref->type) | |
f127e61e | 1044 | ctf_integer(u64, seq, ref->seq) |
fde8b34a MJ |
1045 | ) |
1046 | ) | |
1047 | #else | |
1048 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, | |
1049 | ||
1050 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1051 | struct btrfs_delayed_tree_ref *full_ref, | |
1052 | int action), | |
1053 | ||
1054 | TP_ARGS(ref, full_ref, action), | |
1055 | ||
1056 | TP_FIELDS( | |
1057 | ctf_integer(u64, bytenr, ref->bytenr) | |
1058 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1059 | ctf_integer(int, action, action) | |
1060 | ctf_integer(u64, parent, full_ref->parent) | |
1061 | ctf_integer(u64, ref_root, full_ref->root) | |
1062 | ctf_integer(int, level, full_ref->level) | |
1063 | ctf_integer(int, type, ref->type) | |
f127e61e | 1064 | ) |
b87700e3 | 1065 | ) |
fcd0a11c | 1066 | #endif |
b87700e3 | 1067 | |
5f4c791e | 1068 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1069 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1070 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1071 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1072 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
1073 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
1074 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
1075 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
fde8b34a MJ |
1076 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1077 | ||
1078 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1079 | const struct btrfs_delayed_ref_node *ref, | |
1080 | const struct btrfs_delayed_data_ref *full_ref, | |
1081 | int action), | |
1082 | ||
1083 | TP_ARGS(fs_info, ref, full_ref, action), | |
1084 | ||
1085 | TP_FIELDS( | |
9d2f1147 | 1086 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fde8b34a MJ |
1087 | ctf_integer(u64, bytenr, ref->bytenr) |
1088 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1089 | ctf_integer(int, action, action) | |
1090 | ctf_integer(u64, parent, full_ref->parent) | |
1091 | ctf_integer(u64, ref_root, full_ref->root) | |
1092 | ctf_integer(u64, owner, full_ref->objectid) | |
1093 | ctf_integer(u64, offset, full_ref->offset) | |
1094 | ctf_integer(int, type, ref->type) | |
1095 | ctf_integer(u64, seq, ref->seq) | |
1096 | ) | |
1097 | ) | |
1098 | ||
426eff93 MD |
1099 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1100 | ||
1101 | add_delayed_data_ref, | |
1102 | ||
1103 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
1104 | |
1105 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1106 | const struct btrfs_delayed_ref_node *ref, | |
1107 | const struct btrfs_delayed_data_ref *full_ref, | |
1108 | int action), | |
1109 | ||
1110 | TP_ARGS(fs_info, ref, full_ref, action) | |
1111 | ) | |
1112 | ||
426eff93 MD |
1113 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1114 | ||
1115 | run_delayed_data_ref, | |
1116 | ||
1117 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1118 | |
1119 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1120 | const struct btrfs_delayed_ref_node *ref, | |
1121 | const struct btrfs_delayed_data_ref *full_ref, | |
1122 | int action), | |
1123 | ||
1124 | TP_ARGS(fs_info, ref, full_ref, action) | |
1125 | ) | |
5f4c791e | 1126 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
fde8b34a MJ |
1127 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1128 | ||
1129 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1130 | struct btrfs_delayed_ref_node *ref, | |
1131 | struct btrfs_delayed_data_ref *full_ref, | |
1132 | int action), | |
1133 | ||
1134 | TP_ARGS(fs_info, ref, full_ref, action), | |
1135 | ||
1136 | TP_FIELDS( | |
9d2f1147 | 1137 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
fde8b34a MJ |
1138 | ctf_integer(u64, bytenr, ref->bytenr) |
1139 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1140 | ctf_integer(int, action, action) | |
1141 | ctf_integer(u64, parent, full_ref->parent) | |
1142 | ctf_integer(u64, ref_root, full_ref->root) | |
1143 | ctf_integer(u64, owner, full_ref->objectid) | |
1144 | ctf_integer(u64, offset, full_ref->offset) | |
1145 | ctf_integer(int, type, ref->type) | |
1146 | ctf_integer(u64, seq, ref->seq) | |
1147 | ) | |
1148 | ) | |
1149 | ||
426eff93 MD |
1150 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1151 | ||
1152 | add_delayed_data_ref, | |
1153 | ||
1154 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
1155 | |
1156 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1157 | struct btrfs_delayed_ref_node *ref, | |
1158 | struct btrfs_delayed_data_ref *full_ref, | |
1159 | int action), | |
1160 | ||
1161 | TP_ARGS(fs_info, ref, full_ref, action) | |
1162 | ) | |
1163 | ||
426eff93 MD |
1164 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1165 | ||
1166 | run_delayed_data_ref, | |
1167 | ||
1168 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1169 | |
1170 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1171 | struct btrfs_delayed_ref_node *ref, | |
1172 | struct btrfs_delayed_data_ref *full_ref, | |
1173 | int action), | |
1174 | ||
1175 | TP_ARGS(fs_info, ref, full_ref, action) | |
1176 | ) | |
0badc02f MJ |
1177 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
1178 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, | |
1179 | ||
1180 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1181 | const struct btrfs_delayed_data_ref *full_ref, | |
1182 | int action), | |
1183 | ||
1184 | TP_ARGS(ref, full_ref, action), | |
1185 | ||
1186 | TP_FIELDS( | |
1187 | ctf_integer(u64, bytenr, ref->bytenr) | |
1188 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1189 | ctf_integer(int, action, action) | |
1190 | ctf_integer(u64, parent, full_ref->parent) | |
1191 | ctf_integer(u64, ref_root, full_ref->root) | |
1192 | ctf_integer(u64, owner, full_ref->objectid) | |
1193 | ctf_integer(u64, offset, full_ref->offset) | |
1194 | ctf_integer(int, type, ref->type) | |
1195 | ctf_integer(u64, seq, ref->seq) | |
1196 | ) | |
1197 | ) | |
1198 | ||
426eff93 MD |
1199 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1200 | ||
1201 | add_delayed_data_ref, | |
1202 | ||
1203 | btrfs_add_delayed_data_ref, | |
0badc02f MJ |
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(fs_info, ref, full_ref, action) | |
1210 | ) | |
1211 | ||
426eff93 MD |
1212 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1213 | ||
1214 | run_delayed_data_ref, | |
1215 | ||
1216 | btrfs_run_delayed_data_ref, | |
0badc02f MJ |
1217 | |
1218 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1219 | const struct btrfs_delayed_data_ref *full_ref, | |
1220 | int action), | |
1221 | ||
1222 | TP_ARGS(fs_info, ref, full_ref, action) | |
1223 | ) | |
5f4c791e | 1224 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
fde8b34a MJ |
1225 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref, |
1226 | ||
1227 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1228 | struct btrfs_delayed_data_ref *full_ref, | |
1229 | int action), | |
1230 | ||
1231 | TP_ARGS(ref, full_ref, action), | |
1232 | ||
1233 | TP_FIELDS( | |
1234 | ctf_integer(u64, bytenr, ref->bytenr) | |
1235 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1236 | ctf_integer(int, action, action) | |
1237 | ctf_integer(u64, parent, full_ref->parent) | |
1238 | ctf_integer(u64, ref_root, full_ref->root) | |
1239 | ctf_integer(u64, owner, full_ref->objectid) | |
1240 | ctf_integer(u64, offset, full_ref->offset) | |
1241 | ctf_integer(int, type, ref->type) | |
1242 | ctf_integer(u64, seq, ref->seq) | |
1243 | ) | |
1244 | ) | |
1245 | ||
426eff93 MD |
1246 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1247 | ||
1248 | add_delayed_data_ref, | |
1249 | ||
1250 | btrfs_add_delayed_data_ref, | |
fde8b34a MJ |
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(fs_info, ref, full_ref, action) | |
1257 | ) | |
1258 | ||
426eff93 MD |
1259 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref, |
1260 | ||
1261 | run_delayed_data_ref, | |
1262 | ||
1263 | btrfs_run_delayed_data_ref, | |
fde8b34a MJ |
1264 | |
1265 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1266 | struct btrfs_delayed_data_ref *full_ref, | |
1267 | int action), | |
1268 | ||
1269 | TP_ARGS(fs_info, ref, full_ref, action) | |
1270 | ) | |
5f4c791e | 1271 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0)) |
3bc29f0a | 1272 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, |
b87700e3 AG |
1273 | |
1274 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1275 | struct btrfs_delayed_data_ref *full_ref, | |
1276 | int action), | |
1277 | ||
1278 | TP_ARGS(ref, full_ref, action), | |
1279 | ||
f127e61e MD |
1280 | TP_FIELDS( |
1281 | ctf_integer(u64, bytenr, ref->bytenr) | |
1282 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1283 | ctf_integer(int, action, action) | |
1284 | ctf_integer(u64, parent, full_ref->parent) | |
1285 | ctf_integer(u64, ref_root, full_ref->root) | |
1286 | ctf_integer(u64, owner, full_ref->objectid) | |
1287 | ctf_integer(u64, offset, full_ref->offset) | |
1288 | ctf_integer(int, type, ref->type) | |
f127e61e | 1289 | ctf_integer(u64, seq, ref->seq) |
f127e61e | 1290 | ) |
b87700e3 | 1291 | ) |
fde8b34a MJ |
1292 | #else |
1293 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, | |
1294 | ||
1295 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1296 | struct btrfs_delayed_data_ref *full_ref, | |
1297 | int action), | |
1298 | ||
1299 | TP_ARGS(ref, full_ref, action), | |
1300 | ||
1301 | TP_FIELDS( | |
1302 | ctf_integer(u64, bytenr, ref->bytenr) | |
1303 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1304 | ctf_integer(int, action, action) | |
1305 | ctf_integer(u64, parent, full_ref->parent) | |
1306 | ctf_integer(u64, ref_root, full_ref->root) | |
1307 | ctf_integer(u64, owner, full_ref->objectid) | |
1308 | ctf_integer(u64, offset, full_ref->offset) | |
1309 | ctf_integer(int, type, ref->type) | |
1310 | ) | |
1311 | ) | |
1312 | #endif | |
b87700e3 | 1313 | |
5f4c791e | 1314 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) |
ab9ebe67 MJ |
1315 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1316 | ||
1317 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1318 | const struct btrfs_delayed_ref_head *head_ref, | |
1319 | int action), | |
1320 | ||
1321 | TP_ARGS(fs_info, head_ref, action), | |
1322 | ||
1323 | TP_FIELDS( | |
1324 | ctf_integer(u64, bytenr, head_ref->bytenr) | |
1325 | ctf_integer(u64, num_bytes, head_ref->num_bytes) | |
1326 | ctf_integer(int, action, action) | |
1327 | ctf_integer(int, is_data, head_ref->is_data) | |
1328 | ) | |
1329 | ) | |
1330 | ||
d7921a5f MD |
1331 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1332 | ||
1333 | add_delayed_ref_head, | |
1334 | ||
1335 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1336 | |
1337 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1338 | const struct btrfs_delayed_ref_head *head_ref, | |
1339 | int action), | |
1340 | ||
1341 | TP_ARGS(fs_info, head_ref, action) | |
1342 | ) | |
1343 | ||
d7921a5f MD |
1344 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1345 | ||
1346 | run_delayed_ref_head, | |
1347 | ||
1348 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1349 | |
1350 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1351 | const struct btrfs_delayed_ref_head *head_ref, | |
1352 | int action), | |
1353 | ||
1354 | TP_ARGS(fs_info, head_ref, action) | |
1355 | ) | |
1356 | ||
5f4c791e | 1357 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1358 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1359 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1360 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1361 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,103,7,0,0) || \ | |
1362 | LTTNG_SLE_KERNEL_RANGE(4,4,114,94,0,0, 4,4,114,95,0,0) || \ | |
1363 | LTTNG_SLE_KERNEL_RANGE(4,4,120,94,0,0, 4,4,120,95,0,0) || \ | |
1364 | LTTNG_SLE_KERNEL_RANGE(4,4,126,94,0,0, 4,5,0,0,0,0)) | |
1365 | ||
ab9ebe67 MJ |
1366 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1367 | ||
1368 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1369 | const struct btrfs_delayed_ref_node *ref, | |
1370 | const struct btrfs_delayed_ref_head *head_ref, | |
1371 | int action), | |
1372 | ||
1373 | TP_ARGS(fs_info, ref, head_ref, action), | |
1374 | ||
1375 | TP_FIELDS( | |
1376 | ctf_integer(u64, bytenr, ref->bytenr) | |
1377 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1378 | ctf_integer(int, action, action) | |
1379 | ctf_integer(int, is_data, head_ref->is_data) | |
1380 | ) | |
1381 | ) | |
1382 | ||
d7921a5f MD |
1383 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1384 | ||
1385 | add_delayed_ref_head, | |
1386 | ||
1387 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1388 | |
1389 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1390 | const struct btrfs_delayed_ref_node *ref, | |
1391 | const struct btrfs_delayed_ref_head *head_ref, | |
1392 | int action), | |
1393 | ||
1394 | TP_ARGS(fs_info, ref, head_ref, action) | |
1395 | ) | |
1396 | ||
d7921a5f MD |
1397 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1398 | ||
1399 | run_delayed_ref_head, | |
1400 | ||
1401 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1402 | |
1403 | TP_PROTO(const struct btrfs_fs_info *fs_info, | |
1404 | const struct btrfs_delayed_ref_node *ref, | |
1405 | const struct btrfs_delayed_ref_head *head_ref, | |
1406 | int action), | |
1407 | ||
1408 | TP_ARGS(fs_info, ref, head_ref, action) | |
1409 | ) | |
1410 | ||
5f4c791e | 1411 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) |
ab9ebe67 | 1412 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
fcd0a11c MD |
1413 | |
1414 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1415 | struct btrfs_delayed_ref_node *ref, | |
1416 | struct btrfs_delayed_ref_head *head_ref, | |
1417 | int action), | |
1418 | ||
1419 | TP_ARGS(fs_info, ref, head_ref, action), | |
1420 | ||
1421 | TP_FIELDS( | |
1422 | ctf_integer(u64, bytenr, ref->bytenr) | |
1423 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1424 | ctf_integer(int, action, action) | |
1425 | ctf_integer(int, is_data, head_ref->is_data) | |
1426 | ) | |
1427 | ) | |
1428 | ||
d7921a5f MD |
1429 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1430 | ||
1431 | add_delayed_ref_head, | |
1432 | ||
1433 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1434 | |
1435 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1436 | struct btrfs_delayed_ref_node *ref, | |
1437 | struct btrfs_delayed_ref_head *head_ref, | |
1438 | int action), | |
1439 | ||
1440 | TP_ARGS(fs_info, ref, head_ref, action) | |
1441 | ) | |
1442 | ||
d7921a5f MD |
1443 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1444 | ||
1445 | run_delayed_ref_head, | |
1446 | ||
1447 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1448 | |
1449 | TP_PROTO(struct btrfs_fs_info *fs_info, | |
1450 | struct btrfs_delayed_ref_node *ref, | |
1451 | struct btrfs_delayed_ref_head *head_ref, | |
1452 | int action), | |
1453 | ||
1454 | TP_ARGS(fs_info, ref, head_ref, action) | |
1455 | ) | |
1456 | ||
0badc02f | 1457 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,92,0,0, 4,5,0,0,0,0)) |
0b3f6dcb MJ |
1458 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1459 | ||
1460 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1461 | const struct btrfs_delayed_ref_head *head_ref, | |
1462 | int action), | |
1463 | ||
1464 | TP_ARGS(ref, head_ref, action), | |
1465 | ||
1466 | TP_FIELDS( | |
1467 | ctf_integer(u64, bytenr, ref->bytenr) | |
1468 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1469 | ctf_integer(int, action, action) | |
1470 | ctf_integer(int, is_data, head_ref->is_data) | |
1471 | ) | |
1472 | ) | |
1473 | ||
d7921a5f MD |
1474 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1475 | ||
1476 | add_delayed_ref_head, | |
1477 | ||
1478 | btrfs_add_delayed_ref_head, | |
0b3f6dcb MJ |
1479 | |
1480 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1481 | const struct btrfs_delayed_ref_head *head_ref, | |
1482 | int action), | |
1483 | ||
1484 | TP_ARGS(ref, head_ref, action) | |
1485 | ) | |
1486 | ||
d7921a5f MD |
1487 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1488 | ||
1489 | run_delayed_ref_head, | |
1490 | ||
1491 | btrfs_run_delayed_ref_head, | |
0b3f6dcb MJ |
1492 | |
1493 | TP_PROTO(const struct btrfs_delayed_ref_node *ref, | |
1494 | const struct btrfs_delayed_ref_head *head_ref, | |
1495 | int action), | |
1496 | ||
1497 | TP_ARGS(ref, head_ref, action) | |
1498 | ) | |
1499 | ||
5f4c791e | 1500 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) |
ab9ebe67 MJ |
1501 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, |
1502 | ||
1503 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1504 | struct btrfs_delayed_ref_head *head_ref, | |
1505 | int action), | |
1506 | ||
1507 | TP_ARGS(ref, head_ref, action), | |
1508 | ||
1509 | TP_FIELDS( | |
1510 | ctf_integer(u64, bytenr, ref->bytenr) | |
1511 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1512 | ctf_integer(int, action, action) | |
1513 | ctf_integer(int, is_data, head_ref->is_data) | |
1514 | ) | |
1515 | ) | |
1516 | ||
d7921a5f MD |
1517 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1518 | ||
1519 | add_delayed_ref_head, | |
1520 | ||
1521 | btrfs_add_delayed_ref_head, | |
ab9ebe67 MJ |
1522 | |
1523 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1524 | struct btrfs_delayed_ref_head *head_ref, | |
1525 | int action), | |
1526 | ||
1527 | TP_ARGS(ref, head_ref, action) | |
1528 | ) | |
1529 | ||
d7921a5f MD |
1530 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, |
1531 | ||
1532 | run_delayed_ref_head, | |
1533 | ||
1534 | btrfs_run_delayed_ref_head, | |
ab9ebe67 MJ |
1535 | |
1536 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1537 | struct btrfs_delayed_ref_head *head_ref, | |
1538 | int action), | |
1539 | ||
1540 | TP_ARGS(ref, head_ref, action) | |
1541 | ) | |
1542 | ||
fcd0a11c | 1543 | #else |
3bc29f0a | 1544 | LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, |
b87700e3 AG |
1545 | |
1546 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | |
1547 | struct btrfs_delayed_ref_head *head_ref, | |
1548 | int action), | |
1549 | ||
1550 | TP_ARGS(ref, head_ref, action), | |
1551 | ||
f127e61e MD |
1552 | TP_FIELDS( |
1553 | ctf_integer(u64, bytenr, ref->bytenr) | |
1554 | ctf_integer(u64, num_bytes, ref->num_bytes) | |
1555 | ctf_integer(int, action, action) | |
1556 | ctf_integer(int, is_data, head_ref->is_data) | |
1557 | ) | |
b87700e3 | 1558 | ) |
fcd0a11c | 1559 | #endif |
b87700e3 | 1560 | |
5f4c791e | 1561 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
1562 | |
1563 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1564 | ||
1565 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, | |
1566 | u64 offset, u64 size), | |
1567 | ||
1568 | TP_ARGS(fs_info, map, offset, size), | |
1569 | ||
1570 | TP_FIELDS( | |
1571 | ctf_integer(int, num_stripes, map->num_stripes) | |
1572 | ctf_integer(u64, type, map->type) | |
1573 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1574 | ctf_integer(u64, offset, offset) | |
1575 | ctf_integer(u64, size, size) | |
1576 | ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid) | |
1577 | ) | |
1578 | ) | |
1579 | ||
1580 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1581 | ||
9d2f1147 | 1582 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, |
1f1ec4ed MJ |
1583 | u64 offset, u64 size), |
1584 | ||
9d2f1147 | 1585 | TP_ARGS(fs_info, map, offset, size) |
1f1ec4ed MJ |
1586 | ) |
1587 | ||
1588 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
1589 | ||
9d2f1147 | 1590 | TP_PROTO(const struct btrfs_fs_info *fs_info, const struct map_lookup *map, |
1f1ec4ed MJ |
1591 | u64 offset, u64 size), |
1592 | ||
9d2f1147 | 1593 | TP_ARGS(fs_info, map, offset, size) |
1f1ec4ed MJ |
1594 | ) |
1595 | ||
5f4c791e | 1596 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
ff8bdcc2 MD |
1597 | |
1598 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1599 | ||
1600 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, | |
1601 | u64 offset, u64 size), | |
1602 | ||
1603 | TP_ARGS(fs_info, map, offset, size), | |
1604 | ||
1605 | TP_FIELDS( | |
1606 | ctf_integer(int, num_stripes, map->num_stripes) | |
1607 | ctf_integer(u64, type, map->type) | |
1608 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1609 | ctf_integer(u64, offset, offset) | |
1610 | ctf_integer(u64, size, size) | |
1611 | ctf_integer(u64, root_objectid, fs_info->chunk_root->root_key.objectid) | |
1612 | ) | |
1613 | ) | |
1614 | ||
1615 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1616 | ||
9d2f1147 | 1617 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, |
ff8bdcc2 MD |
1618 | u64 offset, u64 size), |
1619 | ||
9d2f1147 | 1620 | TP_ARGS(fs_info, map, offset, size) |
ff8bdcc2 MD |
1621 | ) |
1622 | ||
1623 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
1624 | ||
9d2f1147 | 1625 | TP_PROTO(struct btrfs_fs_info *fs_info, struct map_lookup *map, |
ff8bdcc2 MD |
1626 | u64 offset, u64 size), |
1627 | ||
9d2f1147 | 1628 | TP_ARGS(fs_info, map, offset, size) |
ff8bdcc2 MD |
1629 | ) |
1630 | ||
0badc02f MJ |
1631 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1632 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1633 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1634 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
1635 | |
1636 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, | |
1637 | ||
1638 | TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map, | |
1639 | u64 offset, u64 size), | |
1640 | ||
1641 | TP_ARGS(root, map, offset, size), | |
1642 | ||
1643 | TP_FIELDS( | |
1644 | ctf_integer(int, num_stripes, map->num_stripes) | |
1645 | ctf_integer(u64, type, map->type) | |
1646 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1647 | ctf_integer(u64, offset, offset) | |
1648 | ctf_integer(u64, size, size) | |
1649 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1650 | ) | |
1651 | ) | |
1652 | ||
1653 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, | |
1654 | ||
1655 | TP_PROTO(const struct btrfs_root *root, const struct map_lookup *map, | |
1656 | u64 offset, u64 size), | |
1657 | ||
1658 | TP_ARGS(root, map, offset, size) | |
1659 | ) | |
1660 | ||
1661 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, | |
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 | ||
5f4c791e | 1669 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1670 | |
3bc29f0a | 1671 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, |
b87700e3 AG |
1672 | |
1673 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
1674 | u64 offset, u64 size), | |
1675 | ||
1676 | TP_ARGS(root, map, offset, size), | |
1677 | ||
f127e61e MD |
1678 | TP_FIELDS( |
1679 | ctf_integer(int, num_stripes, map->num_stripes) | |
1680 | ctf_integer(u64, type, map->type) | |
1681 | ctf_integer(int, sub_stripes, map->sub_stripes) | |
1682 | ctf_integer(u64, offset, offset) | |
1683 | ctf_integer(u64, size, size) | |
1684 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1685 | ) | |
b87700e3 AG |
1686 | ) |
1687 | ||
3bc29f0a | 1688 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_alloc, |
b87700e3 AG |
1689 | |
1690 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | |
1691 | u64 offset, u64 size), | |
1692 | ||
1693 | TP_ARGS(root, map, offset, size) | |
1694 | ) | |
1695 | ||
3bc29f0a | 1696 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk, btrfs_chunk_free, |
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 | ) | |
1703 | ||
5f4c791e | 1704 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1705 | |
5f4c791e | 1706 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1707 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1708 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1709 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 1710 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
1711 | LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, |
1712 | ||
1713 | TP_PROTO(const struct btrfs_root *root, const struct extent_buffer *buf, | |
1714 | const struct extent_buffer *cow), | |
1715 | ||
1716 | TP_ARGS(root, buf, cow), | |
1717 | ||
1718 | TP_FIELDS( | |
1719 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1720 | ctf_integer(u64, buf_start, buf->start) | |
1721 | ctf_integer(int, refs, atomic_read(&buf->refs)) | |
1722 | ctf_integer(u64, cow_start, cow->start) | |
1723 | ctf_integer(int, buf_level, btrfs_header_level(buf)) | |
1724 | ctf_integer(int, cow_level, btrfs_header_level(cow)) | |
1725 | ) | |
1726 | ) | |
1727 | #else | |
3bc29f0a | 1728 | LTTNG_TRACEPOINT_EVENT(btrfs_cow_block, |
b87700e3 AG |
1729 | |
1730 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | |
1731 | struct extent_buffer *cow), | |
1732 | ||
1733 | TP_ARGS(root, buf, cow), | |
1734 | ||
f127e61e MD |
1735 | TP_FIELDS( |
1736 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1737 | ctf_integer(u64, buf_start, buf->start) | |
1738 | ctf_integer(int, refs, atomic_read(&buf->refs)) | |
1739 | ctf_integer(u64, cow_start, cow->start) | |
1740 | ctf_integer(int, buf_level, btrfs_header_level(buf)) | |
1741 | ctf_integer(int, cow_level, btrfs_header_level(cow)) | |
1742 | ) | |
b87700e3 | 1743 | ) |
1f1ec4ed | 1744 | #endif |
b87700e3 | 1745 | |
5f4c791e | 1746 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
ae5af8ea MJ |
1747 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
1748 | ||
1749 | TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val, | |
1750 | u64 bytes, int reserve), | |
1751 | ||
1752 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1753 | ||
1754 | TP_FIELDS( | |
1755 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1756 | ctf_string(type, type) | |
1757 | ctf_integer(u64, val, val) | |
1758 | ctf_integer(u64, bytes, bytes) | |
1759 | ctf_integer(int, reserve, reserve) | |
1760 | ) | |
1761 | ) | |
5f4c791e | 1762 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
1763 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1764 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1765 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 1766 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
1767 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
1768 | ||
1769 | TP_PROTO(const struct btrfs_fs_info *fs_info, char *type, u64 val, | |
1770 | u64 bytes, int reserve), | |
1771 | ||
1772 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1773 | ||
1774 | TP_FIELDS( | |
9d2f1147 | 1775 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
1776 | ctf_string(type, type) |
1777 | ctf_integer(u64, val, val) | |
1778 | ctf_integer(u64, bytes, bytes) | |
1779 | ctf_integer(int, reserve, reserve) | |
1780 | ) | |
1781 | ) | |
5f4c791e | 1782 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
3bc29f0a | 1783 | LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation, |
b87700e3 AG |
1784 | |
1785 | TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val, | |
1786 | u64 bytes, int reserve), | |
1787 | ||
1788 | TP_ARGS(fs_info, type, val, bytes, reserve), | |
1789 | ||
f127e61e | 1790 | TP_FIELDS( |
9d2f1147 | 1791 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
f127e61e MD |
1792 | ctf_string(type, type) |
1793 | ctf_integer(u64, val, val) | |
1794 | ctf_integer(u64, bytes, bytes) | |
1795 | ctf_integer(int, reserve, reserve) | |
1796 | ) | |
b87700e3 AG |
1797 | ) |
1798 | #endif | |
1799 | ||
5f4c791e | 1800 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
1801 | |
1802 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1803 | ||
9d2f1147 | 1804 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1805 | |
9d2f1147 | 1806 | TP_ARGS(fs_info, start, len), |
1f1ec4ed MJ |
1807 | |
1808 | TP_FIELDS( | |
1809 | ctf_integer(u64, start, start) | |
1810 | ctf_integer(u64, len, len) | |
1811 | ) | |
1812 | ) | |
1813 | ||
1814 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1815 | ||
9d2f1147 | 1816 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1817 | |
9d2f1147 | 1818 | TP_ARGS(fs_info, start, len) |
1f1ec4ed MJ |
1819 | ) |
1820 | ||
1821 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1822 | ||
9d2f1147 | 1823 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 start, u64 len), |
1f1ec4ed | 1824 | |
9d2f1147 | 1825 | TP_ARGS(fs_info, start, len) |
1f1ec4ed MJ |
1826 | ) |
1827 | ||
5f4c791e | 1828 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
ff8bdcc2 MD |
1829 | |
1830 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1831 | ||
9d2f1147 | 1832 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1833 | |
9d2f1147 | 1834 | TP_ARGS(fs_info, start, len), |
ff8bdcc2 MD |
1835 | |
1836 | TP_FIELDS( | |
1837 | ctf_integer(u64, start, start) | |
1838 | ctf_integer(u64, len, len) | |
1839 | ) | |
1840 | ) | |
1841 | ||
1842 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1843 | ||
9d2f1147 | 1844 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1845 | |
9d2f1147 | 1846 | TP_ARGS(fs_info, start, len) |
ff8bdcc2 MD |
1847 | ) |
1848 | ||
1849 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1850 | ||
9d2f1147 | 1851 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 start, u64 len), |
ff8bdcc2 | 1852 | |
9d2f1147 | 1853 | TP_ARGS(fs_info, start, len) |
ff8bdcc2 MD |
1854 | ) |
1855 | ||
0badc02f MJ |
1856 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
1857 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
1858 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
1859 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e MJ |
1860 | |
1861 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, | |
1862 | ||
1863 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1864 | ||
1865 | TP_ARGS(root, start, len), | |
1866 | ||
1867 | TP_FIELDS( | |
1868 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1869 | ctf_integer(u64, start, start) | |
1870 | ctf_integer(u64, len, len) | |
1871 | ) | |
1872 | ) | |
1873 | ||
1874 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | |
1875 | ||
1876 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1877 | ||
1878 | TP_ARGS(root, start, len) | |
1879 | ) | |
1880 | ||
1881 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, | |
1882 | ||
1883 | TP_PROTO(const struct btrfs_root *root, u64 start, u64 len), | |
1884 | ||
1885 | TP_ARGS(root, start, len) | |
1886 | ) | |
1887 | ||
5f4c791e | 1888 | #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1889 | |
3bc29f0a | 1890 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent, |
b87700e3 AG |
1891 | |
1892 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1893 | ||
1894 | TP_ARGS(root, start, len), | |
1895 | ||
f127e61e MD |
1896 | TP_FIELDS( |
1897 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1898 | ctf_integer(u64, start, start) | |
1899 | ctf_integer(u64, len, len) | |
1900 | ) | |
b87700e3 AG |
1901 | ) |
1902 | ||
3bc29f0a | 1903 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_alloc, |
b87700e3 AG |
1904 | |
1905 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1906 | ||
1907 | TP_ARGS(root, start, len) | |
1908 | ) | |
1909 | ||
3bc29f0a | 1910 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent, btrfs_reserved_extent_free, |
b87700e3 AG |
1911 | |
1912 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | |
1913 | ||
1914 | TP_ARGS(root, start, len) | |
1915 | ) | |
1916 | ||
5f4c791e | 1917 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 1918 | |
5f4c791e | 1919 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \ |
eb270dc0 | 1920 | LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \ |
859ad5c7 MJ |
1921 | LTTNG_KERNEL_RANGE(5,4,78, 5,5,0) || \ |
1922 | LTTNG_UBUNTU_KERNEL_RANGE(5,8,18,44, 5,9,0,0)) | |
ab1ddefc MJ |
1923 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, |
1924 | ||
1925 | btrfs_find_free_extent, | |
1926 | ||
1927 | TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
1928 | u64 data), | |
1929 | ||
1930 | TP_ARGS(root, num_bytes, empty_size, data), | |
1931 | ||
1932 | TP_FIELDS( | |
1933 | ctf_array(u8, fsid, root->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1934 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
1935 | ctf_integer(u64, num_bytes, num_bytes) | |
1936 | ctf_integer(u64, empty_size, empty_size) | |
1937 | ctf_integer(u64, data, data) | |
1938 | ) | |
1939 | ) | |
1940 | ||
5f4c791e | 1941 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
ab1ddefc | 1942 | |
5809d816 MJ |
1943 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, |
1944 | ||
1945 | btrfs_find_free_extent, | |
1946 | ||
1947 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
1948 | u64 data), | |
1949 | ||
1950 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
1951 | ||
1952 | TP_FIELDS( | |
1953 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1954 | ctf_integer(u64, num_bytes, num_bytes) | |
1955 | ctf_integer(u64, empty_size, empty_size) | |
1956 | ctf_integer(u64, data, data) | |
1957 | ) | |
1958 | ) | |
1959 | ||
5f4c791e | 1960 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0)) |
ab1ddefc MJ |
1961 | |
1962 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
1963 | ||
1964 | btrfs_find_free_extent, | |
1965 | ||
1966 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
1967 | u64 data), | |
1968 | ||
1969 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
1970 | ||
1971 | TP_FIELDS( | |
1972 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1973 | ctf_integer(u64, num_bytes, num_bytes) | |
1974 | ctf_integer(u64, empty_size, empty_size) | |
1975 | ctf_integer(u64, data, data) | |
1976 | ) | |
1977 | ) | |
1978 | ||
5f4c791e | 1979 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
ab1ddefc MJ |
1980 | |
1981 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
1982 | ||
1983 | btrfs_find_free_extent, | |
1984 | ||
1985 | TP_PROTO(const struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
1986 | u64 data), | |
1987 | ||
1988 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
1989 | ||
1990 | TP_FIELDS( | |
1991 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
1992 | ctf_integer(u64, num_bytes, num_bytes) | |
1993 | ctf_integer(u64, empty_size, empty_size) | |
1994 | ctf_integer(u64, data, data) | |
1995 | ) | |
1996 | ) | |
1997 | ||
5f4c791e | 1998 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
ab1ddefc MJ |
1999 | |
2000 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2001 | ||
2002 | btrfs_find_free_extent, | |
2003 | ||
2004 | TP_PROTO(struct btrfs_fs_info *fs_info, u64 num_bytes, u64 empty_size, | |
2005 | u64 data), | |
2006 | ||
2007 | TP_ARGS(fs_info, num_bytes, empty_size, data), | |
2008 | ||
2009 | TP_FIELDS( | |
2010 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
2011 | ctf_integer(u64, num_bytes, num_bytes) | |
2012 | ctf_integer(u64, empty_size, empty_size) | |
2013 | ctf_integer(u64, data, data) | |
2014 | ) | |
2015 | ) | |
2016 | ||
2017 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ | |
2018 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2019 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
2020 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
2021 | ||
2022 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2023 | ||
2024 | btrfs_find_free_extent, | |
2025 | ||
2026 | TP_PROTO(const struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
2027 | u64 data), | |
2028 | ||
2029 | TP_ARGS(root, num_bytes, empty_size, data), | |
2030 | ||
2031 | TP_FIELDS( | |
2032 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2033 | ctf_integer(u64, num_bytes, num_bytes) | |
2034 | ctf_integer(u64, empty_size, empty_size) | |
2035 | ctf_integer(u64, data, data) | |
2036 | ) | |
2037 | ) | |
5f4c791e | 2038 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
ab1ddefc MJ |
2039 | |
2040 | LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent, | |
2041 | ||
2042 | btrfs_find_free_extent, | |
2043 | ||
2044 | TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, | |
2045 | u64 data), | |
2046 | ||
2047 | TP_ARGS(root, num_bytes, empty_size, data), | |
2048 | ||
2049 | TP_FIELDS( | |
2050 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2051 | ctf_integer(u64, num_bytes, num_bytes) | |
2052 | ctf_integer(u64, empty_size, empty_size) | |
2053 | ctf_integer(u64, data, data) | |
2054 | ) | |
2055 | ) | |
2056 | #endif | |
2057 | ||
5f4c791e | 2058 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
2059 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2060 | ||
2061 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2062 | u64 len), | |
2063 | ||
2064 | TP_ARGS(block_group, start, len), | |
2065 | ||
2066 | TP_FIELDS( | |
2067 | ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) | |
2068 | ctf_integer(u64, bg_objectid, block_group->start) | |
2069 | ctf_integer(u64, flags, block_group->flags) | |
2070 | ctf_integer(u64, start, start) | |
2071 | ctf_integer(u64, len, len) | |
2072 | ) | |
2073 | ) | |
2074 | ||
2075 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2076 | ||
2077 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2078 | u64 len), | |
2079 | ||
2080 | TP_ARGS(block_group, start, len) | |
2081 | ) | |
2082 | ||
2083 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2084 | ||
2085 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2086 | u64 len), | |
2087 | ||
2088 | TP_ARGS(block_group, start, len) | |
2089 | ) | |
2090 | ||
5f4c791e | 2091 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0)) |
51ab0b1d MJ |
2092 | |
2093 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | |
2094 | ||
2095 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2096 | u64 len), | |
2097 | ||
2098 | TP_ARGS(block_group, start, len), | |
2099 | ||
2100 | TP_FIELDS( | |
9d2f1147 | 2101 | ctf_array(u8, fsid, block_group->lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
51ab0b1d MJ |
2102 | ctf_integer(u64, bg_objectid, block_group->key.objectid) |
2103 | ctf_integer(u64, flags, block_group->flags) | |
2104 | ctf_integer(u64, start, start) | |
2105 | ctf_integer(u64, len, len) | |
2106 | ) | |
2107 | ) | |
2108 | ||
2109 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2110 | ||
2111 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2112 | u64 len), | |
2113 | ||
2114 | TP_ARGS(block_group, start, len) | |
2115 | ) | |
2116 | ||
2117 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2118 | ||
2119 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2120 | u64 len), | |
2121 | ||
2122 | TP_ARGS(block_group, start, len) | |
2123 | ) | |
ff8bdcc2 | 2124 | |
5f4c791e | 2125 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
1f1ec4ed MJ |
2126 | |
2127 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, | |
2128 | ||
9d2f1147 | 2129 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2130 | const struct btrfs_block_group_cache *block_group, u64 start, |
2131 | u64 len), | |
2132 | ||
9d2f1147 | 2133 | TP_ARGS(fs_info, block_group, start, len), |
1f1ec4ed MJ |
2134 | |
2135 | TP_FIELDS( | |
9d2f1147 | 2136 | ctf_array(u8, fsid, lttng_fs_info_fsid, BTRFS_UUID_SIZE) |
1f1ec4ed MJ |
2137 | ctf_integer(u64, bg_objectid, block_group->key.objectid) |
2138 | ctf_integer(u64, flags, block_group->flags) | |
2139 | ctf_integer(u64, start, start) | |
2140 | ctf_integer(u64, len, len) | |
2141 | ) | |
2142 | ) | |
2143 | ||
2144 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2145 | ||
9d2f1147 | 2146 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2147 | const struct btrfs_block_group_cache *block_group, u64 start, |
2148 | u64 len), | |
2149 | ||
9d2f1147 | 2150 | TP_ARGS(fs_info, block_group, start, len) |
1f1ec4ed MJ |
2151 | ) |
2152 | ||
2153 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2154 | ||
9d2f1147 | 2155 | TP_PROTO(const struct btrfs_fs_info *fs_info, |
1f1ec4ed MJ |
2156 | const struct btrfs_block_group_cache *block_group, u64 start, |
2157 | u64 len), | |
2158 | ||
9d2f1147 | 2159 | TP_ARGS(fs_info, block_group, start, len) |
1f1ec4ed MJ |
2160 | ) |
2161 | ||
5f4c791e | 2162 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) |
1f1ec4ed | 2163 | |
ff8bdcc2 MD |
2164 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2165 | ||
9d2f1147 | 2166 | TP_PROTO(struct btrfs_fs_info *fs_info, |
ff8bdcc2 MD |
2167 | struct btrfs_block_group_cache *block_group, u64 start, |
2168 | u64 len), | |
2169 | ||
9d2f1147 | 2170 | TP_ARGS(fs_info, block_group, start, len), |
ff8bdcc2 MD |
2171 | |
2172 | TP_FIELDS( | |
2173 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2174 | ctf_integer(u64, flags, block_group->flags) | |
2175 | ctf_integer(u64, start, start) | |
2176 | ctf_integer(u64, len, len) | |
2177 | ) | |
2178 | ) | |
2179 | ||
2180 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2181 | ||
9d2f1147 | 2182 | TP_PROTO(struct btrfs_fs_info *fs_info, |
ff8bdcc2 MD |
2183 | struct btrfs_block_group_cache *block_group, u64 start, |
2184 | u64 len), | |
2185 | ||
9d2f1147 | 2186 | TP_ARGS(fs_info, block_group, start, len) |
ff8bdcc2 MD |
2187 | ) |
2188 | ||
2189 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
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 | 2196 | ) |
0badc02f MJ |
2197 | #elif (LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2198 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2199 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
2200 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) | |
7ca7cd6e | 2201 | |
7ca7cd6e MJ |
2202 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
2203 | ||
2204 | TP_PROTO(const struct btrfs_root *root, | |
2205 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2206 | u64 len), | |
2207 | ||
2208 | TP_ARGS(root, block_group, start, len), | |
2209 | ||
2210 | TP_FIELDS( | |
2211 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2212 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2213 | ctf_integer(u64, flags, block_group->flags) | |
2214 | ctf_integer(u64, start, start) | |
2215 | ctf_integer(u64, len, len) | |
2216 | ) | |
2217 | ) | |
2218 | ||
2219 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, | |
2220 | ||
2221 | TP_PROTO(const struct btrfs_root *root, | |
2222 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2223 | u64 len), | |
2224 | ||
2225 | TP_ARGS(root, block_group, start, len) | |
2226 | ) | |
2227 | ||
2228 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, | |
2229 | ||
2230 | TP_PROTO(const struct btrfs_root *root, | |
2231 | const struct btrfs_block_group_cache *block_group, u64 start, | |
2232 | u64 len), | |
2233 | ||
2234 | TP_ARGS(root, block_group, start, len) | |
2235 | ) | |
ff8bdcc2 | 2236 | |
5f4c791e | 2237 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
ff8bdcc2 | 2238 | |
3bc29f0a | 2239 | LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent, |
b87700e3 AG |
2240 | |
2241 | TP_PROTO(struct btrfs_root *root, | |
2242 | struct btrfs_block_group_cache *block_group, u64 start, | |
2243 | u64 len), | |
2244 | ||
2245 | TP_ARGS(root, block_group, start, len), | |
2246 | ||
f127e61e MD |
2247 | TP_FIELDS( |
2248 | ctf_integer(u64, root_objectid, root->root_key.objectid) | |
2249 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2250 | ctf_integer(u64, flags, block_group->flags) | |
2251 | ctf_integer(u64, start, start) | |
2252 | ctf_integer(u64, len, len) | |
2253 | ) | |
b87700e3 AG |
2254 | ) |
2255 | ||
3bc29f0a | 2256 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent, |
b87700e3 AG |
2257 | |
2258 | TP_PROTO(struct btrfs_root *root, | |
2259 | struct btrfs_block_group_cache *block_group, u64 start, | |
2260 | u64 len), | |
2261 | ||
2262 | TP_ARGS(root, block_group, start, len) | |
2263 | ) | |
2264 | ||
3bc29f0a | 2265 | LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_cluster, |
b87700e3 AG |
2266 | |
2267 | TP_PROTO(struct btrfs_root *root, | |
2268 | struct btrfs_block_group_cache *block_group, u64 start, | |
2269 | u64 len), | |
2270 | ||
2271 | TP_ARGS(root, block_group, start, len) | |
2272 | ) | |
2273 | ||
5f4c791e | 2274 | #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */ |
ff8bdcc2 | 2275 | |
5f4c791e | 2276 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) |
5809d816 MJ |
2277 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
2278 | ||
2279 | TP_PROTO(const struct btrfs_block_group *block_group, u64 start, | |
2280 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2281 | ||
2282 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2283 | ||
2284 | TP_FIELDS( | |
2285 | ctf_integer(u64, bg_objectid, block_group->start) | |
2286 | ctf_integer(u64, flags, block_group->flags) | |
2287 | ctf_integer(u64, start, start) | |
2288 | ctf_integer(u64, bytes, bytes) | |
2289 | ctf_integer(u64, empty_size, empty_size) | |
2290 | ctf_integer(u64, min_bytes, min_bytes) | |
2291 | ) | |
2292 | ) | |
2293 | ||
2294 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, | |
2295 | ||
2296 | TP_PROTO(const struct btrfs_block_group *block_group), | |
2297 | ||
2298 | TP_ARGS(block_group), | |
2299 | ||
2300 | TP_FIELDS( | |
2301 | ctf_integer(u64, bg_objectid, block_group->start) | |
2302 | ) | |
2303 | ) | |
2304 | ||
2305 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, | |
2306 | ||
2307 | TP_PROTO(const struct btrfs_block_group *block_group, | |
2308 | const struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2309 | ||
2310 | TP_ARGS(block_group, cluster, size, bitmap), | |
2311 | ||
2312 | TP_FIELDS( | |
2313 | ctf_integer(u64, bg_objectid, block_group->start) | |
2314 | ctf_integer(u64, flags, block_group->flags) | |
2315 | ctf_integer(u64, start, cluster->window_start) | |
2316 | ctf_integer(u64, max_size, cluster->max_size) | |
2317 | ctf_integer(u64, size, size) | |
2318 | ctf_integer(int, bitmap, bitmap) | |
2319 | ) | |
2320 | ) | |
5f4c791e | 2321 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
2322 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2323 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2324 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 2325 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
2326 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
2327 | ||
2328 | TP_PROTO(const struct btrfs_block_group_cache *block_group, u64 start, | |
2329 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2330 | ||
2331 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2332 | ||
2333 | TP_FIELDS( | |
2334 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2335 | ctf_integer(u64, flags, block_group->flags) | |
2336 | ctf_integer(u64, start, start) | |
2337 | ctf_integer(u64, bytes, bytes) | |
2338 | ctf_integer(u64, empty_size, empty_size) | |
2339 | ctf_integer(u64, min_bytes, min_bytes) | |
2340 | ) | |
2341 | ) | |
2342 | ||
2343 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, | |
2344 | ||
2345 | TP_PROTO(const struct btrfs_block_group_cache *block_group), | |
2346 | ||
2347 | TP_ARGS(block_group), | |
2348 | ||
2349 | TP_FIELDS( | |
2350 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2351 | ) | |
2352 | ) | |
2353 | ||
2354 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, | |
2355 | ||
2356 | TP_PROTO(const struct btrfs_block_group_cache *block_group, | |
2357 | const struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2358 | ||
2359 | TP_ARGS(block_group, cluster, size, bitmap), | |
2360 | ||
2361 | TP_FIELDS( | |
2362 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2363 | ctf_integer(u64, flags, block_group->flags) | |
2364 | ctf_integer(u64, start, cluster->window_start) | |
2365 | ctf_integer(u64, max_size, cluster->max_size) | |
2366 | ctf_integer(u64, size, size) | |
2367 | ctf_integer(int, bitmap, bitmap) | |
2368 | ) | |
2369 | ) | |
5f4c791e | 2370 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0)) |
3bc29f0a | 2371 | LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster, |
b87700e3 AG |
2372 | |
2373 | TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start, | |
2374 | u64 bytes, u64 empty_size, u64 min_bytes), | |
2375 | ||
2376 | TP_ARGS(block_group, start, bytes, empty_size, min_bytes), | |
2377 | ||
f127e61e MD |
2378 | TP_FIELDS( |
2379 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2380 | ctf_integer(u64, flags, block_group->flags) | |
2381 | ctf_integer(u64, start, start) | |
2382 | ctf_integer(u64, bytes, bytes) | |
2383 | ctf_integer(u64, empty_size, empty_size) | |
2384 | ctf_integer(u64, min_bytes, min_bytes) | |
2385 | ) | |
b87700e3 AG |
2386 | ) |
2387 | ||
3bc29f0a | 2388 | LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup, |
b87700e3 AG |
2389 | |
2390 | TP_PROTO(struct btrfs_block_group_cache *block_group), | |
2391 | ||
2392 | TP_ARGS(block_group), | |
2393 | ||
f127e61e MD |
2394 | TP_FIELDS( |
2395 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2396 | ) | |
b87700e3 AG |
2397 | ) |
2398 | ||
3bc29f0a | 2399 | LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster, |
b87700e3 AG |
2400 | |
2401 | TP_PROTO(struct btrfs_block_group_cache *block_group, | |
2402 | struct btrfs_free_cluster *cluster, u64 size, int bitmap), | |
2403 | ||
2404 | TP_ARGS(block_group, cluster, size, bitmap), | |
2405 | ||
f127e61e MD |
2406 | TP_FIELDS( |
2407 | ctf_integer(u64, bg_objectid, block_group->key.objectid) | |
2408 | ctf_integer(u64, flags, block_group->flags) | |
2409 | ctf_integer(u64, start, cluster->window_start) | |
2410 | ctf_integer(u64, max_size, cluster->max_size) | |
2411 | ctf_integer(u64, size, size) | |
2412 | ctf_integer(int, bitmap, bitmap) | |
2413 | ) | |
b87700e3 AG |
2414 | ) |
2415 | #endif | |
2416 | ||
5f4c791e | 2417 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \ |
0badc02f MJ |
2418 | LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \ |
2419 | LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \ | |
2420 | LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \ | |
7ca7cd6e | 2421 | LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) |
1f1ec4ed MJ |
2422 | LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, |
2423 | ||
2424 | btrfs_alloc_extent_state, | |
2425 | ||
2426 | TP_PROTO(const struct extent_state *state, gfp_t mask, unsigned long IP), | |
2427 | ||
2428 | TP_ARGS(state, mask, IP), | |
2429 | ||
2430 | TP_FIELDS( | |
2431 | ctf_integer_hex(const struct extent_state *, state, state) | |
2432 | ctf_integer(gfp_t, mask, mask) | |
2c054599 | 2433 | ctf_integer_hex(unsigned long, ip, IP) |
1f1ec4ed MJ |
2434 | ) |
2435 | ) | |
2436 | ||
2437 | LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, | |
2438 | ||
2439 | btrfs_free_extent_state, | |
2440 | ||
2441 | TP_PROTO(const struct extent_state *state, unsigned long IP), | |
2442 | ||
2443 | TP_ARGS(state, IP), | |
2444 | ||
2445 | TP_FIELDS( | |
2446 | ctf_integer_hex(const struct extent_state *, state, state) | |
2c054599 | 2447 | ctf_integer_hex(unsigned long, ip, IP) |
1f1ec4ed MJ |
2448 | ) |
2449 | ) | |
5f4c791e | 2450 | #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) |
3bc29f0a | 2451 | LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state, |
9cf29d3e MD |
2452 | |
2453 | btrfs_alloc_extent_state, | |
b87700e3 AG |
2454 | |
2455 | TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP), | |
2456 | ||
2457 | TP_ARGS(state, mask, IP), | |
2458 | ||
f127e61e | 2459 | TP_FIELDS( |
fa91fcac | 2460 | ctf_integer_hex(struct extent_state *, state, state) |
f127e61e | 2461 | ctf_integer(gfp_t, mask, mask) |
2c054599 | 2462 | ctf_integer_hex(unsigned long, ip, IP) |
f127e61e | 2463 | ) |
b87700e3 AG |
2464 | ) |
2465 | ||
3bc29f0a | 2466 | LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state, |
9cf29d3e MD |
2467 | |
2468 | btrfs_free_extent_state, | |
b87700e3 AG |
2469 | |
2470 | TP_PROTO(struct extent_state *state, unsigned long IP), | |
2471 | ||
2472 | TP_ARGS(state, IP), | |
2473 | ||
f127e61e | 2474 | TP_FIELDS( |
fa91fcac | 2475 | ctf_integer_hex(struct extent_state *, state, state) |
2c054599 | 2476 | ctf_integer_hex(unsigned long, ip, IP) |
f127e61e | 2477 | ) |
b87700e3 AG |
2478 | ) |
2479 | #endif | |
2480 | ||
3bc29f0a | 2481 | #endif /* LTTNG_TRACE_BTRFS_H */ |
b87700e3 AG |
2482 | |
2483 | /* This part must be outside protection */ | |
3b4aafcb | 2484 | #include <lttng/define_trace.h> |