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