Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2009, Christoph Hellwig |
| 3 | * All Rights Reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it would be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write the Free Software Foundation, |
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 | #undef TRACE_SYSTEM |
| 19 | #define TRACE_SYSTEM xfs |
| 20 | |
| 21 | #if !defined(_TRACE_XFS_H) || defined(TRACE_HEADER_MULTI_READ) |
| 22 | #define _TRACE_XFS_H |
| 23 | |
| 24 | #include <linux/tracepoint.h> |
| 25 | |
| 26 | struct xfs_agf; |
| 27 | struct xfs_alloc_arg; |
| 28 | struct xfs_attr_list_context; |
| 29 | struct xfs_buf_log_item; |
| 30 | struct xfs_da_args; |
| 31 | struct xfs_da_node_entry; |
| 32 | struct xfs_dquot; |
| 33 | struct xlog_ticket; |
| 34 | struct log; |
| 35 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 36 | DECLARE_EVENT_CLASS(xfs_attr_list_class, |
| 37 | TP_PROTO(struct xfs_attr_list_context *ctx), |
| 38 | TP_ARGS(ctx), |
| 39 | TP_STRUCT__entry( |
| 40 | __field(dev_t, dev) |
| 41 | __field(xfs_ino_t, ino) |
| 42 | __field(u32, hashval) |
| 43 | __field(u32, blkno) |
| 44 | __field(u32, offset) |
| 45 | __field(void *, alist) |
| 46 | __field(int, bufsize) |
| 47 | __field(int, count) |
| 48 | __field(int, firstu) |
| 49 | __field(int, dupcnt) |
| 50 | __field(int, flags) |
| 51 | ), |
| 52 | TP_fast_assign( |
| 53 | __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev; |
| 54 | __entry->ino = ctx->dp->i_ino; |
| 55 | __entry->hashval = ctx->cursor->hashval; |
| 56 | __entry->blkno = ctx->cursor->blkno; |
| 57 | __entry->offset = ctx->cursor->offset; |
| 58 | __entry->alist = ctx->alist; |
| 59 | __entry->bufsize = ctx->bufsize; |
| 60 | __entry->count = ctx->count; |
| 61 | __entry->firstu = ctx->firstu; |
| 62 | __entry->flags = ctx->flags; |
| 63 | ), |
| 64 | TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u " |
| 65 | "alist 0x%p size %u count %u firstu %u flags %d %s", |
| 66 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 67 | __entry->ino, |
| 68 | __entry->hashval, |
| 69 | __entry->blkno, |
| 70 | __entry->offset, |
| 71 | __entry->dupcnt, |
| 72 | __entry->alist, |
| 73 | __entry->bufsize, |
| 74 | __entry->count, |
| 75 | __entry->firstu, |
| 76 | __entry->flags, |
| 77 | __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS) |
| 78 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 79 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 80 | |
Dave Chinner | 0fa800f | 2010-01-11 11:47:46 +0000 | [diff] [blame] | 81 | #define DEFINE_PERAG_REF_EVENT(name) \ |
| 82 | TRACE_EVENT(name, \ |
| 83 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ |
| 84 | unsigned long caller_ip), \ |
| 85 | TP_ARGS(mp, agno, refcount, caller_ip), \ |
| 86 | TP_STRUCT__entry( \ |
| 87 | __field(dev_t, dev) \ |
| 88 | __field(xfs_agnumber_t, agno) \ |
| 89 | __field(int, refcount) \ |
| 90 | __field(unsigned long, caller_ip) \ |
| 91 | ), \ |
| 92 | TP_fast_assign( \ |
| 93 | __entry->dev = mp->m_super->s_dev; \ |
| 94 | __entry->agno = agno; \ |
| 95 | __entry->refcount = refcount; \ |
| 96 | __entry->caller_ip = caller_ip; \ |
| 97 | ), \ |
| 98 | TP_printk("dev %d:%d agno %u refcount %d caller %pf", \ |
| 99 | MAJOR(__entry->dev), MINOR(__entry->dev), \ |
| 100 | __entry->agno, \ |
| 101 | __entry->refcount, \ |
| 102 | (char *)__entry->caller_ip) \ |
| 103 | ); |
| 104 | |
| 105 | DEFINE_PERAG_REF_EVENT(xfs_perag_get) |
| 106 | DEFINE_PERAG_REF_EVENT(xfs_perag_put) |
| 107 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 108 | #define DEFINE_ATTR_LIST_EVENT(name) \ |
| 109 | DEFINE_EVENT(xfs_attr_list_class, name, \ |
| 110 | TP_PROTO(struct xfs_attr_list_context *ctx), \ |
| 111 | TP_ARGS(ctx)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 112 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf); |
| 113 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all); |
| 114 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf); |
| 115 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end); |
| 116 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full); |
| 117 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add); |
| 118 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); |
| 119 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); |
| 120 | |
| 121 | TRACE_EVENT(xfs_attr_list_node_descend, |
| 122 | TP_PROTO(struct xfs_attr_list_context *ctx, |
| 123 | struct xfs_da_node_entry *btree), |
| 124 | TP_ARGS(ctx, btree), |
| 125 | TP_STRUCT__entry( |
| 126 | __field(dev_t, dev) |
| 127 | __field(xfs_ino_t, ino) |
| 128 | __field(u32, hashval) |
| 129 | __field(u32, blkno) |
| 130 | __field(u32, offset) |
| 131 | __field(void *, alist) |
| 132 | __field(int, bufsize) |
| 133 | __field(int, count) |
| 134 | __field(int, firstu) |
| 135 | __field(int, dupcnt) |
| 136 | __field(int, flags) |
| 137 | __field(u32, bt_hashval) |
| 138 | __field(u32, bt_before) |
| 139 | ), |
| 140 | TP_fast_assign( |
| 141 | __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev; |
| 142 | __entry->ino = ctx->dp->i_ino; |
| 143 | __entry->hashval = ctx->cursor->hashval; |
| 144 | __entry->blkno = ctx->cursor->blkno; |
| 145 | __entry->offset = ctx->cursor->offset; |
| 146 | __entry->alist = ctx->alist; |
| 147 | __entry->bufsize = ctx->bufsize; |
| 148 | __entry->count = ctx->count; |
| 149 | __entry->firstu = ctx->firstu; |
| 150 | __entry->flags = ctx->flags; |
| 151 | __entry->bt_hashval = be32_to_cpu(btree->hashval); |
| 152 | __entry->bt_before = be32_to_cpu(btree->before); |
| 153 | ), |
| 154 | TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u " |
| 155 | "alist 0x%p size %u count %u firstu %u flags %d %s " |
| 156 | "node hashval %u, node before %u", |
| 157 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 158 | __entry->ino, |
| 159 | __entry->hashval, |
| 160 | __entry->blkno, |
| 161 | __entry->offset, |
| 162 | __entry->dupcnt, |
| 163 | __entry->alist, |
| 164 | __entry->bufsize, |
| 165 | __entry->count, |
| 166 | __entry->firstu, |
| 167 | __entry->flags, |
| 168 | __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS), |
| 169 | __entry->bt_hashval, |
| 170 | __entry->bt_before) |
| 171 | ); |
| 172 | |
| 173 | TRACE_EVENT(xfs_iext_insert, |
| 174 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, |
| 175 | struct xfs_bmbt_irec *r, int state, unsigned long caller_ip), |
| 176 | TP_ARGS(ip, idx, r, state, caller_ip), |
| 177 | TP_STRUCT__entry( |
| 178 | __field(dev_t, dev) |
| 179 | __field(xfs_ino_t, ino) |
| 180 | __field(xfs_extnum_t, idx) |
| 181 | __field(xfs_fileoff_t, startoff) |
| 182 | __field(xfs_fsblock_t, startblock) |
| 183 | __field(xfs_filblks_t, blockcount) |
| 184 | __field(xfs_exntst_t, state) |
| 185 | __field(int, bmap_state) |
| 186 | __field(unsigned long, caller_ip) |
| 187 | ), |
| 188 | TP_fast_assign( |
| 189 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 190 | __entry->ino = ip->i_ino; |
| 191 | __entry->idx = idx; |
| 192 | __entry->startoff = r->br_startoff; |
| 193 | __entry->startblock = r->br_startblock; |
| 194 | __entry->blockcount = r->br_blockcount; |
| 195 | __entry->state = r->br_state; |
| 196 | __entry->bmap_state = state; |
| 197 | __entry->caller_ip = caller_ip; |
| 198 | ), |
| 199 | TP_printk("dev %d:%d ino 0x%llx state %s idx %ld " |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 200 | "offset %lld block %lld count %lld flag %d caller %pf", |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 201 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 202 | __entry->ino, |
| 203 | __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS), |
| 204 | (long)__entry->idx, |
| 205 | __entry->startoff, |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 206 | (__int64_t)__entry->startblock, |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 207 | __entry->blockcount, |
| 208 | __entry->state, |
| 209 | (char *)__entry->caller_ip) |
| 210 | ); |
| 211 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 212 | DECLARE_EVENT_CLASS(xfs_bmap_class, |
| 213 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, |
| 214 | unsigned long caller_ip), |
| 215 | TP_ARGS(ip, idx, state, caller_ip), |
| 216 | TP_STRUCT__entry( |
| 217 | __field(dev_t, dev) |
| 218 | __field(xfs_ino_t, ino) |
| 219 | __field(xfs_extnum_t, idx) |
| 220 | __field(xfs_fileoff_t, startoff) |
| 221 | __field(xfs_fsblock_t, startblock) |
| 222 | __field(xfs_filblks_t, blockcount) |
| 223 | __field(xfs_exntst_t, state) |
| 224 | __field(int, bmap_state) |
| 225 | __field(unsigned long, caller_ip) |
| 226 | ), |
| 227 | TP_fast_assign( |
| 228 | struct xfs_ifork *ifp = (state & BMAP_ATTRFORK) ? |
| 229 | ip->i_afp : &ip->i_df; |
| 230 | struct xfs_bmbt_irec r; |
| 231 | |
| 232 | xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &r); |
| 233 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 234 | __entry->ino = ip->i_ino; |
| 235 | __entry->idx = idx; |
| 236 | __entry->startoff = r.br_startoff; |
| 237 | __entry->startblock = r.br_startblock; |
| 238 | __entry->blockcount = r.br_blockcount; |
| 239 | __entry->state = r.br_state; |
| 240 | __entry->bmap_state = state; |
| 241 | __entry->caller_ip = caller_ip; |
| 242 | ), |
| 243 | TP_printk("dev %d:%d ino 0x%llx state %s idx %ld " |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 244 | "offset %lld block %lld count %lld flag %d caller %pf", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 245 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 246 | __entry->ino, |
| 247 | __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS), |
| 248 | (long)__entry->idx, |
| 249 | __entry->startoff, |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 250 | (__int64_t)__entry->startblock, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 251 | __entry->blockcount, |
| 252 | __entry->state, |
| 253 | (char *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 254 | ) |
| 255 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 256 | #define DEFINE_BMAP_EVENT(name) \ |
| 257 | DEFINE_EVENT(xfs_bmap_class, name, \ |
| 258 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, \ |
| 259 | unsigned long caller_ip), \ |
| 260 | TP_ARGS(ip, idx, state, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 261 | DEFINE_BMAP_EVENT(xfs_iext_remove); |
| 262 | DEFINE_BMAP_EVENT(xfs_bmap_pre_update); |
| 263 | DEFINE_BMAP_EVENT(xfs_bmap_post_update); |
| 264 | DEFINE_BMAP_EVENT(xfs_extlist); |
| 265 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 266 | DECLARE_EVENT_CLASS(xfs_buf_class, |
| 267 | TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), |
| 268 | TP_ARGS(bp, caller_ip), |
| 269 | TP_STRUCT__entry( |
| 270 | __field(dev_t, dev) |
| 271 | __field(xfs_daddr_t, bno) |
| 272 | __field(size_t, buffer_length) |
| 273 | __field(int, hold) |
| 274 | __field(int, pincount) |
| 275 | __field(unsigned, lockval) |
| 276 | __field(unsigned, flags) |
| 277 | __field(unsigned long, caller_ip) |
| 278 | ), |
| 279 | TP_fast_assign( |
| 280 | __entry->dev = bp->b_target->bt_dev; |
| 281 | __entry->bno = bp->b_bn; |
| 282 | __entry->buffer_length = bp->b_buffer_length; |
| 283 | __entry->hold = atomic_read(&bp->b_hold); |
| 284 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 285 | __entry->lockval = xfs_buf_lock_value(bp); |
| 286 | __entry->flags = bp->b_flags; |
| 287 | __entry->caller_ip = caller_ip; |
| 288 | ), |
| 289 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 290 | "lock %d flags %s caller %pf", |
| 291 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 292 | (unsigned long long)__entry->bno, |
| 293 | __entry->buffer_length, |
| 294 | __entry->hold, |
| 295 | __entry->pincount, |
| 296 | __entry->lockval, |
| 297 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 298 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 299 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 300 | |
| 301 | #define DEFINE_BUF_EVENT(name) \ |
| 302 | DEFINE_EVENT(xfs_buf_class, name, \ |
| 303 | TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \ |
| 304 | TP_ARGS(bp, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 305 | DEFINE_BUF_EVENT(xfs_buf_init); |
| 306 | DEFINE_BUF_EVENT(xfs_buf_free); |
| 307 | DEFINE_BUF_EVENT(xfs_buf_hold); |
| 308 | DEFINE_BUF_EVENT(xfs_buf_rele); |
| 309 | DEFINE_BUF_EVENT(xfs_buf_pin); |
| 310 | DEFINE_BUF_EVENT(xfs_buf_unpin); |
| 311 | DEFINE_BUF_EVENT(xfs_buf_iodone); |
| 312 | DEFINE_BUF_EVENT(xfs_buf_iorequest); |
| 313 | DEFINE_BUF_EVENT(xfs_buf_bawrite); |
| 314 | DEFINE_BUF_EVENT(xfs_buf_bdwrite); |
| 315 | DEFINE_BUF_EVENT(xfs_buf_lock); |
| 316 | DEFINE_BUF_EVENT(xfs_buf_lock_done); |
| 317 | DEFINE_BUF_EVENT(xfs_buf_cond_lock); |
| 318 | DEFINE_BUF_EVENT(xfs_buf_unlock); |
| 319 | DEFINE_BUF_EVENT(xfs_buf_ordered_retry); |
| 320 | DEFINE_BUF_EVENT(xfs_buf_iowait); |
| 321 | DEFINE_BUF_EVENT(xfs_buf_iowait_done); |
| 322 | DEFINE_BUF_EVENT(xfs_buf_delwri_queue); |
| 323 | DEFINE_BUF_EVENT(xfs_buf_delwri_dequeue); |
| 324 | DEFINE_BUF_EVENT(xfs_buf_delwri_split); |
| 325 | DEFINE_BUF_EVENT(xfs_buf_get_noaddr); |
| 326 | DEFINE_BUF_EVENT(xfs_bdstrat_shut); |
| 327 | DEFINE_BUF_EVENT(xfs_buf_item_relse); |
| 328 | DEFINE_BUF_EVENT(xfs_buf_item_iodone); |
| 329 | DEFINE_BUF_EVENT(xfs_buf_item_iodone_async); |
| 330 | DEFINE_BUF_EVENT(xfs_buf_error_relse); |
| 331 | DEFINE_BUF_EVENT(xfs_trans_read_buf_io); |
| 332 | DEFINE_BUF_EVENT(xfs_trans_read_buf_shut); |
| 333 | |
| 334 | /* not really buffer traces, but the buf provides useful information */ |
| 335 | DEFINE_BUF_EVENT(xfs_btree_corrupt); |
| 336 | DEFINE_BUF_EVENT(xfs_da_btree_corrupt); |
| 337 | DEFINE_BUF_EVENT(xfs_reset_dqcounts); |
| 338 | DEFINE_BUF_EVENT(xfs_inode_item_push); |
| 339 | |
| 340 | /* pass flags explicitly */ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 341 | DECLARE_EVENT_CLASS(xfs_buf_flags_class, |
| 342 | TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), |
| 343 | TP_ARGS(bp, flags, caller_ip), |
| 344 | TP_STRUCT__entry( |
| 345 | __field(dev_t, dev) |
| 346 | __field(xfs_daddr_t, bno) |
| 347 | __field(size_t, buffer_length) |
| 348 | __field(int, hold) |
| 349 | __field(int, pincount) |
| 350 | __field(unsigned, lockval) |
| 351 | __field(unsigned, flags) |
| 352 | __field(unsigned long, caller_ip) |
| 353 | ), |
| 354 | TP_fast_assign( |
| 355 | __entry->dev = bp->b_target->bt_dev; |
| 356 | __entry->bno = bp->b_bn; |
| 357 | __entry->buffer_length = bp->b_buffer_length; |
| 358 | __entry->flags = flags; |
| 359 | __entry->hold = atomic_read(&bp->b_hold); |
| 360 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 361 | __entry->lockval = xfs_buf_lock_value(bp); |
| 362 | __entry->caller_ip = caller_ip; |
| 363 | ), |
| 364 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 365 | "lock %d flags %s caller %pf", |
| 366 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 367 | (unsigned long long)__entry->bno, |
| 368 | __entry->buffer_length, |
| 369 | __entry->hold, |
| 370 | __entry->pincount, |
| 371 | __entry->lockval, |
| 372 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 373 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 374 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 375 | |
| 376 | #define DEFINE_BUF_FLAGS_EVENT(name) \ |
| 377 | DEFINE_EVENT(xfs_buf_flags_class, name, \ |
| 378 | TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \ |
| 379 | TP_ARGS(bp, flags, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 380 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_find); |
| 381 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_get); |
| 382 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_read); |
| 383 | |
| 384 | TRACE_EVENT(xfs_buf_ioerror, |
| 385 | TP_PROTO(struct xfs_buf *bp, int error, unsigned long caller_ip), |
| 386 | TP_ARGS(bp, error, caller_ip), |
| 387 | TP_STRUCT__entry( |
| 388 | __field(dev_t, dev) |
| 389 | __field(xfs_daddr_t, bno) |
| 390 | __field(size_t, buffer_length) |
| 391 | __field(unsigned, flags) |
| 392 | __field(int, hold) |
| 393 | __field(int, pincount) |
| 394 | __field(unsigned, lockval) |
| 395 | __field(int, error) |
| 396 | __field(unsigned long, caller_ip) |
| 397 | ), |
| 398 | TP_fast_assign( |
| 399 | __entry->dev = bp->b_target->bt_dev; |
| 400 | __entry->bno = bp->b_bn; |
| 401 | __entry->buffer_length = bp->b_buffer_length; |
| 402 | __entry->hold = atomic_read(&bp->b_hold); |
| 403 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 404 | __entry->lockval = xfs_buf_lock_value(bp); |
| 405 | __entry->error = error; |
| 406 | __entry->flags = bp->b_flags; |
| 407 | __entry->caller_ip = caller_ip; |
| 408 | ), |
| 409 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 410 | "lock %d error %d flags %s caller %pf", |
| 411 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 412 | (unsigned long long)__entry->bno, |
| 413 | __entry->buffer_length, |
| 414 | __entry->hold, |
| 415 | __entry->pincount, |
| 416 | __entry->lockval, |
| 417 | __entry->error, |
| 418 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 419 | (void *)__entry->caller_ip) |
| 420 | ); |
| 421 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 422 | DECLARE_EVENT_CLASS(xfs_buf_item_class, |
| 423 | TP_PROTO(struct xfs_buf_log_item *bip), |
| 424 | TP_ARGS(bip), |
| 425 | TP_STRUCT__entry( |
| 426 | __field(dev_t, dev) |
| 427 | __field(xfs_daddr_t, buf_bno) |
| 428 | __field(size_t, buf_len) |
| 429 | __field(int, buf_hold) |
| 430 | __field(int, buf_pincount) |
| 431 | __field(int, buf_lockval) |
| 432 | __field(unsigned, buf_flags) |
| 433 | __field(unsigned, bli_recur) |
| 434 | __field(int, bli_refcount) |
| 435 | __field(unsigned, bli_flags) |
| 436 | __field(void *, li_desc) |
| 437 | __field(unsigned, li_flags) |
| 438 | ), |
| 439 | TP_fast_assign( |
| 440 | __entry->dev = bip->bli_buf->b_target->bt_dev; |
| 441 | __entry->bli_flags = bip->bli_flags; |
| 442 | __entry->bli_recur = bip->bli_recur; |
| 443 | __entry->bli_refcount = atomic_read(&bip->bli_refcount); |
| 444 | __entry->buf_bno = bip->bli_buf->b_bn; |
| 445 | __entry->buf_len = bip->bli_buf->b_buffer_length; |
| 446 | __entry->buf_flags = bip->bli_buf->b_flags; |
| 447 | __entry->buf_hold = atomic_read(&bip->bli_buf->b_hold); |
| 448 | __entry->buf_pincount = atomic_read(&bip->bli_buf->b_pin_count); |
| 449 | __entry->buf_lockval = xfs_buf_lock_value(bip->bli_buf); |
| 450 | __entry->li_desc = bip->bli_item.li_desc; |
| 451 | __entry->li_flags = bip->bli_item.li_flags; |
| 452 | ), |
| 453 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 454 | "lock %d flags %s recur %d refcount %d bliflags %s " |
| 455 | "lidesc 0x%p liflags %s", |
| 456 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 457 | (unsigned long long)__entry->buf_bno, |
| 458 | __entry->buf_len, |
| 459 | __entry->buf_hold, |
| 460 | __entry->buf_pincount, |
| 461 | __entry->buf_lockval, |
| 462 | __print_flags(__entry->buf_flags, "|", XFS_BUF_FLAGS), |
| 463 | __entry->bli_recur, |
| 464 | __entry->bli_refcount, |
| 465 | __print_flags(__entry->bli_flags, "|", XFS_BLI_FLAGS), |
| 466 | __entry->li_desc, |
| 467 | __print_flags(__entry->li_flags, "|", XFS_LI_FLAGS)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 468 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 469 | |
| 470 | #define DEFINE_BUF_ITEM_EVENT(name) \ |
| 471 | DEFINE_EVENT(xfs_buf_item_class, name, \ |
| 472 | TP_PROTO(struct xfs_buf_log_item *bip), \ |
| 473 | TP_ARGS(bip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 474 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size); |
| 475 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale); |
| 476 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format); |
| 477 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale); |
| 478 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin); |
| 479 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin); |
| 480 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale); |
| 481 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_trylock); |
| 482 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock); |
| 483 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale); |
| 484 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed); |
| 485 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push); |
Dave Chinner | d808f61 | 2010-02-02 10:13:42 +1100 | [diff] [blame] | 486 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 487 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf); |
| 488 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur); |
| 489 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb); |
| 490 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur); |
| 491 | DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf); |
| 492 | DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur); |
| 493 | DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf); |
| 494 | DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse); |
| 495 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin); |
| 496 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold); |
| 497 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release); |
| 498 | DEFINE_BUF_ITEM_EVENT(xfs_trans_binval); |
| 499 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 500 | DECLARE_EVENT_CLASS(xfs_lock_class, |
| 501 | TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, |
| 502 | unsigned long caller_ip), |
| 503 | TP_ARGS(ip, lock_flags, caller_ip), |
| 504 | TP_STRUCT__entry( |
| 505 | __field(dev_t, dev) |
| 506 | __field(xfs_ino_t, ino) |
| 507 | __field(int, lock_flags) |
| 508 | __field(unsigned long, caller_ip) |
| 509 | ), |
| 510 | TP_fast_assign( |
| 511 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 512 | __entry->ino = ip->i_ino; |
| 513 | __entry->lock_flags = lock_flags; |
| 514 | __entry->caller_ip = caller_ip; |
| 515 | ), |
| 516 | TP_printk("dev %d:%d ino 0x%llx flags %s caller %pf", |
| 517 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 518 | __entry->ino, |
| 519 | __print_flags(__entry->lock_flags, "|", XFS_LOCK_FLAGS), |
| 520 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 521 | ) |
| 522 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 523 | #define DEFINE_LOCK_EVENT(name) \ |
| 524 | DEFINE_EVENT(xfs_lock_class, name, \ |
| 525 | TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \ |
| 526 | unsigned long caller_ip), \ |
| 527 | TP_ARGS(ip, lock_flags, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 528 | DEFINE_LOCK_EVENT(xfs_ilock); |
| 529 | DEFINE_LOCK_EVENT(xfs_ilock_nowait); |
| 530 | DEFINE_LOCK_EVENT(xfs_ilock_demote); |
| 531 | DEFINE_LOCK_EVENT(xfs_iunlock); |
| 532 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 533 | DECLARE_EVENT_CLASS(xfs_iget_class, |
| 534 | TP_PROTO(struct xfs_inode *ip), |
| 535 | TP_ARGS(ip), |
| 536 | TP_STRUCT__entry( |
| 537 | __field(dev_t, dev) |
| 538 | __field(xfs_ino_t, ino) |
| 539 | ), |
| 540 | TP_fast_assign( |
| 541 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 542 | __entry->ino = ip->i_ino; |
| 543 | ), |
| 544 | TP_printk("dev %d:%d ino 0x%llx", |
| 545 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 546 | __entry->ino) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 547 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 548 | |
| 549 | #define DEFINE_IGET_EVENT(name) \ |
| 550 | DEFINE_EVENT(xfs_iget_class, name, \ |
| 551 | TP_PROTO(struct xfs_inode *ip), \ |
| 552 | TP_ARGS(ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 553 | DEFINE_IGET_EVENT(xfs_iget_skip); |
| 554 | DEFINE_IGET_EVENT(xfs_iget_reclaim); |
| 555 | DEFINE_IGET_EVENT(xfs_iget_found); |
| 556 | DEFINE_IGET_EVENT(xfs_iget_alloc); |
| 557 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 558 | DECLARE_EVENT_CLASS(xfs_inode_class, |
| 559 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), |
| 560 | TP_ARGS(ip, caller_ip), |
| 561 | TP_STRUCT__entry( |
| 562 | __field(dev_t, dev) |
| 563 | __field(xfs_ino_t, ino) |
| 564 | __field(int, count) |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame^] | 565 | __field(int, pincount) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 566 | __field(unsigned long, caller_ip) |
| 567 | ), |
| 568 | TP_fast_assign( |
| 569 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 570 | __entry->ino = ip->i_ino; |
| 571 | __entry->count = atomic_read(&VFS_I(ip)->i_count); |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame^] | 572 | __entry->pincount = atomic_read(&ip->i_pincount); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 573 | __entry->caller_ip = caller_ip; |
| 574 | ), |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame^] | 575 | TP_printk("dev %d:%d ino 0x%llx count %d pincount %d caller %pf", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 576 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 577 | __entry->ino, |
| 578 | __entry->count, |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame^] | 579 | __entry->pincount, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 580 | (char *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 581 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 582 | |
| 583 | #define DEFINE_INODE_EVENT(name) \ |
| 584 | DEFINE_EVENT(xfs_inode_class, name, \ |
| 585 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ |
| 586 | TP_ARGS(ip, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 587 | DEFINE_INODE_EVENT(xfs_ihold); |
| 588 | DEFINE_INODE_EVENT(xfs_irele); |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame^] | 589 | DEFINE_INODE_EVENT(xfs_inode_pin); |
| 590 | DEFINE_INODE_EVENT(xfs_inode_unpin); |
| 591 | DEFINE_INODE_EVENT(xfs_inode_unpin_nowait); |
| 592 | |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 593 | /* the old xfs_itrace_entry tracer - to be replaced by s.th. in the VFS */ |
| 594 | DEFINE_INODE_EVENT(xfs_inode); |
| 595 | #define xfs_itrace_entry(ip) \ |
| 596 | trace_xfs_inode(ip, _THIS_IP_) |
| 597 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 598 | DECLARE_EVENT_CLASS(xfs_dquot_class, |
| 599 | TP_PROTO(struct xfs_dquot *dqp), |
| 600 | TP_ARGS(dqp), |
| 601 | TP_STRUCT__entry( |
| 602 | __field(dev_t, dev) |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 603 | __field(u32, id) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 604 | __field(unsigned, flags) |
| 605 | __field(unsigned, nrefs) |
| 606 | __field(unsigned long long, res_bcount) |
| 607 | __field(unsigned long long, bcount) |
| 608 | __field(unsigned long long, icount) |
| 609 | __field(unsigned long long, blk_hardlimit) |
| 610 | __field(unsigned long long, blk_softlimit) |
| 611 | __field(unsigned long long, ino_hardlimit) |
| 612 | __field(unsigned long long, ino_softlimit) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 613 | ), \ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 614 | TP_fast_assign( |
| 615 | __entry->dev = dqp->q_mount->m_super->s_dev; |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 616 | __entry->id = be32_to_cpu(dqp->q_core.d_id); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 617 | __entry->flags = dqp->dq_flags; |
| 618 | __entry->nrefs = dqp->q_nrefs; |
| 619 | __entry->res_bcount = dqp->q_res_bcount; |
| 620 | __entry->bcount = be64_to_cpu(dqp->q_core.d_bcount); |
| 621 | __entry->icount = be64_to_cpu(dqp->q_core.d_icount); |
| 622 | __entry->blk_hardlimit = |
| 623 | be64_to_cpu(dqp->q_core.d_blk_hardlimit); |
| 624 | __entry->blk_softlimit = |
| 625 | be64_to_cpu(dqp->q_core.d_blk_softlimit); |
| 626 | __entry->ino_hardlimit = |
| 627 | be64_to_cpu(dqp->q_core.d_ino_hardlimit); |
| 628 | __entry->ino_softlimit = |
| 629 | be64_to_cpu(dqp->q_core.d_ino_softlimit); |
| 630 | ), |
| 631 | TP_printk("dev %d:%d id 0x%x flags %s nrefs %u res_bc 0x%llx " |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 632 | "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx " |
| 633 | "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 634 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 635 | __entry->id, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 636 | __print_flags(__entry->flags, "|", XFS_DQ_FLAGS), |
| 637 | __entry->nrefs, |
| 638 | __entry->res_bcount, |
| 639 | __entry->bcount, |
| 640 | __entry->blk_hardlimit, |
| 641 | __entry->blk_softlimit, |
| 642 | __entry->icount, |
| 643 | __entry->ino_hardlimit, |
| 644 | __entry->ino_softlimit) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 645 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 646 | |
| 647 | #define DEFINE_DQUOT_EVENT(name) \ |
| 648 | DEFINE_EVENT(xfs_dquot_class, name, \ |
| 649 | TP_PROTO(struct xfs_dquot *dqp), \ |
| 650 | TP_ARGS(dqp)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 651 | DEFINE_DQUOT_EVENT(xfs_dqadjust); |
| 652 | DEFINE_DQUOT_EVENT(xfs_dqshake_dirty); |
| 653 | DEFINE_DQUOT_EVENT(xfs_dqshake_unlink); |
| 654 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_want); |
| 655 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty); |
| 656 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink); |
| 657 | DEFINE_DQUOT_EVENT(xfs_dqattach_found); |
| 658 | DEFINE_DQUOT_EVENT(xfs_dqattach_get); |
| 659 | DEFINE_DQUOT_EVENT(xfs_dqinit); |
| 660 | DEFINE_DQUOT_EVENT(xfs_dqreuse); |
| 661 | DEFINE_DQUOT_EVENT(xfs_dqalloc); |
| 662 | DEFINE_DQUOT_EVENT(xfs_dqtobp_read); |
| 663 | DEFINE_DQUOT_EVENT(xfs_dqread); |
| 664 | DEFINE_DQUOT_EVENT(xfs_dqread_fail); |
| 665 | DEFINE_DQUOT_EVENT(xfs_dqlookup_found); |
| 666 | DEFINE_DQUOT_EVENT(xfs_dqlookup_want); |
| 667 | DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist); |
| 668 | DEFINE_DQUOT_EVENT(xfs_dqlookup_move); |
| 669 | DEFINE_DQUOT_EVENT(xfs_dqlookup_done); |
| 670 | DEFINE_DQUOT_EVENT(xfs_dqget_hit); |
| 671 | DEFINE_DQUOT_EVENT(xfs_dqget_miss); |
| 672 | DEFINE_DQUOT_EVENT(xfs_dqput); |
| 673 | DEFINE_DQUOT_EVENT(xfs_dqput_wait); |
| 674 | DEFINE_DQUOT_EVENT(xfs_dqput_free); |
| 675 | DEFINE_DQUOT_EVENT(xfs_dqrele); |
| 676 | DEFINE_DQUOT_EVENT(xfs_dqflush); |
| 677 | DEFINE_DQUOT_EVENT(xfs_dqflush_force); |
| 678 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); |
| 679 | /* not really iget events, but we re-use the format */ |
| 680 | DEFINE_IGET_EVENT(xfs_dquot_dqalloc); |
| 681 | DEFINE_IGET_EVENT(xfs_dquot_dqdetach); |
| 682 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 683 | DECLARE_EVENT_CLASS(xfs_loggrant_class, |
| 684 | TP_PROTO(struct log *log, struct xlog_ticket *tic), |
| 685 | TP_ARGS(log, tic), |
| 686 | TP_STRUCT__entry( |
| 687 | __field(dev_t, dev) |
| 688 | __field(unsigned, trans_type) |
| 689 | __field(char, ocnt) |
| 690 | __field(char, cnt) |
| 691 | __field(int, curr_res) |
| 692 | __field(int, unit_res) |
| 693 | __field(unsigned int, flags) |
| 694 | __field(void *, reserve_headq) |
| 695 | __field(void *, write_headq) |
| 696 | __field(int, grant_reserve_cycle) |
| 697 | __field(int, grant_reserve_bytes) |
| 698 | __field(int, grant_write_cycle) |
| 699 | __field(int, grant_write_bytes) |
| 700 | __field(int, curr_cycle) |
| 701 | __field(int, curr_block) |
| 702 | __field(xfs_lsn_t, tail_lsn) |
| 703 | ), |
| 704 | TP_fast_assign( |
| 705 | __entry->dev = log->l_mp->m_super->s_dev; |
| 706 | __entry->trans_type = tic->t_trans_type; |
| 707 | __entry->ocnt = tic->t_ocnt; |
| 708 | __entry->cnt = tic->t_cnt; |
| 709 | __entry->curr_res = tic->t_curr_res; |
| 710 | __entry->unit_res = tic->t_unit_res; |
| 711 | __entry->flags = tic->t_flags; |
| 712 | __entry->reserve_headq = log->l_reserve_headq; |
| 713 | __entry->write_headq = log->l_write_headq; |
| 714 | __entry->grant_reserve_cycle = log->l_grant_reserve_cycle; |
| 715 | __entry->grant_reserve_bytes = log->l_grant_reserve_bytes; |
| 716 | __entry->grant_write_cycle = log->l_grant_write_cycle; |
| 717 | __entry->grant_write_bytes = log->l_grant_write_bytes; |
| 718 | __entry->curr_cycle = log->l_curr_cycle; |
| 719 | __entry->curr_block = log->l_curr_block; |
| 720 | __entry->tail_lsn = log->l_tail_lsn; |
| 721 | ), |
| 722 | TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u " |
| 723 | "t_unit_res %u t_flags %s reserve_headq 0x%p " |
| 724 | "write_headq 0x%p grant_reserve_cycle %d " |
| 725 | "grant_reserve_bytes %d grant_write_cycle %d " |
| 726 | "grant_write_bytes %d curr_cycle %d curr_block %d " |
| 727 | "tail_cycle %d tail_block %d", |
| 728 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 729 | __print_symbolic(__entry->trans_type, XFS_TRANS_TYPES), |
| 730 | __entry->ocnt, |
| 731 | __entry->cnt, |
| 732 | __entry->curr_res, |
| 733 | __entry->unit_res, |
| 734 | __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS), |
| 735 | __entry->reserve_headq, |
| 736 | __entry->write_headq, |
| 737 | __entry->grant_reserve_cycle, |
| 738 | __entry->grant_reserve_bytes, |
| 739 | __entry->grant_write_cycle, |
| 740 | __entry->grant_write_bytes, |
| 741 | __entry->curr_cycle, |
| 742 | __entry->curr_block, |
| 743 | CYCLE_LSN(__entry->tail_lsn), |
| 744 | BLOCK_LSN(__entry->tail_lsn) |
| 745 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 746 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 747 | |
| 748 | #define DEFINE_LOGGRANT_EVENT(name) \ |
| 749 | DEFINE_EVENT(xfs_loggrant_class, name, \ |
| 750 | TP_PROTO(struct log *log, struct xlog_ticket *tic), \ |
| 751 | TP_ARGS(log, tic)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 752 | DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm); |
| 753 | DEFINE_LOGGRANT_EVENT(xfs_log_done_perm); |
| 754 | DEFINE_LOGGRANT_EVENT(xfs_log_reserve); |
| 755 | DEFINE_LOGGRANT_EVENT(xfs_log_umount_write); |
| 756 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_enter); |
| 757 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_exit); |
| 758 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_error); |
| 759 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep1); |
| 760 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake1); |
| 761 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep2); |
| 762 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake2); |
| 763 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_enter); |
| 764 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_exit); |
| 765 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_error); |
| 766 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep1); |
| 767 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake1); |
| 768 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep2); |
| 769 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake2); |
| 770 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter); |
| 771 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit); |
| 772 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub); |
| 773 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter); |
| 774 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); |
| 775 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); |
| 776 | |
| 777 | #define DEFINE_RW_EVENT(name) \ |
| 778 | TRACE_EVENT(name, \ |
| 779 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \ |
| 780 | TP_ARGS(ip, count, offset, flags), \ |
| 781 | TP_STRUCT__entry( \ |
| 782 | __field(dev_t, dev) \ |
| 783 | __field(xfs_ino_t, ino) \ |
| 784 | __field(xfs_fsize_t, size) \ |
| 785 | __field(xfs_fsize_t, new_size) \ |
| 786 | __field(loff_t, offset) \ |
| 787 | __field(size_t, count) \ |
| 788 | __field(int, flags) \ |
| 789 | ), \ |
| 790 | TP_fast_assign( \ |
| 791 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ |
| 792 | __entry->ino = ip->i_ino; \ |
| 793 | __entry->size = ip->i_d.di_size; \ |
| 794 | __entry->new_size = ip->i_new_size; \ |
| 795 | __entry->offset = offset; \ |
| 796 | __entry->count = count; \ |
| 797 | __entry->flags = flags; \ |
| 798 | ), \ |
| 799 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ |
| 800 | "offset 0x%llx count 0x%zx ioflags %s", \ |
| 801 | MAJOR(__entry->dev), MINOR(__entry->dev), \ |
| 802 | __entry->ino, \ |
| 803 | __entry->size, \ |
| 804 | __entry->new_size, \ |
| 805 | __entry->offset, \ |
| 806 | __entry->count, \ |
| 807 | __print_flags(__entry->flags, "|", XFS_IO_FLAGS)) \ |
| 808 | ) |
| 809 | DEFINE_RW_EVENT(xfs_file_read); |
| 810 | DEFINE_RW_EVENT(xfs_file_buffered_write); |
| 811 | DEFINE_RW_EVENT(xfs_file_direct_write); |
| 812 | DEFINE_RW_EVENT(xfs_file_splice_read); |
| 813 | DEFINE_RW_EVENT(xfs_file_splice_write); |
| 814 | |
| 815 | |
| 816 | #define DEFINE_PAGE_EVENT(name) \ |
| 817 | TRACE_EVENT(name, \ |
| 818 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \ |
| 819 | TP_ARGS(inode, page, off), \ |
| 820 | TP_STRUCT__entry( \ |
| 821 | __field(dev_t, dev) \ |
| 822 | __field(xfs_ino_t, ino) \ |
| 823 | __field(pgoff_t, pgoff) \ |
| 824 | __field(loff_t, size) \ |
| 825 | __field(unsigned long, offset) \ |
| 826 | __field(int, delalloc) \ |
| 827 | __field(int, unmapped) \ |
| 828 | __field(int, unwritten) \ |
| 829 | ), \ |
| 830 | TP_fast_assign( \ |
| 831 | int delalloc = -1, unmapped = -1, unwritten = -1; \ |
| 832 | \ |
| 833 | if (page_has_buffers(page)) \ |
| 834 | xfs_count_page_state(page, &delalloc, \ |
| 835 | &unmapped, &unwritten); \ |
| 836 | __entry->dev = inode->i_sb->s_dev; \ |
| 837 | __entry->ino = XFS_I(inode)->i_ino; \ |
| 838 | __entry->pgoff = page_offset(page); \ |
| 839 | __entry->size = i_size_read(inode); \ |
| 840 | __entry->offset = off; \ |
| 841 | __entry->delalloc = delalloc; \ |
| 842 | __entry->unmapped = unmapped; \ |
| 843 | __entry->unwritten = unwritten; \ |
| 844 | ), \ |
| 845 | TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx " \ |
| 846 | "delalloc %d unmapped %d unwritten %d", \ |
| 847 | MAJOR(__entry->dev), MINOR(__entry->dev), \ |
| 848 | __entry->ino, \ |
| 849 | __entry->pgoff, \ |
| 850 | __entry->size, \ |
| 851 | __entry->offset, \ |
| 852 | __entry->delalloc, \ |
| 853 | __entry->unmapped, \ |
| 854 | __entry->unwritten) \ |
| 855 | ) |
| 856 | DEFINE_PAGE_EVENT(xfs_writepage); |
| 857 | DEFINE_PAGE_EVENT(xfs_releasepage); |
| 858 | DEFINE_PAGE_EVENT(xfs_invalidatepage); |
| 859 | |
| 860 | #define DEFINE_IOMAP_EVENT(name) \ |
| 861 | TRACE_EVENT(name, \ |
| 862 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ |
| 863 | int flags, struct xfs_bmbt_irec *irec), \ |
| 864 | TP_ARGS(ip, offset, count, flags, irec), \ |
| 865 | TP_STRUCT__entry( \ |
| 866 | __field(dev_t, dev) \ |
| 867 | __field(xfs_ino_t, ino) \ |
| 868 | __field(loff_t, size) \ |
| 869 | __field(loff_t, new_size) \ |
| 870 | __field(loff_t, offset) \ |
| 871 | __field(size_t, count) \ |
| 872 | __field(int, flags) \ |
| 873 | __field(xfs_fileoff_t, startoff) \ |
| 874 | __field(xfs_fsblock_t, startblock) \ |
| 875 | __field(xfs_filblks_t, blockcount) \ |
| 876 | ), \ |
| 877 | TP_fast_assign( \ |
| 878 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ |
| 879 | __entry->ino = ip->i_ino; \ |
| 880 | __entry->size = ip->i_d.di_size; \ |
| 881 | __entry->new_size = ip->i_new_size; \ |
| 882 | __entry->offset = offset; \ |
| 883 | __entry->count = count; \ |
| 884 | __entry->flags = flags; \ |
| 885 | __entry->startoff = irec ? irec->br_startoff : 0; \ |
| 886 | __entry->startblock = irec ? irec->br_startblock : 0; \ |
| 887 | __entry->blockcount = irec ? irec->br_blockcount : 0; \ |
| 888 | ), \ |
| 889 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ |
| 890 | "offset 0x%llx count %zd flags %s " \ |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 891 | "startoff 0x%llx startblock %lld blockcount 0x%llx", \ |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 892 | MAJOR(__entry->dev), MINOR(__entry->dev), \ |
| 893 | __entry->ino, \ |
| 894 | __entry->size, \ |
| 895 | __entry->new_size, \ |
| 896 | __entry->offset, \ |
| 897 | __entry->count, \ |
| 898 | __print_flags(__entry->flags, "|", BMAPI_FLAGS), \ |
| 899 | __entry->startoff, \ |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 900 | (__int64_t)__entry->startblock, \ |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 901 | __entry->blockcount) \ |
| 902 | ) |
| 903 | DEFINE_IOMAP_EVENT(xfs_iomap_enter); |
| 904 | DEFINE_IOMAP_EVENT(xfs_iomap_found); |
| 905 | DEFINE_IOMAP_EVENT(xfs_iomap_alloc); |
| 906 | |
| 907 | #define DEFINE_SIMPLE_IO_EVENT(name) \ |
| 908 | TRACE_EVENT(name, \ |
| 909 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \ |
| 910 | TP_ARGS(ip, offset, count), \ |
| 911 | TP_STRUCT__entry( \ |
| 912 | __field(dev_t, dev) \ |
| 913 | __field(xfs_ino_t, ino) \ |
| 914 | __field(loff_t, size) \ |
| 915 | __field(loff_t, new_size) \ |
| 916 | __field(loff_t, offset) \ |
| 917 | __field(size_t, count) \ |
| 918 | ), \ |
| 919 | TP_fast_assign( \ |
| 920 | __entry->dev = VFS_I(ip)->i_sb->s_dev; \ |
| 921 | __entry->ino = ip->i_ino; \ |
| 922 | __entry->size = ip->i_d.di_size; \ |
| 923 | __entry->new_size = ip->i_new_size; \ |
| 924 | __entry->offset = offset; \ |
| 925 | __entry->count = count; \ |
| 926 | ), \ |
| 927 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " \ |
| 928 | "offset 0x%llx count %zd", \ |
| 929 | MAJOR(__entry->dev), MINOR(__entry->dev), \ |
| 930 | __entry->ino, \ |
| 931 | __entry->size, \ |
| 932 | __entry->new_size, \ |
| 933 | __entry->offset, \ |
| 934 | __entry->count) \ |
| 935 | ); |
| 936 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); |
| 937 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); |
| 938 | |
| 939 | |
| 940 | TRACE_EVENT(xfs_itruncate_start, |
| 941 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size, int flag, |
| 942 | xfs_off_t toss_start, xfs_off_t toss_finish), |
| 943 | TP_ARGS(ip, new_size, flag, toss_start, toss_finish), |
| 944 | TP_STRUCT__entry( |
| 945 | __field(dev_t, dev) |
| 946 | __field(xfs_ino_t, ino) |
| 947 | __field(xfs_fsize_t, size) |
| 948 | __field(xfs_fsize_t, new_size) |
| 949 | __field(xfs_off_t, toss_start) |
| 950 | __field(xfs_off_t, toss_finish) |
| 951 | __field(int, flag) |
| 952 | ), |
| 953 | TP_fast_assign( |
| 954 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 955 | __entry->ino = ip->i_ino; |
| 956 | __entry->size = ip->i_d.di_size; |
| 957 | __entry->new_size = new_size; |
| 958 | __entry->toss_start = toss_start; |
| 959 | __entry->toss_finish = toss_finish; |
| 960 | __entry->flag = flag; |
| 961 | ), |
| 962 | TP_printk("dev %d:%d ino 0x%llx %s size 0x%llx new_size 0x%llx " |
| 963 | "toss start 0x%llx toss finish 0x%llx", |
| 964 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 965 | __entry->ino, |
| 966 | __print_flags(__entry->flag, "|", XFS_ITRUNC_FLAGS), |
| 967 | __entry->size, |
| 968 | __entry->new_size, |
| 969 | __entry->toss_start, |
| 970 | __entry->toss_finish) |
| 971 | ); |
| 972 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 973 | DECLARE_EVENT_CLASS(xfs_itrunc_class, |
| 974 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), |
| 975 | TP_ARGS(ip, new_size), |
| 976 | TP_STRUCT__entry( |
| 977 | __field(dev_t, dev) |
| 978 | __field(xfs_ino_t, ino) |
| 979 | __field(xfs_fsize_t, size) |
| 980 | __field(xfs_fsize_t, new_size) |
| 981 | ), |
| 982 | TP_fast_assign( |
| 983 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 984 | __entry->ino = ip->i_ino; |
| 985 | __entry->size = ip->i_d.di_size; |
| 986 | __entry->new_size = new_size; |
| 987 | ), |
| 988 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx", |
| 989 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 990 | __entry->ino, |
| 991 | __entry->size, |
| 992 | __entry->new_size) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 993 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 994 | |
| 995 | #define DEFINE_ITRUNC_EVENT(name) \ |
| 996 | DEFINE_EVENT(xfs_itrunc_class, name, \ |
| 997 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \ |
| 998 | TP_ARGS(ip, new_size)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 999 | DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_start); |
| 1000 | DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_end); |
| 1001 | |
| 1002 | TRACE_EVENT(xfs_pagecache_inval, |
| 1003 | TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish), |
| 1004 | TP_ARGS(ip, start, finish), |
| 1005 | TP_STRUCT__entry( |
| 1006 | __field(dev_t, dev) |
| 1007 | __field(xfs_ino_t, ino) |
| 1008 | __field(xfs_fsize_t, size) |
| 1009 | __field(xfs_off_t, start) |
| 1010 | __field(xfs_off_t, finish) |
| 1011 | ), |
| 1012 | TP_fast_assign( |
| 1013 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1014 | __entry->ino = ip->i_ino; |
| 1015 | __entry->size = ip->i_d.di_size; |
| 1016 | __entry->start = start; |
| 1017 | __entry->finish = finish; |
| 1018 | ), |
| 1019 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx start 0x%llx finish 0x%llx", |
| 1020 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1021 | __entry->ino, |
| 1022 | __entry->size, |
| 1023 | __entry->start, |
| 1024 | __entry->finish) |
| 1025 | ); |
| 1026 | |
| 1027 | TRACE_EVENT(xfs_bunmap, |
| 1028 | TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len, |
| 1029 | int flags, unsigned long caller_ip), |
| 1030 | TP_ARGS(ip, bno, len, flags, caller_ip), |
| 1031 | TP_STRUCT__entry( |
| 1032 | __field(dev_t, dev) |
| 1033 | __field(xfs_ino_t, ino) |
| 1034 | __field(xfs_fsize_t, size) |
| 1035 | __field(xfs_fileoff_t, bno) |
| 1036 | __field(xfs_filblks_t, len) |
| 1037 | __field(unsigned long, caller_ip) |
| 1038 | __field(int, flags) |
| 1039 | ), |
| 1040 | TP_fast_assign( |
| 1041 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1042 | __entry->ino = ip->i_ino; |
| 1043 | __entry->size = ip->i_d.di_size; |
| 1044 | __entry->bno = bno; |
| 1045 | __entry->len = len; |
| 1046 | __entry->caller_ip = caller_ip; |
| 1047 | __entry->flags = flags; |
| 1048 | ), |
| 1049 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx bno 0x%llx len 0x%llx" |
| 1050 | "flags %s caller %pf", |
| 1051 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1052 | __entry->ino, |
| 1053 | __entry->size, |
| 1054 | __entry->bno, |
| 1055 | __entry->len, |
| 1056 | __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS), |
| 1057 | (void *)__entry->caller_ip) |
| 1058 | |
| 1059 | ); |
| 1060 | |
| 1061 | TRACE_EVENT(xfs_alloc_busy, |
| 1062 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno, |
| 1063 | xfs_extlen_t len, int slot), |
| 1064 | TP_ARGS(mp, agno, agbno, len, slot), |
| 1065 | TP_STRUCT__entry( |
| 1066 | __field(dev_t, dev) |
| 1067 | __field(xfs_agnumber_t, agno) |
| 1068 | __field(xfs_agblock_t, agbno) |
| 1069 | __field(xfs_extlen_t, len) |
| 1070 | __field(int, slot) |
| 1071 | ), |
| 1072 | TP_fast_assign( |
| 1073 | __entry->dev = mp->m_super->s_dev; |
| 1074 | __entry->agno = agno; |
| 1075 | __entry->agbno = agbno; |
| 1076 | __entry->len = len; |
| 1077 | __entry->slot = slot; |
| 1078 | ), |
| 1079 | TP_printk("dev %d:%d agno %u agbno %u len %u slot %d", |
| 1080 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1081 | __entry->agno, |
| 1082 | __entry->agbno, |
| 1083 | __entry->len, |
| 1084 | __entry->slot) |
| 1085 | |
| 1086 | ); |
| 1087 | |
| 1088 | #define XFS_BUSY_STATES \ |
| 1089 | { 0, "found" }, \ |
| 1090 | { 1, "missing" } |
| 1091 | |
| 1092 | TRACE_EVENT(xfs_alloc_unbusy, |
| 1093 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, |
| 1094 | int slot, int found), |
| 1095 | TP_ARGS(mp, agno, slot, found), |
| 1096 | TP_STRUCT__entry( |
| 1097 | __field(dev_t, dev) |
| 1098 | __field(xfs_agnumber_t, agno) |
| 1099 | __field(int, slot) |
| 1100 | __field(int, found) |
| 1101 | ), |
| 1102 | TP_fast_assign( |
| 1103 | __entry->dev = mp->m_super->s_dev; |
| 1104 | __entry->agno = agno; |
| 1105 | __entry->slot = slot; |
| 1106 | __entry->found = found; |
| 1107 | ), |
| 1108 | TP_printk("dev %d:%d agno %u slot %d %s", |
| 1109 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1110 | __entry->agno, |
| 1111 | __entry->slot, |
| 1112 | __print_symbolic(__entry->found, XFS_BUSY_STATES)) |
| 1113 | ); |
| 1114 | |
| 1115 | TRACE_EVENT(xfs_alloc_busysearch, |
| 1116 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno, |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1117 | xfs_extlen_t len, xfs_lsn_t lsn), |
| 1118 | TP_ARGS(mp, agno, agbno, len, lsn), |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1119 | TP_STRUCT__entry( |
| 1120 | __field(dev_t, dev) |
| 1121 | __field(xfs_agnumber_t, agno) |
| 1122 | __field(xfs_agblock_t, agbno) |
| 1123 | __field(xfs_extlen_t, len) |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1124 | __field(xfs_lsn_t, lsn) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1125 | ), |
| 1126 | TP_fast_assign( |
| 1127 | __entry->dev = mp->m_super->s_dev; |
| 1128 | __entry->agno = agno; |
| 1129 | __entry->agbno = agbno; |
| 1130 | __entry->len = len; |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1131 | __entry->lsn = lsn; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1132 | ), |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1133 | TP_printk("dev %d:%d agno %u agbno %u len %u force lsn 0x%llx", |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1134 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1135 | __entry->agno, |
| 1136 | __entry->agbno, |
| 1137 | __entry->len, |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1138 | __entry->lsn) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1139 | ); |
| 1140 | |
| 1141 | TRACE_EVENT(xfs_agf, |
| 1142 | TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, |
| 1143 | unsigned long caller_ip), |
| 1144 | TP_ARGS(mp, agf, flags, caller_ip), |
| 1145 | TP_STRUCT__entry( |
| 1146 | __field(dev_t, dev) |
| 1147 | __field(xfs_agnumber_t, agno) |
| 1148 | __field(int, flags) |
| 1149 | __field(__u32, length) |
| 1150 | __field(__u32, bno_root) |
| 1151 | __field(__u32, cnt_root) |
| 1152 | __field(__u32, bno_level) |
| 1153 | __field(__u32, cnt_level) |
| 1154 | __field(__u32, flfirst) |
| 1155 | __field(__u32, fllast) |
| 1156 | __field(__u32, flcount) |
| 1157 | __field(__u32, freeblks) |
| 1158 | __field(__u32, longest) |
| 1159 | __field(unsigned long, caller_ip) |
| 1160 | ), |
| 1161 | TP_fast_assign( |
| 1162 | __entry->dev = mp->m_super->s_dev; |
| 1163 | __entry->agno = be32_to_cpu(agf->agf_seqno), |
| 1164 | __entry->flags = flags; |
| 1165 | __entry->length = be32_to_cpu(agf->agf_length), |
| 1166 | __entry->bno_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]), |
| 1167 | __entry->cnt_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]), |
| 1168 | __entry->bno_level = |
| 1169 | be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]), |
| 1170 | __entry->cnt_level = |
| 1171 | be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]), |
| 1172 | __entry->flfirst = be32_to_cpu(agf->agf_flfirst), |
| 1173 | __entry->fllast = be32_to_cpu(agf->agf_fllast), |
| 1174 | __entry->flcount = be32_to_cpu(agf->agf_flcount), |
| 1175 | __entry->freeblks = be32_to_cpu(agf->agf_freeblks), |
| 1176 | __entry->longest = be32_to_cpu(agf->agf_longest); |
| 1177 | __entry->caller_ip = caller_ip; |
| 1178 | ), |
| 1179 | TP_printk("dev %d:%d agno %u flags %s length %u roots b %u c %u " |
| 1180 | "levels b %u c %u flfirst %u fllast %u flcount %u " |
| 1181 | "freeblks %u longest %u caller %pf", |
| 1182 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1183 | __entry->agno, |
| 1184 | __print_flags(__entry->flags, "|", XFS_AGF_FLAGS), |
| 1185 | __entry->length, |
| 1186 | __entry->bno_root, |
| 1187 | __entry->cnt_root, |
| 1188 | __entry->bno_level, |
| 1189 | __entry->cnt_level, |
| 1190 | __entry->flfirst, |
| 1191 | __entry->fllast, |
| 1192 | __entry->flcount, |
| 1193 | __entry->freeblks, |
| 1194 | __entry->longest, |
| 1195 | (void *)__entry->caller_ip) |
| 1196 | ); |
| 1197 | |
| 1198 | TRACE_EVENT(xfs_free_extent, |
| 1199 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno, |
| 1200 | xfs_extlen_t len, bool isfl, int haveleft, int haveright), |
| 1201 | TP_ARGS(mp, agno, agbno, len, isfl, haveleft, haveright), |
| 1202 | TP_STRUCT__entry( |
| 1203 | __field(dev_t, dev) |
| 1204 | __field(xfs_agnumber_t, agno) |
| 1205 | __field(xfs_agblock_t, agbno) |
| 1206 | __field(xfs_extlen_t, len) |
| 1207 | __field(int, isfl) |
| 1208 | __field(int, haveleft) |
| 1209 | __field(int, haveright) |
| 1210 | ), |
| 1211 | TP_fast_assign( |
| 1212 | __entry->dev = mp->m_super->s_dev; |
| 1213 | __entry->agno = agno; |
| 1214 | __entry->agbno = agbno; |
| 1215 | __entry->len = len; |
| 1216 | __entry->isfl = isfl; |
| 1217 | __entry->haveleft = haveleft; |
| 1218 | __entry->haveright = haveright; |
| 1219 | ), |
| 1220 | TP_printk("dev %d:%d agno %u agbno %u len %u isfl %d %s", |
| 1221 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1222 | __entry->agno, |
| 1223 | __entry->agbno, |
| 1224 | __entry->len, |
| 1225 | __entry->isfl, |
| 1226 | __entry->haveleft ? |
| 1227 | (__entry->haveright ? "both" : "left") : |
| 1228 | (__entry->haveright ? "right" : "none")) |
| 1229 | |
| 1230 | ); |
| 1231 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1232 | DECLARE_EVENT_CLASS(xfs_alloc_class, |
| 1233 | TP_PROTO(struct xfs_alloc_arg *args), |
| 1234 | TP_ARGS(args), |
| 1235 | TP_STRUCT__entry( |
| 1236 | __field(dev_t, dev) |
| 1237 | __field(xfs_agnumber_t, agno) |
| 1238 | __field(xfs_agblock_t, agbno) |
| 1239 | __field(xfs_extlen_t, minlen) |
| 1240 | __field(xfs_extlen_t, maxlen) |
| 1241 | __field(xfs_extlen_t, mod) |
| 1242 | __field(xfs_extlen_t, prod) |
| 1243 | __field(xfs_extlen_t, minleft) |
| 1244 | __field(xfs_extlen_t, total) |
| 1245 | __field(xfs_extlen_t, alignment) |
| 1246 | __field(xfs_extlen_t, minalignslop) |
| 1247 | __field(xfs_extlen_t, len) |
| 1248 | __field(short, type) |
| 1249 | __field(short, otype) |
| 1250 | __field(char, wasdel) |
| 1251 | __field(char, wasfromfl) |
| 1252 | __field(char, isfl) |
| 1253 | __field(char, userdata) |
| 1254 | __field(xfs_fsblock_t, firstblock) |
| 1255 | ), |
| 1256 | TP_fast_assign( |
| 1257 | __entry->dev = args->mp->m_super->s_dev; |
| 1258 | __entry->agno = args->agno; |
| 1259 | __entry->agbno = args->agbno; |
| 1260 | __entry->minlen = args->minlen; |
| 1261 | __entry->maxlen = args->maxlen; |
| 1262 | __entry->mod = args->mod; |
| 1263 | __entry->prod = args->prod; |
| 1264 | __entry->minleft = args->minleft; |
| 1265 | __entry->total = args->total; |
| 1266 | __entry->alignment = args->alignment; |
| 1267 | __entry->minalignslop = args->minalignslop; |
| 1268 | __entry->len = args->len; |
| 1269 | __entry->type = args->type; |
| 1270 | __entry->otype = args->otype; |
| 1271 | __entry->wasdel = args->wasdel; |
| 1272 | __entry->wasfromfl = args->wasfromfl; |
| 1273 | __entry->isfl = args->isfl; |
| 1274 | __entry->userdata = args->userdata; |
| 1275 | __entry->firstblock = args->firstblock; |
| 1276 | ), |
| 1277 | TP_printk("dev %d:%d agno %u agbno %u minlen %u maxlen %u mod %u " |
| 1278 | "prod %u minleft %u total %u alignment %u minalignslop %u " |
| 1279 | "len %u type %s otype %s wasdel %d wasfromfl %d isfl %d " |
| 1280 | "userdata %d firstblock 0x%llx", |
| 1281 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1282 | __entry->agno, |
| 1283 | __entry->agbno, |
| 1284 | __entry->minlen, |
| 1285 | __entry->maxlen, |
| 1286 | __entry->mod, |
| 1287 | __entry->prod, |
| 1288 | __entry->minleft, |
| 1289 | __entry->total, |
| 1290 | __entry->alignment, |
| 1291 | __entry->minalignslop, |
| 1292 | __entry->len, |
| 1293 | __print_symbolic(__entry->type, XFS_ALLOC_TYPES), |
| 1294 | __print_symbolic(__entry->otype, XFS_ALLOC_TYPES), |
| 1295 | __entry->wasdel, |
| 1296 | __entry->wasfromfl, |
| 1297 | __entry->isfl, |
| 1298 | __entry->userdata, |
| 1299 | __entry->firstblock) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1300 | ) |
| 1301 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1302 | #define DEFINE_ALLOC_EVENT(name) \ |
| 1303 | DEFINE_EVENT(xfs_alloc_class, name, \ |
| 1304 | TP_PROTO(struct xfs_alloc_arg *args), \ |
| 1305 | TP_ARGS(args)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1306 | DEFINE_ALLOC_EVENT(xfs_alloc_exact_done); |
| 1307 | DEFINE_ALLOC_EVENT(xfs_alloc_exact_error); |
| 1308 | DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft); |
| 1309 | DEFINE_ALLOC_EVENT(xfs_alloc_near_first); |
| 1310 | DEFINE_ALLOC_EVENT(xfs_alloc_near_greater); |
| 1311 | DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser); |
| 1312 | DEFINE_ALLOC_EVENT(xfs_alloc_near_error); |
| 1313 | DEFINE_ALLOC_EVENT(xfs_alloc_size_neither); |
| 1314 | DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry); |
| 1315 | DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft); |
| 1316 | DEFINE_ALLOC_EVENT(xfs_alloc_size_done); |
| 1317 | DEFINE_ALLOC_EVENT(xfs_alloc_size_error); |
| 1318 | DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist); |
| 1319 | DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough); |
| 1320 | DEFINE_ALLOC_EVENT(xfs_alloc_small_done); |
| 1321 | DEFINE_ALLOC_EVENT(xfs_alloc_small_error); |
| 1322 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs); |
| 1323 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix); |
| 1324 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp); |
| 1325 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed); |
| 1326 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed); |
| 1327 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1328 | DECLARE_EVENT_CLASS(xfs_dir2_class, |
| 1329 | TP_PROTO(struct xfs_da_args *args), |
| 1330 | TP_ARGS(args), |
| 1331 | TP_STRUCT__entry( |
| 1332 | __field(dev_t, dev) |
| 1333 | __field(xfs_ino_t, ino) |
| 1334 | __dynamic_array(char, name, args->namelen) |
| 1335 | __field(int, namelen) |
| 1336 | __field(xfs_dahash_t, hashval) |
| 1337 | __field(xfs_ino_t, inumber) |
| 1338 | __field(int, op_flags) |
| 1339 | ), |
| 1340 | TP_fast_assign( |
| 1341 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1342 | __entry->ino = args->dp->i_ino; |
| 1343 | if (args->namelen) |
| 1344 | memcpy(__get_str(name), args->name, args->namelen); |
| 1345 | __entry->namelen = args->namelen; |
| 1346 | __entry->hashval = args->hashval; |
| 1347 | __entry->inumber = args->inumber; |
| 1348 | __entry->op_flags = args->op_flags; |
| 1349 | ), |
| 1350 | TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x " |
| 1351 | "inumber 0x%llx op_flags %s", |
| 1352 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1353 | __entry->ino, |
| 1354 | __entry->namelen, |
| 1355 | __entry->namelen ? __get_str(name) : NULL, |
| 1356 | __entry->namelen, |
| 1357 | __entry->hashval, |
| 1358 | __entry->inumber, |
| 1359 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1360 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1361 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1362 | #define DEFINE_DIR2_EVENT(name) \ |
| 1363 | DEFINE_EVENT(xfs_dir2_class, name, \ |
| 1364 | TP_PROTO(struct xfs_da_args *args), \ |
| 1365 | TP_ARGS(args)) |
| 1366 | DEFINE_DIR2_EVENT(xfs_dir2_sf_addname); |
| 1367 | DEFINE_DIR2_EVENT(xfs_dir2_sf_create); |
| 1368 | DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup); |
| 1369 | DEFINE_DIR2_EVENT(xfs_dir2_sf_replace); |
| 1370 | DEFINE_DIR2_EVENT(xfs_dir2_sf_removename); |
| 1371 | DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4); |
| 1372 | DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8); |
| 1373 | DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block); |
| 1374 | DEFINE_DIR2_EVENT(xfs_dir2_block_addname); |
| 1375 | DEFINE_DIR2_EVENT(xfs_dir2_block_lookup); |
| 1376 | DEFINE_DIR2_EVENT(xfs_dir2_block_replace); |
| 1377 | DEFINE_DIR2_EVENT(xfs_dir2_block_removename); |
| 1378 | DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf); |
| 1379 | DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf); |
| 1380 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname); |
| 1381 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup); |
| 1382 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace); |
| 1383 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename); |
| 1384 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block); |
| 1385 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node); |
| 1386 | DEFINE_DIR2_EVENT(xfs_dir2_node_addname); |
| 1387 | DEFINE_DIR2_EVENT(xfs_dir2_node_lookup); |
| 1388 | DEFINE_DIR2_EVENT(xfs_dir2_node_replace); |
| 1389 | DEFINE_DIR2_EVENT(xfs_dir2_node_removename); |
| 1390 | DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf); |
| 1391 | |
| 1392 | DECLARE_EVENT_CLASS(xfs_dir2_space_class, |
| 1393 | TP_PROTO(struct xfs_da_args *args, int idx), |
| 1394 | TP_ARGS(args, idx), |
| 1395 | TP_STRUCT__entry( |
| 1396 | __field(dev_t, dev) |
| 1397 | __field(xfs_ino_t, ino) |
| 1398 | __field(int, op_flags) |
| 1399 | __field(int, idx) |
| 1400 | ), |
| 1401 | TP_fast_assign( |
| 1402 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1403 | __entry->ino = args->dp->i_ino; |
| 1404 | __entry->op_flags = args->op_flags; |
| 1405 | __entry->idx = idx; |
| 1406 | ), |
| 1407 | TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d", |
| 1408 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1409 | __entry->ino, |
| 1410 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS), |
| 1411 | __entry->idx) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1412 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1413 | |
| 1414 | #define DEFINE_DIR2_SPACE_EVENT(name) \ |
| 1415 | DEFINE_EVENT(xfs_dir2_space_class, name, \ |
| 1416 | TP_PROTO(struct xfs_da_args *args, int idx), \ |
| 1417 | TP_ARGS(args, idx)) |
| 1418 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add); |
| 1419 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove); |
| 1420 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode); |
| 1421 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1422 | |
| 1423 | TRACE_EVENT(xfs_dir2_leafn_moveents, |
| 1424 | TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count), |
| 1425 | TP_ARGS(args, src_idx, dst_idx, count), |
| 1426 | TP_STRUCT__entry( |
| 1427 | __field(dev_t, dev) |
| 1428 | __field(xfs_ino_t, ino) |
| 1429 | __field(int, op_flags) |
| 1430 | __field(int, src_idx) |
| 1431 | __field(int, dst_idx) |
| 1432 | __field(int, count) |
| 1433 | ), |
| 1434 | TP_fast_assign( |
| 1435 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1436 | __entry->ino = args->dp->i_ino; |
| 1437 | __entry->op_flags = args->op_flags; |
| 1438 | __entry->src_idx = src_idx; |
| 1439 | __entry->dst_idx = dst_idx; |
| 1440 | __entry->count = count; |
| 1441 | ), |
| 1442 | TP_printk("dev %d:%d ino 0x%llx op_flags %s " |
| 1443 | "src_idx %d dst_idx %d count %d", |
| 1444 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1445 | __entry->ino, |
| 1446 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS), |
| 1447 | __entry->src_idx, |
| 1448 | __entry->dst_idx, |
| 1449 | __entry->count) |
| 1450 | ); |
| 1451 | |
Dave Chinner | 3a85cd9 | 2010-01-14 01:33:55 +0000 | [diff] [blame] | 1452 | #define XFS_SWAPEXT_INODES \ |
| 1453 | { 0, "target" }, \ |
| 1454 | { 1, "temp" } |
| 1455 | |
| 1456 | #define XFS_INODE_FORMAT_STR \ |
| 1457 | { 0, "invalid" }, \ |
| 1458 | { 1, "local" }, \ |
| 1459 | { 2, "extent" }, \ |
| 1460 | { 3, "btree" } |
| 1461 | |
| 1462 | DECLARE_EVENT_CLASS(xfs_swap_extent_class, |
| 1463 | TP_PROTO(struct xfs_inode *ip, int which), |
| 1464 | TP_ARGS(ip, which), |
| 1465 | TP_STRUCT__entry( |
| 1466 | __field(dev_t, dev) |
| 1467 | __field(int, which) |
| 1468 | __field(xfs_ino_t, ino) |
| 1469 | __field(int, format) |
| 1470 | __field(int, nex) |
| 1471 | __field(int, max_nex) |
| 1472 | __field(int, broot_size) |
| 1473 | __field(int, fork_off) |
| 1474 | ), |
| 1475 | TP_fast_assign( |
| 1476 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1477 | __entry->which = which; |
| 1478 | __entry->ino = ip->i_ino; |
| 1479 | __entry->format = ip->i_d.di_format; |
| 1480 | __entry->nex = ip->i_d.di_nextents; |
| 1481 | __entry->max_nex = ip->i_df.if_ext_max; |
| 1482 | __entry->broot_size = ip->i_df.if_broot_bytes; |
| 1483 | __entry->fork_off = XFS_IFORK_BOFF(ip); |
| 1484 | ), |
| 1485 | TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, " |
| 1486 | "Max in-fork extents %d, broot size %d, fork offset %d", |
| 1487 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1488 | __entry->ino, |
| 1489 | __print_symbolic(__entry->which, XFS_SWAPEXT_INODES), |
| 1490 | __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR), |
| 1491 | __entry->nex, |
| 1492 | __entry->max_nex, |
| 1493 | __entry->broot_size, |
| 1494 | __entry->fork_off) |
| 1495 | ) |
| 1496 | |
| 1497 | #define DEFINE_SWAPEXT_EVENT(name) \ |
| 1498 | DEFINE_EVENT(xfs_swap_extent_class, name, \ |
| 1499 | TP_PROTO(struct xfs_inode *ip, int which), \ |
| 1500 | TP_ARGS(ip, which)) |
| 1501 | |
| 1502 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); |
| 1503 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); |
| 1504 | |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1505 | #endif /* _TRACE_XFS_H */ |
| 1506 | |
| 1507 | #undef TRACE_INCLUDE_PATH |
| 1508 | #define TRACE_INCLUDE_PATH . |
| 1509 | #define TRACE_INCLUDE_FILE xfs_trace |
| 1510 | #include <trace/define_trace.h> |