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