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