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