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