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