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