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