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; |
Dave Chinner | 9abbc53 | 2010-04-13 15:06:46 +1000 | [diff] [blame] | 35 | struct xlog_recover; |
| 36 | struct xlog_recover_item; |
| 37 | struct xfs_buf_log_format; |
| 38 | struct xfs_inode_log_format; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 39 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 40 | DECLARE_EVENT_CLASS(xfs_attr_list_class, |
| 41 | TP_PROTO(struct xfs_attr_list_context *ctx), |
| 42 | TP_ARGS(ctx), |
| 43 | TP_STRUCT__entry( |
| 44 | __field(dev_t, dev) |
| 45 | __field(xfs_ino_t, ino) |
| 46 | __field(u32, hashval) |
| 47 | __field(u32, blkno) |
| 48 | __field(u32, offset) |
| 49 | __field(void *, alist) |
| 50 | __field(int, bufsize) |
| 51 | __field(int, count) |
| 52 | __field(int, firstu) |
| 53 | __field(int, dupcnt) |
| 54 | __field(int, flags) |
| 55 | ), |
| 56 | TP_fast_assign( |
| 57 | __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev; |
| 58 | __entry->ino = ctx->dp->i_ino; |
| 59 | __entry->hashval = ctx->cursor->hashval; |
| 60 | __entry->blkno = ctx->cursor->blkno; |
| 61 | __entry->offset = ctx->cursor->offset; |
| 62 | __entry->alist = ctx->alist; |
| 63 | __entry->bufsize = ctx->bufsize; |
| 64 | __entry->count = ctx->count; |
| 65 | __entry->firstu = ctx->firstu; |
| 66 | __entry->flags = ctx->flags; |
| 67 | ), |
| 68 | TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u " |
| 69 | "alist 0x%p size %u count %u firstu %u flags %d %s", |
| 70 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 71 | __entry->ino, |
| 72 | __entry->hashval, |
| 73 | __entry->blkno, |
| 74 | __entry->offset, |
| 75 | __entry->dupcnt, |
| 76 | __entry->alist, |
| 77 | __entry->bufsize, |
| 78 | __entry->count, |
| 79 | __entry->firstu, |
| 80 | __entry->flags, |
| 81 | __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS) |
| 82 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 83 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 84 | |
| 85 | #define DEFINE_ATTR_LIST_EVENT(name) \ |
| 86 | DEFINE_EVENT(xfs_attr_list_class, name, \ |
| 87 | TP_PROTO(struct xfs_attr_list_context *ctx), \ |
| 88 | TP_ARGS(ctx)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 89 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf); |
| 90 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all); |
| 91 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf); |
| 92 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end); |
| 93 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full); |
| 94 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add); |
| 95 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk); |
| 96 | DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound); |
| 97 | |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 98 | DECLARE_EVENT_CLASS(xfs_perag_class, |
| 99 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, |
| 100 | unsigned long caller_ip), |
| 101 | TP_ARGS(mp, agno, refcount, caller_ip), |
| 102 | TP_STRUCT__entry( |
| 103 | __field(dev_t, dev) |
| 104 | __field(xfs_agnumber_t, agno) |
| 105 | __field(int, refcount) |
| 106 | __field(unsigned long, caller_ip) |
| 107 | ), |
| 108 | TP_fast_assign( |
| 109 | __entry->dev = mp->m_super->s_dev; |
| 110 | __entry->agno = agno; |
| 111 | __entry->refcount = refcount; |
| 112 | __entry->caller_ip = caller_ip; |
| 113 | ), |
| 114 | TP_printk("dev %d:%d agno %u refcount %d caller %pf", |
| 115 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 116 | __entry->agno, |
| 117 | __entry->refcount, |
| 118 | (char *)__entry->caller_ip) |
| 119 | ); |
| 120 | |
| 121 | #define DEFINE_PERAG_REF_EVENT(name) \ |
| 122 | DEFINE_EVENT(xfs_perag_class, name, \ |
| 123 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ |
| 124 | unsigned long caller_ip), \ |
| 125 | TP_ARGS(mp, agno, refcount, caller_ip)) |
| 126 | DEFINE_PERAG_REF_EVENT(xfs_perag_get); |
Dave Chinner | 65d0f20 | 2010-09-24 18:40:15 +1000 | [diff] [blame] | 127 | DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag); |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 128 | DEFINE_PERAG_REF_EVENT(xfs_perag_put); |
Dave Chinner | 16fd536 | 2010-07-20 09:43:39 +1000 | [diff] [blame] | 129 | DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim); |
| 130 | DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim); |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 131 | |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 132 | TRACE_EVENT(xfs_attr_list_node_descend, |
| 133 | TP_PROTO(struct xfs_attr_list_context *ctx, |
| 134 | struct xfs_da_node_entry *btree), |
| 135 | TP_ARGS(ctx, btree), |
| 136 | TP_STRUCT__entry( |
| 137 | __field(dev_t, dev) |
| 138 | __field(xfs_ino_t, ino) |
| 139 | __field(u32, hashval) |
| 140 | __field(u32, blkno) |
| 141 | __field(u32, offset) |
| 142 | __field(void *, alist) |
| 143 | __field(int, bufsize) |
| 144 | __field(int, count) |
| 145 | __field(int, firstu) |
| 146 | __field(int, dupcnt) |
| 147 | __field(int, flags) |
| 148 | __field(u32, bt_hashval) |
| 149 | __field(u32, bt_before) |
| 150 | ), |
| 151 | TP_fast_assign( |
| 152 | __entry->dev = VFS_I(ctx->dp)->i_sb->s_dev; |
| 153 | __entry->ino = ctx->dp->i_ino; |
| 154 | __entry->hashval = ctx->cursor->hashval; |
| 155 | __entry->blkno = ctx->cursor->blkno; |
| 156 | __entry->offset = ctx->cursor->offset; |
| 157 | __entry->alist = ctx->alist; |
| 158 | __entry->bufsize = ctx->bufsize; |
| 159 | __entry->count = ctx->count; |
| 160 | __entry->firstu = ctx->firstu; |
| 161 | __entry->flags = ctx->flags; |
| 162 | __entry->bt_hashval = be32_to_cpu(btree->hashval); |
| 163 | __entry->bt_before = be32_to_cpu(btree->before); |
| 164 | ), |
| 165 | TP_printk("dev %d:%d ino 0x%llx cursor h/b/o 0x%x/0x%x/%u dupcnt %u " |
| 166 | "alist 0x%p size %u count %u firstu %u flags %d %s " |
| 167 | "node hashval %u, node before %u", |
| 168 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 169 | __entry->ino, |
| 170 | __entry->hashval, |
| 171 | __entry->blkno, |
| 172 | __entry->offset, |
| 173 | __entry->dupcnt, |
| 174 | __entry->alist, |
| 175 | __entry->bufsize, |
| 176 | __entry->count, |
| 177 | __entry->firstu, |
| 178 | __entry->flags, |
| 179 | __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS), |
| 180 | __entry->bt_hashval, |
| 181 | __entry->bt_before) |
| 182 | ); |
| 183 | |
| 184 | TRACE_EVENT(xfs_iext_insert, |
| 185 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, |
| 186 | struct xfs_bmbt_irec *r, int state, unsigned long caller_ip), |
| 187 | TP_ARGS(ip, idx, r, state, caller_ip), |
| 188 | TP_STRUCT__entry( |
| 189 | __field(dev_t, dev) |
| 190 | __field(xfs_ino_t, ino) |
| 191 | __field(xfs_extnum_t, idx) |
| 192 | __field(xfs_fileoff_t, startoff) |
| 193 | __field(xfs_fsblock_t, startblock) |
| 194 | __field(xfs_filblks_t, blockcount) |
| 195 | __field(xfs_exntst_t, state) |
| 196 | __field(int, bmap_state) |
| 197 | __field(unsigned long, caller_ip) |
| 198 | ), |
| 199 | TP_fast_assign( |
| 200 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 201 | __entry->ino = ip->i_ino; |
| 202 | __entry->idx = idx; |
| 203 | __entry->startoff = r->br_startoff; |
| 204 | __entry->startblock = r->br_startblock; |
| 205 | __entry->blockcount = r->br_blockcount; |
| 206 | __entry->state = r->br_state; |
| 207 | __entry->bmap_state = state; |
| 208 | __entry->caller_ip = caller_ip; |
| 209 | ), |
| 210 | TP_printk("dev %d:%d ino 0x%llx state %s idx %ld " |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 211 | "offset %lld block %lld count %lld flag %d caller %pf", |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 212 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 213 | __entry->ino, |
| 214 | __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS), |
| 215 | (long)__entry->idx, |
| 216 | __entry->startoff, |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 217 | (__int64_t)__entry->startblock, |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 218 | __entry->blockcount, |
| 219 | __entry->state, |
| 220 | (char *)__entry->caller_ip) |
| 221 | ); |
| 222 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 223 | DECLARE_EVENT_CLASS(xfs_bmap_class, |
| 224 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, |
| 225 | unsigned long caller_ip), |
| 226 | TP_ARGS(ip, idx, state, caller_ip), |
| 227 | TP_STRUCT__entry( |
| 228 | __field(dev_t, dev) |
| 229 | __field(xfs_ino_t, ino) |
| 230 | __field(xfs_extnum_t, idx) |
| 231 | __field(xfs_fileoff_t, startoff) |
| 232 | __field(xfs_fsblock_t, startblock) |
| 233 | __field(xfs_filblks_t, blockcount) |
| 234 | __field(xfs_exntst_t, state) |
| 235 | __field(int, bmap_state) |
| 236 | __field(unsigned long, caller_ip) |
| 237 | ), |
| 238 | TP_fast_assign( |
| 239 | struct xfs_ifork *ifp = (state & BMAP_ATTRFORK) ? |
| 240 | ip->i_afp : &ip->i_df; |
| 241 | struct xfs_bmbt_irec r; |
| 242 | |
| 243 | xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &r); |
| 244 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 245 | __entry->ino = ip->i_ino; |
| 246 | __entry->idx = idx; |
| 247 | __entry->startoff = r.br_startoff; |
| 248 | __entry->startblock = r.br_startblock; |
| 249 | __entry->blockcount = r.br_blockcount; |
| 250 | __entry->state = r.br_state; |
| 251 | __entry->bmap_state = state; |
| 252 | __entry->caller_ip = caller_ip; |
| 253 | ), |
| 254 | TP_printk("dev %d:%d ino 0x%llx state %s idx %ld " |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 255 | "offset %lld block %lld count %lld flag %d caller %pf", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 256 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 257 | __entry->ino, |
| 258 | __print_flags(__entry->bmap_state, "|", XFS_BMAP_EXT_FLAGS), |
| 259 | (long)__entry->idx, |
| 260 | __entry->startoff, |
Christoph Hellwig | f7008d0 | 2010-02-15 22:02:19 +0000 | [diff] [blame] | 261 | (__int64_t)__entry->startblock, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 262 | __entry->blockcount, |
| 263 | __entry->state, |
| 264 | (char *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 265 | ) |
| 266 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 267 | #define DEFINE_BMAP_EVENT(name) \ |
| 268 | DEFINE_EVENT(xfs_bmap_class, name, \ |
| 269 | TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, \ |
| 270 | unsigned long caller_ip), \ |
| 271 | TP_ARGS(ip, idx, state, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 272 | DEFINE_BMAP_EVENT(xfs_iext_remove); |
| 273 | DEFINE_BMAP_EVENT(xfs_bmap_pre_update); |
| 274 | DEFINE_BMAP_EVENT(xfs_bmap_post_update); |
| 275 | DEFINE_BMAP_EVENT(xfs_extlist); |
| 276 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 277 | DECLARE_EVENT_CLASS(xfs_buf_class, |
| 278 | TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), |
| 279 | TP_ARGS(bp, caller_ip), |
| 280 | TP_STRUCT__entry( |
| 281 | __field(dev_t, dev) |
| 282 | __field(xfs_daddr_t, bno) |
| 283 | __field(size_t, buffer_length) |
| 284 | __field(int, hold) |
| 285 | __field(int, pincount) |
| 286 | __field(unsigned, lockval) |
| 287 | __field(unsigned, flags) |
| 288 | __field(unsigned long, caller_ip) |
| 289 | ), |
| 290 | TP_fast_assign( |
| 291 | __entry->dev = bp->b_target->bt_dev; |
| 292 | __entry->bno = bp->b_bn; |
| 293 | __entry->buffer_length = bp->b_buffer_length; |
| 294 | __entry->hold = atomic_read(&bp->b_hold); |
| 295 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 296 | __entry->lockval = xfs_buf_lock_value(bp); |
| 297 | __entry->flags = bp->b_flags; |
| 298 | __entry->caller_ip = caller_ip; |
| 299 | ), |
| 300 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 301 | "lock %d flags %s caller %pf", |
| 302 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 303 | (unsigned long long)__entry->bno, |
| 304 | __entry->buffer_length, |
| 305 | __entry->hold, |
| 306 | __entry->pincount, |
| 307 | __entry->lockval, |
| 308 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 309 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 310 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 311 | |
| 312 | #define DEFINE_BUF_EVENT(name) \ |
| 313 | DEFINE_EVENT(xfs_buf_class, name, \ |
| 314 | TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \ |
| 315 | TP_ARGS(bp, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 316 | DEFINE_BUF_EVENT(xfs_buf_init); |
| 317 | DEFINE_BUF_EVENT(xfs_buf_free); |
| 318 | DEFINE_BUF_EVENT(xfs_buf_hold); |
| 319 | DEFINE_BUF_EVENT(xfs_buf_rele); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 320 | DEFINE_BUF_EVENT(xfs_buf_iodone); |
| 321 | DEFINE_BUF_EVENT(xfs_buf_iorequest); |
| 322 | DEFINE_BUF_EVENT(xfs_buf_bawrite); |
| 323 | DEFINE_BUF_EVENT(xfs_buf_bdwrite); |
| 324 | DEFINE_BUF_EVENT(xfs_buf_lock); |
| 325 | DEFINE_BUF_EVENT(xfs_buf_lock_done); |
| 326 | DEFINE_BUF_EVENT(xfs_buf_cond_lock); |
| 327 | DEFINE_BUF_EVENT(xfs_buf_unlock); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 328 | DEFINE_BUF_EVENT(xfs_buf_iowait); |
| 329 | DEFINE_BUF_EVENT(xfs_buf_iowait_done); |
| 330 | DEFINE_BUF_EVENT(xfs_buf_delwri_queue); |
| 331 | DEFINE_BUF_EVENT(xfs_buf_delwri_dequeue); |
| 332 | DEFINE_BUF_EVENT(xfs_buf_delwri_split); |
Dave Chinner | 686865f | 2010-09-24 20:07:47 +1000 | [diff] [blame] | 333 | DEFINE_BUF_EVENT(xfs_buf_get_uncached); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 334 | DEFINE_BUF_EVENT(xfs_bdstrat_shut); |
| 335 | DEFINE_BUF_EVENT(xfs_buf_item_relse); |
| 336 | DEFINE_BUF_EVENT(xfs_buf_item_iodone); |
| 337 | DEFINE_BUF_EVENT(xfs_buf_item_iodone_async); |
| 338 | DEFINE_BUF_EVENT(xfs_buf_error_relse); |
| 339 | DEFINE_BUF_EVENT(xfs_trans_read_buf_io); |
| 340 | DEFINE_BUF_EVENT(xfs_trans_read_buf_shut); |
| 341 | |
| 342 | /* not really buffer traces, but the buf provides useful information */ |
| 343 | DEFINE_BUF_EVENT(xfs_btree_corrupt); |
| 344 | DEFINE_BUF_EVENT(xfs_da_btree_corrupt); |
| 345 | DEFINE_BUF_EVENT(xfs_reset_dqcounts); |
| 346 | DEFINE_BUF_EVENT(xfs_inode_item_push); |
| 347 | |
| 348 | /* pass flags explicitly */ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 349 | DECLARE_EVENT_CLASS(xfs_buf_flags_class, |
| 350 | TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), |
| 351 | TP_ARGS(bp, flags, caller_ip), |
| 352 | TP_STRUCT__entry( |
| 353 | __field(dev_t, dev) |
| 354 | __field(xfs_daddr_t, bno) |
| 355 | __field(size_t, buffer_length) |
| 356 | __field(int, hold) |
| 357 | __field(int, pincount) |
| 358 | __field(unsigned, lockval) |
| 359 | __field(unsigned, flags) |
| 360 | __field(unsigned long, caller_ip) |
| 361 | ), |
| 362 | TP_fast_assign( |
| 363 | __entry->dev = bp->b_target->bt_dev; |
| 364 | __entry->bno = bp->b_bn; |
| 365 | __entry->buffer_length = bp->b_buffer_length; |
| 366 | __entry->flags = flags; |
| 367 | __entry->hold = atomic_read(&bp->b_hold); |
| 368 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 369 | __entry->lockval = xfs_buf_lock_value(bp); |
| 370 | __entry->caller_ip = caller_ip; |
| 371 | ), |
| 372 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 373 | "lock %d flags %s caller %pf", |
| 374 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 375 | (unsigned long long)__entry->bno, |
| 376 | __entry->buffer_length, |
| 377 | __entry->hold, |
| 378 | __entry->pincount, |
| 379 | __entry->lockval, |
| 380 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 381 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 382 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 383 | |
| 384 | #define DEFINE_BUF_FLAGS_EVENT(name) \ |
| 385 | DEFINE_EVENT(xfs_buf_flags_class, name, \ |
| 386 | TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \ |
| 387 | TP_ARGS(bp, flags, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 388 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_find); |
| 389 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_get); |
| 390 | DEFINE_BUF_FLAGS_EVENT(xfs_buf_read); |
| 391 | |
| 392 | TRACE_EVENT(xfs_buf_ioerror, |
| 393 | TP_PROTO(struct xfs_buf *bp, int error, unsigned long caller_ip), |
| 394 | TP_ARGS(bp, error, caller_ip), |
| 395 | TP_STRUCT__entry( |
| 396 | __field(dev_t, dev) |
| 397 | __field(xfs_daddr_t, bno) |
| 398 | __field(size_t, buffer_length) |
| 399 | __field(unsigned, flags) |
| 400 | __field(int, hold) |
| 401 | __field(int, pincount) |
| 402 | __field(unsigned, lockval) |
| 403 | __field(int, error) |
| 404 | __field(unsigned long, caller_ip) |
| 405 | ), |
| 406 | TP_fast_assign( |
| 407 | __entry->dev = bp->b_target->bt_dev; |
| 408 | __entry->bno = bp->b_bn; |
| 409 | __entry->buffer_length = bp->b_buffer_length; |
| 410 | __entry->hold = atomic_read(&bp->b_hold); |
| 411 | __entry->pincount = atomic_read(&bp->b_pin_count); |
| 412 | __entry->lockval = xfs_buf_lock_value(bp); |
| 413 | __entry->error = error; |
| 414 | __entry->flags = bp->b_flags; |
| 415 | __entry->caller_ip = caller_ip; |
| 416 | ), |
| 417 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 418 | "lock %d error %d flags %s caller %pf", |
| 419 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 420 | (unsigned long long)__entry->bno, |
| 421 | __entry->buffer_length, |
| 422 | __entry->hold, |
| 423 | __entry->pincount, |
| 424 | __entry->lockval, |
| 425 | __entry->error, |
| 426 | __print_flags(__entry->flags, "|", XFS_BUF_FLAGS), |
| 427 | (void *)__entry->caller_ip) |
| 428 | ); |
| 429 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 430 | DECLARE_EVENT_CLASS(xfs_buf_item_class, |
| 431 | TP_PROTO(struct xfs_buf_log_item *bip), |
| 432 | TP_ARGS(bip), |
| 433 | TP_STRUCT__entry( |
| 434 | __field(dev_t, dev) |
| 435 | __field(xfs_daddr_t, buf_bno) |
| 436 | __field(size_t, buf_len) |
| 437 | __field(int, buf_hold) |
| 438 | __field(int, buf_pincount) |
| 439 | __field(int, buf_lockval) |
| 440 | __field(unsigned, buf_flags) |
| 441 | __field(unsigned, bli_recur) |
| 442 | __field(int, bli_refcount) |
| 443 | __field(unsigned, bli_flags) |
| 444 | __field(void *, li_desc) |
| 445 | __field(unsigned, li_flags) |
| 446 | ), |
| 447 | TP_fast_assign( |
| 448 | __entry->dev = bip->bli_buf->b_target->bt_dev; |
| 449 | __entry->bli_flags = bip->bli_flags; |
| 450 | __entry->bli_recur = bip->bli_recur; |
| 451 | __entry->bli_refcount = atomic_read(&bip->bli_refcount); |
| 452 | __entry->buf_bno = bip->bli_buf->b_bn; |
| 453 | __entry->buf_len = bip->bli_buf->b_buffer_length; |
| 454 | __entry->buf_flags = bip->bli_buf->b_flags; |
| 455 | __entry->buf_hold = atomic_read(&bip->bli_buf->b_hold); |
| 456 | __entry->buf_pincount = atomic_read(&bip->bli_buf->b_pin_count); |
| 457 | __entry->buf_lockval = xfs_buf_lock_value(bip->bli_buf); |
| 458 | __entry->li_desc = bip->bli_item.li_desc; |
| 459 | __entry->li_flags = bip->bli_item.li_flags; |
| 460 | ), |
| 461 | TP_printk("dev %d:%d bno 0x%llx len 0x%zx hold %d pincount %d " |
| 462 | "lock %d flags %s recur %d refcount %d bliflags %s " |
| 463 | "lidesc 0x%p liflags %s", |
| 464 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 465 | (unsigned long long)__entry->buf_bno, |
| 466 | __entry->buf_len, |
| 467 | __entry->buf_hold, |
| 468 | __entry->buf_pincount, |
| 469 | __entry->buf_lockval, |
| 470 | __print_flags(__entry->buf_flags, "|", XFS_BUF_FLAGS), |
| 471 | __entry->bli_recur, |
| 472 | __entry->bli_refcount, |
| 473 | __print_flags(__entry->bli_flags, "|", XFS_BLI_FLAGS), |
| 474 | __entry->li_desc, |
| 475 | __print_flags(__entry->li_flags, "|", XFS_LI_FLAGS)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 476 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 477 | |
| 478 | #define DEFINE_BUF_ITEM_EVENT(name) \ |
| 479 | DEFINE_EVENT(xfs_buf_item_class, name, \ |
| 480 | TP_PROTO(struct xfs_buf_log_item *bip), \ |
| 481 | TP_ARGS(bip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 482 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size); |
| 483 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale); |
| 484 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format); |
| 485 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale); |
| 486 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin); |
| 487 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin); |
| 488 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale); |
| 489 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_trylock); |
| 490 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock); |
| 491 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale); |
| 492 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed); |
| 493 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push); |
Dave Chinner | d808f61 | 2010-02-02 10:13:42 +1100 | [diff] [blame] | 494 | DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 495 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf); |
| 496 | DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur); |
| 497 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb); |
| 498 | DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur); |
| 499 | DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf); |
| 500 | DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur); |
| 501 | DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf); |
| 502 | DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse); |
| 503 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin); |
| 504 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold); |
| 505 | DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release); |
| 506 | DEFINE_BUF_ITEM_EVENT(xfs_trans_binval); |
| 507 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 508 | DECLARE_EVENT_CLASS(xfs_lock_class, |
| 509 | TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, |
| 510 | unsigned long caller_ip), |
| 511 | TP_ARGS(ip, lock_flags, caller_ip), |
| 512 | TP_STRUCT__entry( |
| 513 | __field(dev_t, dev) |
| 514 | __field(xfs_ino_t, ino) |
| 515 | __field(int, lock_flags) |
| 516 | __field(unsigned long, caller_ip) |
| 517 | ), |
| 518 | TP_fast_assign( |
| 519 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 520 | __entry->ino = ip->i_ino; |
| 521 | __entry->lock_flags = lock_flags; |
| 522 | __entry->caller_ip = caller_ip; |
| 523 | ), |
| 524 | TP_printk("dev %d:%d ino 0x%llx flags %s caller %pf", |
| 525 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 526 | __entry->ino, |
| 527 | __print_flags(__entry->lock_flags, "|", XFS_LOCK_FLAGS), |
| 528 | (void *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 529 | ) |
| 530 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 531 | #define DEFINE_LOCK_EVENT(name) \ |
| 532 | DEFINE_EVENT(xfs_lock_class, name, \ |
| 533 | TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \ |
| 534 | unsigned long caller_ip), \ |
| 535 | TP_ARGS(ip, lock_flags, caller_ip)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 536 | DEFINE_LOCK_EVENT(xfs_ilock); |
| 537 | DEFINE_LOCK_EVENT(xfs_ilock_nowait); |
| 538 | DEFINE_LOCK_EVENT(xfs_ilock_demote); |
| 539 | DEFINE_LOCK_EVENT(xfs_iunlock); |
| 540 | |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 541 | DECLARE_EVENT_CLASS(xfs_inode_class, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 542 | TP_PROTO(struct xfs_inode *ip), |
| 543 | TP_ARGS(ip), |
| 544 | TP_STRUCT__entry( |
| 545 | __field(dev_t, dev) |
| 546 | __field(xfs_ino_t, ino) |
| 547 | ), |
| 548 | TP_fast_assign( |
| 549 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 550 | __entry->ino = ip->i_ino; |
| 551 | ), |
| 552 | TP_printk("dev %d:%d ino 0x%llx", |
| 553 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 554 | __entry->ino) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 555 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 556 | |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 557 | #define DEFINE_INODE_EVENT(name) \ |
| 558 | DEFINE_EVENT(xfs_inode_class, name, \ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 559 | TP_PROTO(struct xfs_inode *ip), \ |
| 560 | TP_ARGS(ip)) |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 561 | DEFINE_INODE_EVENT(xfs_iget_skip); |
| 562 | DEFINE_INODE_EVENT(xfs_iget_reclaim); |
| 563 | DEFINE_INODE_EVENT(xfs_iget_reclaim_fail); |
| 564 | DEFINE_INODE_EVENT(xfs_iget_hit); |
| 565 | DEFINE_INODE_EVENT(xfs_iget_miss); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 566 | |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 567 | DEFINE_INODE_EVENT(xfs_getattr); |
| 568 | DEFINE_INODE_EVENT(xfs_setattr); |
| 569 | DEFINE_INODE_EVENT(xfs_readlink); |
| 570 | DEFINE_INODE_EVENT(xfs_alloc_file_space); |
| 571 | DEFINE_INODE_EVENT(xfs_free_file_space); |
| 572 | DEFINE_INODE_EVENT(xfs_readdir); |
Tony Luck | 0f1a932 | 2010-07-20 17:54:41 +1000 | [diff] [blame] | 573 | #ifdef CONFIG_XFS_POSIX_ACL |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 574 | DEFINE_INODE_EVENT(xfs_check_acl); |
Tony Luck | 0f1a932 | 2010-07-20 17:54:41 +1000 | [diff] [blame] | 575 | #endif |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 576 | DEFINE_INODE_EVENT(xfs_vm_bmap); |
| 577 | DEFINE_INODE_EVENT(xfs_file_ioctl); |
| 578 | DEFINE_INODE_EVENT(xfs_file_compat_ioctl); |
| 579 | DEFINE_INODE_EVENT(xfs_ioctl_setattr); |
| 580 | DEFINE_INODE_EVENT(xfs_file_fsync); |
| 581 | DEFINE_INODE_EVENT(xfs_destroy_inode); |
| 582 | DEFINE_INODE_EVENT(xfs_write_inode); |
Al Viro | b57922d | 2010-06-07 14:34:48 -0400 | [diff] [blame] | 583 | DEFINE_INODE_EVENT(xfs_evict_inode); |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 584 | |
| 585 | DEFINE_INODE_EVENT(xfs_dquot_dqalloc); |
| 586 | DEFINE_INODE_EVENT(xfs_dquot_dqdetach); |
| 587 | |
| 588 | DECLARE_EVENT_CLASS(xfs_iref_class, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 589 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), |
| 590 | TP_ARGS(ip, caller_ip), |
| 591 | TP_STRUCT__entry( |
| 592 | __field(dev_t, dev) |
| 593 | __field(xfs_ino_t, ino) |
| 594 | __field(int, count) |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame] | 595 | __field(int, pincount) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 596 | __field(unsigned long, caller_ip) |
| 597 | ), |
| 598 | TP_fast_assign( |
| 599 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 600 | __entry->ino = ip->i_ino; |
| 601 | __entry->count = atomic_read(&VFS_I(ip)->i_count); |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame] | 602 | __entry->pincount = atomic_read(&ip->i_pincount); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 603 | __entry->caller_ip = caller_ip; |
| 604 | ), |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame] | 605 | 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] | 606 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 607 | __entry->ino, |
| 608 | __entry->count, |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame] | 609 | __entry->pincount, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 610 | (char *)__entry->caller_ip) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 611 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 612 | |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 613 | #define DEFINE_IREF_EVENT(name) \ |
| 614 | DEFINE_EVENT(xfs_iref_class, name, \ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 615 | TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \ |
| 616 | TP_ARGS(ip, caller_ip)) |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 617 | DEFINE_IREF_EVENT(xfs_ihold); |
| 618 | DEFINE_IREF_EVENT(xfs_irele); |
| 619 | DEFINE_IREF_EVENT(xfs_inode_pin); |
| 620 | DEFINE_IREF_EVENT(xfs_inode_unpin); |
| 621 | DEFINE_IREF_EVENT(xfs_inode_unpin_nowait); |
Dave Chinner | 4aaf15d | 2010-03-08 11:24:07 +1100 | [diff] [blame] | 622 | |
Christoph Hellwig | cca28fb | 2010-06-24 11:57:09 +1000 | [diff] [blame] | 623 | DECLARE_EVENT_CLASS(xfs_namespace_class, |
| 624 | TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), |
| 625 | TP_ARGS(dp, name), |
| 626 | TP_STRUCT__entry( |
| 627 | __field(dev_t, dev) |
| 628 | __field(xfs_ino_t, dp_ino) |
| 629 | __dynamic_array(char, name, name->len) |
| 630 | ), |
| 631 | TP_fast_assign( |
| 632 | __entry->dev = VFS_I(dp)->i_sb->s_dev; |
| 633 | __entry->dp_ino = dp->i_ino; |
| 634 | memcpy(__get_str(name), name->name, name->len); |
| 635 | ), |
| 636 | TP_printk("dev %d:%d dp ino 0x%llx name %s", |
| 637 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 638 | __entry->dp_ino, |
| 639 | __get_str(name)) |
| 640 | ) |
| 641 | |
| 642 | #define DEFINE_NAMESPACE_EVENT(name) \ |
| 643 | DEFINE_EVENT(xfs_namespace_class, name, \ |
| 644 | TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \ |
| 645 | TP_ARGS(dp, name)) |
| 646 | DEFINE_NAMESPACE_EVENT(xfs_remove); |
| 647 | DEFINE_NAMESPACE_EVENT(xfs_link); |
| 648 | DEFINE_NAMESPACE_EVENT(xfs_lookup); |
| 649 | DEFINE_NAMESPACE_EVENT(xfs_create); |
| 650 | DEFINE_NAMESPACE_EVENT(xfs_symlink); |
| 651 | |
| 652 | TRACE_EVENT(xfs_rename, |
| 653 | TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp, |
| 654 | struct xfs_name *src_name, struct xfs_name *target_name), |
| 655 | TP_ARGS(src_dp, target_dp, src_name, target_name), |
| 656 | TP_STRUCT__entry( |
| 657 | __field(dev_t, dev) |
| 658 | __field(xfs_ino_t, src_dp_ino) |
| 659 | __field(xfs_ino_t, target_dp_ino) |
| 660 | __dynamic_array(char, src_name, src_name->len) |
| 661 | __dynamic_array(char, target_name, target_name->len) |
| 662 | ), |
| 663 | TP_fast_assign( |
| 664 | __entry->dev = VFS_I(src_dp)->i_sb->s_dev; |
| 665 | __entry->src_dp_ino = src_dp->i_ino; |
| 666 | __entry->target_dp_ino = target_dp->i_ino; |
| 667 | memcpy(__get_str(src_name), src_name->name, src_name->len); |
| 668 | memcpy(__get_str(target_name), target_name->name, target_name->len); |
| 669 | ), |
| 670 | TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx" |
| 671 | " src name %s target name %s", |
| 672 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 673 | __entry->src_dp_ino, |
| 674 | __entry->target_dp_ino, |
| 675 | __get_str(src_name), |
| 676 | __get_str(target_name)) |
| 677 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 678 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 679 | DECLARE_EVENT_CLASS(xfs_dquot_class, |
| 680 | TP_PROTO(struct xfs_dquot *dqp), |
| 681 | TP_ARGS(dqp), |
| 682 | TP_STRUCT__entry( |
| 683 | __field(dev_t, dev) |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 684 | __field(u32, id) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 685 | __field(unsigned, flags) |
| 686 | __field(unsigned, nrefs) |
| 687 | __field(unsigned long long, res_bcount) |
| 688 | __field(unsigned long long, bcount) |
| 689 | __field(unsigned long long, icount) |
| 690 | __field(unsigned long long, blk_hardlimit) |
| 691 | __field(unsigned long long, blk_softlimit) |
| 692 | __field(unsigned long long, ino_hardlimit) |
| 693 | __field(unsigned long long, ino_softlimit) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 694 | ), \ |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 695 | TP_fast_assign( |
| 696 | __entry->dev = dqp->q_mount->m_super->s_dev; |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 697 | __entry->id = be32_to_cpu(dqp->q_core.d_id); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 698 | __entry->flags = dqp->dq_flags; |
| 699 | __entry->nrefs = dqp->q_nrefs; |
| 700 | __entry->res_bcount = dqp->q_res_bcount; |
| 701 | __entry->bcount = be64_to_cpu(dqp->q_core.d_bcount); |
| 702 | __entry->icount = be64_to_cpu(dqp->q_core.d_icount); |
| 703 | __entry->blk_hardlimit = |
| 704 | be64_to_cpu(dqp->q_core.d_blk_hardlimit); |
| 705 | __entry->blk_softlimit = |
| 706 | be64_to_cpu(dqp->q_core.d_blk_softlimit); |
| 707 | __entry->ino_hardlimit = |
| 708 | be64_to_cpu(dqp->q_core.d_ino_hardlimit); |
| 709 | __entry->ino_softlimit = |
| 710 | be64_to_cpu(dqp->q_core.d_ino_softlimit); |
| 711 | ), |
| 712 | 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] | 713 | "bcnt 0x%llx bhardlimit 0x%llx bsoftlimit 0x%llx " |
| 714 | "icnt 0x%llx ihardlimit 0x%llx isoftlimit 0x%llx]", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 715 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Christoph Hellwig | b262e5d | 2010-02-14 22:01:45 +0000 | [diff] [blame] | 716 | __entry->id, |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 717 | __print_flags(__entry->flags, "|", XFS_DQ_FLAGS), |
| 718 | __entry->nrefs, |
| 719 | __entry->res_bcount, |
| 720 | __entry->bcount, |
| 721 | __entry->blk_hardlimit, |
| 722 | __entry->blk_softlimit, |
| 723 | __entry->icount, |
| 724 | __entry->ino_hardlimit, |
| 725 | __entry->ino_softlimit) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 726 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 727 | |
| 728 | #define DEFINE_DQUOT_EVENT(name) \ |
| 729 | DEFINE_EVENT(xfs_dquot_class, name, \ |
| 730 | TP_PROTO(struct xfs_dquot *dqp), \ |
| 731 | TP_ARGS(dqp)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 732 | DEFINE_DQUOT_EVENT(xfs_dqadjust); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 733 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_want); |
| 734 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty); |
| 735 | DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink); |
| 736 | DEFINE_DQUOT_EVENT(xfs_dqattach_found); |
| 737 | DEFINE_DQUOT_EVENT(xfs_dqattach_get); |
| 738 | DEFINE_DQUOT_EVENT(xfs_dqinit); |
| 739 | DEFINE_DQUOT_EVENT(xfs_dqreuse); |
| 740 | DEFINE_DQUOT_EVENT(xfs_dqalloc); |
| 741 | DEFINE_DQUOT_EVENT(xfs_dqtobp_read); |
| 742 | DEFINE_DQUOT_EVENT(xfs_dqread); |
| 743 | DEFINE_DQUOT_EVENT(xfs_dqread_fail); |
| 744 | DEFINE_DQUOT_EVENT(xfs_dqlookup_found); |
| 745 | DEFINE_DQUOT_EVENT(xfs_dqlookup_want); |
| 746 | DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 747 | DEFINE_DQUOT_EVENT(xfs_dqlookup_done); |
| 748 | DEFINE_DQUOT_EVENT(xfs_dqget_hit); |
| 749 | DEFINE_DQUOT_EVENT(xfs_dqget_miss); |
| 750 | DEFINE_DQUOT_EVENT(xfs_dqput); |
| 751 | DEFINE_DQUOT_EVENT(xfs_dqput_wait); |
| 752 | DEFINE_DQUOT_EVENT(xfs_dqput_free); |
| 753 | DEFINE_DQUOT_EVENT(xfs_dqrele); |
| 754 | DEFINE_DQUOT_EVENT(xfs_dqflush); |
| 755 | DEFINE_DQUOT_EVENT(xfs_dqflush_force); |
| 756 | DEFINE_DQUOT_EVENT(xfs_dqflush_done); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 757 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 758 | DECLARE_EVENT_CLASS(xfs_loggrant_class, |
| 759 | TP_PROTO(struct log *log, struct xlog_ticket *tic), |
| 760 | TP_ARGS(log, tic), |
| 761 | TP_STRUCT__entry( |
| 762 | __field(dev_t, dev) |
| 763 | __field(unsigned, trans_type) |
| 764 | __field(char, ocnt) |
| 765 | __field(char, cnt) |
| 766 | __field(int, curr_res) |
| 767 | __field(int, unit_res) |
| 768 | __field(unsigned int, flags) |
Dave Chinner | 1054794 | 2010-12-21 12:02:25 +1100 | [diff] [blame] | 769 | __field(int, reserveq) |
| 770 | __field(int, writeq) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 771 | __field(int, grant_reserve_cycle) |
| 772 | __field(int, grant_reserve_bytes) |
| 773 | __field(int, grant_write_cycle) |
| 774 | __field(int, grant_write_bytes) |
| 775 | __field(int, curr_cycle) |
| 776 | __field(int, curr_block) |
| 777 | __field(xfs_lsn_t, tail_lsn) |
| 778 | ), |
| 779 | TP_fast_assign( |
| 780 | __entry->dev = log->l_mp->m_super->s_dev; |
| 781 | __entry->trans_type = tic->t_trans_type; |
| 782 | __entry->ocnt = tic->t_ocnt; |
| 783 | __entry->cnt = tic->t_cnt; |
| 784 | __entry->curr_res = tic->t_curr_res; |
| 785 | __entry->unit_res = tic->t_unit_res; |
| 786 | __entry->flags = tic->t_flags; |
Dave Chinner | 1054794 | 2010-12-21 12:02:25 +1100 | [diff] [blame] | 787 | __entry->reserveq = list_empty(&log->l_reserveq); |
| 788 | __entry->writeq = list_empty(&log->l_writeq); |
Dave Chinner | a69ed03 | 2010-12-21 12:08:20 +1100 | [diff] [blame] | 789 | xlog_crack_grant_head(&log->l_grant_reserve_head, |
| 790 | &__entry->grant_reserve_cycle, |
| 791 | &__entry->grant_reserve_bytes); |
| 792 | xlog_crack_grant_head(&log->l_grant_write_head, |
| 793 | &__entry->grant_write_cycle, |
| 794 | &__entry->grant_write_bytes); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 795 | __entry->curr_cycle = log->l_curr_cycle; |
| 796 | __entry->curr_block = log->l_curr_block; |
Dave Chinner | 1c3cb9e | 2010-12-21 12:28:39 +1100 | [diff] [blame] | 797 | __entry->tail_lsn = atomic64_read(&log->l_tail_lsn); |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 798 | ), |
| 799 | TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u " |
Dave Chinner | 1054794 | 2010-12-21 12:02:25 +1100 | [diff] [blame] | 800 | "t_unit_res %u t_flags %s reserveq %s " |
| 801 | "writeq %s grant_reserve_cycle %d " |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 802 | "grant_reserve_bytes %d grant_write_cycle %d " |
| 803 | "grant_write_bytes %d curr_cycle %d curr_block %d " |
| 804 | "tail_cycle %d tail_block %d", |
| 805 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 806 | __print_symbolic(__entry->trans_type, XFS_TRANS_TYPES), |
| 807 | __entry->ocnt, |
| 808 | __entry->cnt, |
| 809 | __entry->curr_res, |
| 810 | __entry->unit_res, |
| 811 | __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS), |
Dave Chinner | 1054794 | 2010-12-21 12:02:25 +1100 | [diff] [blame] | 812 | __entry->reserveq ? "empty" : "active", |
| 813 | __entry->writeq ? "empty" : "active", |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 814 | __entry->grant_reserve_cycle, |
| 815 | __entry->grant_reserve_bytes, |
| 816 | __entry->grant_write_cycle, |
| 817 | __entry->grant_write_bytes, |
| 818 | __entry->curr_cycle, |
| 819 | __entry->curr_block, |
| 820 | CYCLE_LSN(__entry->tail_lsn), |
| 821 | BLOCK_LSN(__entry->tail_lsn) |
| 822 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 823 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 824 | |
| 825 | #define DEFINE_LOGGRANT_EVENT(name) \ |
| 826 | DEFINE_EVENT(xfs_loggrant_class, name, \ |
| 827 | TP_PROTO(struct log *log, struct xlog_ticket *tic), \ |
| 828 | TP_ARGS(log, tic)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 829 | DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm); |
| 830 | DEFINE_LOGGRANT_EVENT(xfs_log_done_perm); |
| 831 | DEFINE_LOGGRANT_EVENT(xfs_log_reserve); |
| 832 | DEFINE_LOGGRANT_EVENT(xfs_log_umount_write); |
| 833 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_enter); |
| 834 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_exit); |
| 835 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_error); |
| 836 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep1); |
| 837 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake1); |
| 838 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep2); |
| 839 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake2); |
Dave Chinner | 3f16b98 | 2010-12-21 12:29:01 +1100 | [diff] [blame] | 840 | DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 841 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_enter); |
| 842 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_exit); |
| 843 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_error); |
| 844 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep1); |
| 845 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake1); |
| 846 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep2); |
| 847 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake2); |
Dave Chinner | 3f16b98 | 2010-12-21 12:29:01 +1100 | [diff] [blame] | 848 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake_up); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 849 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter); |
| 850 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit); |
| 851 | DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub); |
| 852 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter); |
| 853 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit); |
| 854 | DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub); |
| 855 | |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 856 | DECLARE_EVENT_CLASS(xfs_file_class, |
| 857 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), |
| 858 | TP_ARGS(ip, count, offset, flags), |
| 859 | TP_STRUCT__entry( |
| 860 | __field(dev_t, dev) |
| 861 | __field(xfs_ino_t, ino) |
| 862 | __field(xfs_fsize_t, size) |
| 863 | __field(xfs_fsize_t, new_size) |
| 864 | __field(loff_t, offset) |
| 865 | __field(size_t, count) |
| 866 | __field(int, flags) |
| 867 | ), |
| 868 | TP_fast_assign( |
| 869 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 870 | __entry->ino = ip->i_ino; |
| 871 | __entry->size = ip->i_d.di_size; |
| 872 | __entry->new_size = ip->i_new_size; |
| 873 | __entry->offset = offset; |
| 874 | __entry->count = count; |
| 875 | __entry->flags = flags; |
| 876 | ), |
| 877 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
| 878 | "offset 0x%llx count 0x%zx ioflags %s", |
| 879 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 880 | __entry->ino, |
| 881 | __entry->size, |
| 882 | __entry->new_size, |
| 883 | __entry->offset, |
| 884 | __entry->count, |
| 885 | __print_flags(__entry->flags, "|", XFS_IO_FLAGS)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 886 | ) |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 887 | |
| 888 | #define DEFINE_RW_EVENT(name) \ |
| 889 | DEFINE_EVENT(xfs_file_class, name, \ |
| 890 | TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags), \ |
| 891 | TP_ARGS(ip, count, offset, flags)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 892 | DEFINE_RW_EVENT(xfs_file_read); |
| 893 | DEFINE_RW_EVENT(xfs_file_buffered_write); |
| 894 | DEFINE_RW_EVENT(xfs_file_direct_write); |
| 895 | DEFINE_RW_EVENT(xfs_file_splice_read); |
| 896 | DEFINE_RW_EVENT(xfs_file_splice_write); |
| 897 | |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 898 | DECLARE_EVENT_CLASS(xfs_page_class, |
| 899 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), |
| 900 | TP_ARGS(inode, page, off), |
| 901 | TP_STRUCT__entry( |
| 902 | __field(dev_t, dev) |
| 903 | __field(xfs_ino_t, ino) |
| 904 | __field(pgoff_t, pgoff) |
| 905 | __field(loff_t, size) |
| 906 | __field(unsigned long, offset) |
| 907 | __field(int, delalloc) |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 908 | __field(int, unwritten) |
| 909 | ), |
| 910 | TP_fast_assign( |
Christoph Hellwig | 20cb52e | 2010-06-24 09:46:01 +1000 | [diff] [blame] | 911 | int delalloc = -1, unwritten = -1; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 912 | |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 913 | if (page_has_buffers(page)) |
Christoph Hellwig | 20cb52e | 2010-06-24 09:46:01 +1000 | [diff] [blame] | 914 | xfs_count_page_state(page, &delalloc, &unwritten); |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 915 | __entry->dev = inode->i_sb->s_dev; |
| 916 | __entry->ino = XFS_I(inode)->i_ino; |
| 917 | __entry->pgoff = page_offset(page); |
| 918 | __entry->size = i_size_read(inode); |
| 919 | __entry->offset = off; |
| 920 | __entry->delalloc = delalloc; |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 921 | __entry->unwritten = unwritten; |
| 922 | ), |
| 923 | TP_printk("dev %d:%d ino 0x%llx pgoff 0x%lx size 0x%llx offset %lx " |
Christoph Hellwig | 20cb52e | 2010-06-24 09:46:01 +1000 | [diff] [blame] | 924 | "delalloc %d unwritten %d", |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 925 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 926 | __entry->ino, |
| 927 | __entry->pgoff, |
| 928 | __entry->size, |
| 929 | __entry->offset, |
| 930 | __entry->delalloc, |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 931 | __entry->unwritten) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 932 | ) |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 933 | |
| 934 | #define DEFINE_PAGE_EVENT(name) \ |
| 935 | DEFINE_EVENT(xfs_page_class, name, \ |
| 936 | TP_PROTO(struct inode *inode, struct page *page, unsigned long off), \ |
| 937 | TP_ARGS(inode, page, off)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 938 | DEFINE_PAGE_EVENT(xfs_writepage); |
| 939 | DEFINE_PAGE_EVENT(xfs_releasepage); |
| 940 | DEFINE_PAGE_EVENT(xfs_invalidatepage); |
| 941 | |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 942 | DECLARE_EVENT_CLASS(xfs_imap_class, |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 943 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 944 | int type, struct xfs_bmbt_irec *irec), |
| 945 | TP_ARGS(ip, offset, count, type, irec), |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 946 | TP_STRUCT__entry( |
| 947 | __field(dev_t, dev) |
| 948 | __field(xfs_ino_t, ino) |
| 949 | __field(loff_t, size) |
| 950 | __field(loff_t, new_size) |
| 951 | __field(loff_t, offset) |
| 952 | __field(size_t, count) |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 953 | __field(int, type) |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 954 | __field(xfs_fileoff_t, startoff) |
| 955 | __field(xfs_fsblock_t, startblock) |
| 956 | __field(xfs_filblks_t, blockcount) |
| 957 | ), |
| 958 | TP_fast_assign( |
| 959 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 960 | __entry->ino = ip->i_ino; |
| 961 | __entry->size = ip->i_d.di_size; |
| 962 | __entry->new_size = ip->i_new_size; |
| 963 | __entry->offset = offset; |
| 964 | __entry->count = count; |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 965 | __entry->type = type; |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 966 | __entry->startoff = irec ? irec->br_startoff : 0; |
| 967 | __entry->startblock = irec ? irec->br_startblock : 0; |
| 968 | __entry->blockcount = irec ? irec->br_blockcount : 0; |
| 969 | ), |
| 970 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 971 | "offset 0x%llx count %zd type %s " |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 972 | "startoff 0x%llx startblock %lld blockcount 0x%llx", |
| 973 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 974 | __entry->ino, |
| 975 | __entry->size, |
| 976 | __entry->new_size, |
| 977 | __entry->offset, |
| 978 | __entry->count, |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 979 | __print_symbolic(__entry->type, XFS_IO_TYPES), |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 980 | __entry->startoff, |
| 981 | (__int64_t)__entry->startblock, |
| 982 | __entry->blockcount) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 983 | ) |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 984 | |
| 985 | #define DEFINE_IOMAP_EVENT(name) \ |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 986 | DEFINE_EVENT(xfs_imap_class, name, \ |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 987 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 988 | int type, struct xfs_bmbt_irec *irec), \ |
| 989 | TP_ARGS(ip, offset, count, type, irec)) |
| 990 | DEFINE_IOMAP_EVENT(xfs_map_blocks_found); |
| 991 | DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc); |
| 992 | DEFINE_IOMAP_EVENT(xfs_get_blocks_found); |
| 993 | DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 994 | |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 995 | DECLARE_EVENT_CLASS(xfs_simple_io_class, |
| 996 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), |
| 997 | TP_ARGS(ip, offset, count), |
| 998 | TP_STRUCT__entry( |
| 999 | __field(dev_t, dev) |
| 1000 | __field(xfs_ino_t, ino) |
| 1001 | __field(loff_t, size) |
| 1002 | __field(loff_t, new_size) |
| 1003 | __field(loff_t, offset) |
| 1004 | __field(size_t, count) |
| 1005 | ), |
| 1006 | TP_fast_assign( |
| 1007 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1008 | __entry->ino = ip->i_ino; |
| 1009 | __entry->size = ip->i_d.di_size; |
| 1010 | __entry->new_size = ip->i_new_size; |
| 1011 | __entry->offset = offset; |
| 1012 | __entry->count = count; |
| 1013 | ), |
| 1014 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
| 1015 | "offset 0x%llx count %zd", |
| 1016 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1017 | __entry->ino, |
| 1018 | __entry->size, |
| 1019 | __entry->new_size, |
| 1020 | __entry->offset, |
| 1021 | __entry->count) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1022 | ); |
Li Zefan | f8adb4d | 2010-05-24 08:25:57 +0000 | [diff] [blame] | 1023 | |
| 1024 | #define DEFINE_SIMPLE_IO_EVENT(name) \ |
| 1025 | DEFINE_EVENT(xfs_simple_io_class, name, \ |
| 1026 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), \ |
| 1027 | TP_ARGS(ip, offset, count)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1028 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); |
| 1029 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); |
Christoph Hellwig | a206c81 | 2010-12-10 08:42:20 +0000 | [diff] [blame] | 1030 | DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1031 | |
| 1032 | |
| 1033 | TRACE_EVENT(xfs_itruncate_start, |
| 1034 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size, int flag, |
| 1035 | xfs_off_t toss_start, xfs_off_t toss_finish), |
| 1036 | TP_ARGS(ip, new_size, flag, toss_start, toss_finish), |
| 1037 | TP_STRUCT__entry( |
| 1038 | __field(dev_t, dev) |
| 1039 | __field(xfs_ino_t, ino) |
| 1040 | __field(xfs_fsize_t, size) |
| 1041 | __field(xfs_fsize_t, new_size) |
| 1042 | __field(xfs_off_t, toss_start) |
| 1043 | __field(xfs_off_t, toss_finish) |
| 1044 | __field(int, flag) |
| 1045 | ), |
| 1046 | TP_fast_assign( |
| 1047 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1048 | __entry->ino = ip->i_ino; |
| 1049 | __entry->size = ip->i_d.di_size; |
| 1050 | __entry->new_size = new_size; |
| 1051 | __entry->toss_start = toss_start; |
| 1052 | __entry->toss_finish = toss_finish; |
| 1053 | __entry->flag = flag; |
| 1054 | ), |
| 1055 | TP_printk("dev %d:%d ino 0x%llx %s size 0x%llx new_size 0x%llx " |
| 1056 | "toss start 0x%llx toss finish 0x%llx", |
| 1057 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1058 | __entry->ino, |
| 1059 | __print_flags(__entry->flag, "|", XFS_ITRUNC_FLAGS), |
| 1060 | __entry->size, |
| 1061 | __entry->new_size, |
| 1062 | __entry->toss_start, |
| 1063 | __entry->toss_finish) |
| 1064 | ); |
| 1065 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1066 | DECLARE_EVENT_CLASS(xfs_itrunc_class, |
| 1067 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), |
| 1068 | TP_ARGS(ip, new_size), |
| 1069 | TP_STRUCT__entry( |
| 1070 | __field(dev_t, dev) |
| 1071 | __field(xfs_ino_t, ino) |
| 1072 | __field(xfs_fsize_t, size) |
| 1073 | __field(xfs_fsize_t, new_size) |
| 1074 | ), |
| 1075 | TP_fast_assign( |
| 1076 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1077 | __entry->ino = ip->i_ino; |
| 1078 | __entry->size = ip->i_d.di_size; |
| 1079 | __entry->new_size = new_size; |
| 1080 | ), |
| 1081 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx", |
| 1082 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1083 | __entry->ino, |
| 1084 | __entry->size, |
| 1085 | __entry->new_size) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1086 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1087 | |
| 1088 | #define DEFINE_ITRUNC_EVENT(name) \ |
| 1089 | DEFINE_EVENT(xfs_itrunc_class, name, \ |
| 1090 | TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \ |
| 1091 | TP_ARGS(ip, new_size)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1092 | DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_start); |
| 1093 | DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_end); |
| 1094 | |
| 1095 | TRACE_EVENT(xfs_pagecache_inval, |
| 1096 | TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish), |
| 1097 | TP_ARGS(ip, start, finish), |
| 1098 | TP_STRUCT__entry( |
| 1099 | __field(dev_t, dev) |
| 1100 | __field(xfs_ino_t, ino) |
| 1101 | __field(xfs_fsize_t, size) |
| 1102 | __field(xfs_off_t, start) |
| 1103 | __field(xfs_off_t, finish) |
| 1104 | ), |
| 1105 | TP_fast_assign( |
| 1106 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1107 | __entry->ino = ip->i_ino; |
| 1108 | __entry->size = ip->i_d.di_size; |
| 1109 | __entry->start = start; |
| 1110 | __entry->finish = finish; |
| 1111 | ), |
| 1112 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx start 0x%llx finish 0x%llx", |
| 1113 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1114 | __entry->ino, |
| 1115 | __entry->size, |
| 1116 | __entry->start, |
| 1117 | __entry->finish) |
| 1118 | ); |
| 1119 | |
| 1120 | TRACE_EVENT(xfs_bunmap, |
| 1121 | TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len, |
| 1122 | int flags, unsigned long caller_ip), |
| 1123 | TP_ARGS(ip, bno, len, flags, caller_ip), |
| 1124 | TP_STRUCT__entry( |
| 1125 | __field(dev_t, dev) |
| 1126 | __field(xfs_ino_t, ino) |
| 1127 | __field(xfs_fsize_t, size) |
| 1128 | __field(xfs_fileoff_t, bno) |
| 1129 | __field(xfs_filblks_t, len) |
| 1130 | __field(unsigned long, caller_ip) |
| 1131 | __field(int, flags) |
| 1132 | ), |
| 1133 | TP_fast_assign( |
| 1134 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1135 | __entry->ino = ip->i_ino; |
| 1136 | __entry->size = ip->i_d.di_size; |
| 1137 | __entry->bno = bno; |
| 1138 | __entry->len = len; |
| 1139 | __entry->caller_ip = caller_ip; |
| 1140 | __entry->flags = flags; |
| 1141 | ), |
| 1142 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx bno 0x%llx len 0x%llx" |
| 1143 | "flags %s caller %pf", |
| 1144 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1145 | __entry->ino, |
| 1146 | __entry->size, |
| 1147 | __entry->bno, |
| 1148 | __entry->len, |
| 1149 | __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS), |
| 1150 | (void *)__entry->caller_ip) |
| 1151 | |
| 1152 | ); |
| 1153 | |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1154 | #define XFS_BUSY_SYNC \ |
| 1155 | { 0, "async" }, \ |
| 1156 | { 1, "sync" } |
| 1157 | |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1158 | TRACE_EVENT(xfs_alloc_busy, |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1159 | TP_PROTO(struct xfs_trans *trans, xfs_agnumber_t agno, |
| 1160 | xfs_agblock_t agbno, xfs_extlen_t len, int sync), |
| 1161 | TP_ARGS(trans, agno, agbno, len, sync), |
| 1162 | TP_STRUCT__entry( |
| 1163 | __field(dev_t, dev) |
| 1164 | __field(struct xfs_trans *, tp) |
| 1165 | __field(int, tid) |
| 1166 | __field(xfs_agnumber_t, agno) |
| 1167 | __field(xfs_agblock_t, agbno) |
| 1168 | __field(xfs_extlen_t, len) |
| 1169 | __field(int, sync) |
| 1170 | ), |
| 1171 | TP_fast_assign( |
| 1172 | __entry->dev = trans->t_mountp->m_super->s_dev; |
| 1173 | __entry->tp = trans; |
| 1174 | __entry->tid = trans->t_ticket->t_tid; |
| 1175 | __entry->agno = agno; |
| 1176 | __entry->agbno = agbno; |
| 1177 | __entry->len = len; |
| 1178 | __entry->sync = sync; |
| 1179 | ), |
| 1180 | TP_printk("dev %d:%d trans 0x%p tid 0x%x agno %u agbno %u len %u %s", |
| 1181 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1182 | __entry->tp, |
| 1183 | __entry->tid, |
| 1184 | __entry->agno, |
| 1185 | __entry->agbno, |
| 1186 | __entry->len, |
| 1187 | __print_symbolic(__entry->sync, XFS_BUSY_SYNC)) |
| 1188 | |
| 1189 | ); |
| 1190 | |
| 1191 | TRACE_EVENT(xfs_alloc_unbusy, |
| 1192 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, |
| 1193 | xfs_agblock_t agbno, xfs_extlen_t len), |
| 1194 | TP_ARGS(mp, agno, agbno, len), |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1195 | TP_STRUCT__entry( |
| 1196 | __field(dev_t, dev) |
| 1197 | __field(xfs_agnumber_t, agno) |
| 1198 | __field(xfs_agblock_t, agbno) |
| 1199 | __field(xfs_extlen_t, len) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1200 | ), |
| 1201 | TP_fast_assign( |
| 1202 | __entry->dev = mp->m_super->s_dev; |
| 1203 | __entry->agno = agno; |
| 1204 | __entry->agbno = agbno; |
| 1205 | __entry->len = len; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1206 | ), |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1207 | TP_printk("dev %d:%d agno %u agbno %u len %u", |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1208 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1209 | __entry->agno, |
| 1210 | __entry->agbno, |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1211 | __entry->len) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1212 | ); |
| 1213 | |
| 1214 | #define XFS_BUSY_STATES \ |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1215 | { 0, "missing" }, \ |
| 1216 | { 1, "found" } |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1217 | |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1218 | TRACE_EVENT(xfs_alloc_busysearch, |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1219 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1220 | xfs_agblock_t agbno, xfs_extlen_t len, int found), |
| 1221 | TP_ARGS(mp, agno, agbno, len, found), |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1222 | TP_STRUCT__entry( |
| 1223 | __field(dev_t, dev) |
| 1224 | __field(xfs_agnumber_t, agno) |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1225 | __field(xfs_agblock_t, agbno) |
| 1226 | __field(xfs_extlen_t, len) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1227 | __field(int, found) |
| 1228 | ), |
| 1229 | TP_fast_assign( |
| 1230 | __entry->dev = mp->m_super->s_dev; |
| 1231 | __entry->agno = agno; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1232 | __entry->agbno = agbno; |
| 1233 | __entry->len = len; |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1234 | __entry->found = found; |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1235 | ), |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1236 | TP_printk("dev %d:%d agno %u agbno %u len %u %s", |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1237 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1238 | __entry->agno, |
| 1239 | __entry->agbno, |
| 1240 | __entry->len, |
Dave Chinner | ed3b4d6 | 2010-05-21 12:07:08 +1000 | [diff] [blame] | 1241 | __print_symbolic(__entry->found, XFS_BUSY_STATES)) |
| 1242 | ); |
| 1243 | |
| 1244 | TRACE_EVENT(xfs_trans_commit_lsn, |
| 1245 | TP_PROTO(struct xfs_trans *trans), |
| 1246 | TP_ARGS(trans), |
| 1247 | TP_STRUCT__entry( |
| 1248 | __field(dev_t, dev) |
| 1249 | __field(struct xfs_trans *, tp) |
| 1250 | __field(xfs_lsn_t, lsn) |
| 1251 | ), |
| 1252 | TP_fast_assign( |
| 1253 | __entry->dev = trans->t_mountp->m_super->s_dev; |
| 1254 | __entry->tp = trans; |
| 1255 | __entry->lsn = trans->t_commit_lsn; |
| 1256 | ), |
| 1257 | TP_printk("dev %d:%d trans 0x%p commit_lsn 0x%llx", |
| 1258 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1259 | __entry->tp, |
Dave Chinner | fd45e478 | 2010-01-02 02:38:56 +0000 | [diff] [blame] | 1260 | __entry->lsn) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1261 | ); |
| 1262 | |
| 1263 | TRACE_EVENT(xfs_agf, |
| 1264 | TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags, |
| 1265 | unsigned long caller_ip), |
| 1266 | TP_ARGS(mp, agf, flags, caller_ip), |
| 1267 | TP_STRUCT__entry( |
| 1268 | __field(dev_t, dev) |
| 1269 | __field(xfs_agnumber_t, agno) |
| 1270 | __field(int, flags) |
| 1271 | __field(__u32, length) |
| 1272 | __field(__u32, bno_root) |
| 1273 | __field(__u32, cnt_root) |
| 1274 | __field(__u32, bno_level) |
| 1275 | __field(__u32, cnt_level) |
| 1276 | __field(__u32, flfirst) |
| 1277 | __field(__u32, fllast) |
| 1278 | __field(__u32, flcount) |
| 1279 | __field(__u32, freeblks) |
| 1280 | __field(__u32, longest) |
| 1281 | __field(unsigned long, caller_ip) |
| 1282 | ), |
| 1283 | TP_fast_assign( |
| 1284 | __entry->dev = mp->m_super->s_dev; |
| 1285 | __entry->agno = be32_to_cpu(agf->agf_seqno), |
| 1286 | __entry->flags = flags; |
| 1287 | __entry->length = be32_to_cpu(agf->agf_length), |
| 1288 | __entry->bno_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]), |
| 1289 | __entry->cnt_root = be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]), |
| 1290 | __entry->bno_level = |
| 1291 | be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]), |
| 1292 | __entry->cnt_level = |
| 1293 | be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]), |
| 1294 | __entry->flfirst = be32_to_cpu(agf->agf_flfirst), |
| 1295 | __entry->fllast = be32_to_cpu(agf->agf_fllast), |
| 1296 | __entry->flcount = be32_to_cpu(agf->agf_flcount), |
| 1297 | __entry->freeblks = be32_to_cpu(agf->agf_freeblks), |
| 1298 | __entry->longest = be32_to_cpu(agf->agf_longest); |
| 1299 | __entry->caller_ip = caller_ip; |
| 1300 | ), |
| 1301 | TP_printk("dev %d:%d agno %u flags %s length %u roots b %u c %u " |
| 1302 | "levels b %u c %u flfirst %u fllast %u flcount %u " |
| 1303 | "freeblks %u longest %u caller %pf", |
| 1304 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1305 | __entry->agno, |
| 1306 | __print_flags(__entry->flags, "|", XFS_AGF_FLAGS), |
| 1307 | __entry->length, |
| 1308 | __entry->bno_root, |
| 1309 | __entry->cnt_root, |
| 1310 | __entry->bno_level, |
| 1311 | __entry->cnt_level, |
| 1312 | __entry->flfirst, |
| 1313 | __entry->fllast, |
| 1314 | __entry->flcount, |
| 1315 | __entry->freeblks, |
| 1316 | __entry->longest, |
| 1317 | (void *)__entry->caller_ip) |
| 1318 | ); |
| 1319 | |
| 1320 | TRACE_EVENT(xfs_free_extent, |
| 1321 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno, |
| 1322 | xfs_extlen_t len, bool isfl, int haveleft, int haveright), |
| 1323 | TP_ARGS(mp, agno, agbno, len, isfl, haveleft, haveright), |
| 1324 | TP_STRUCT__entry( |
| 1325 | __field(dev_t, dev) |
| 1326 | __field(xfs_agnumber_t, agno) |
| 1327 | __field(xfs_agblock_t, agbno) |
| 1328 | __field(xfs_extlen_t, len) |
| 1329 | __field(int, isfl) |
| 1330 | __field(int, haveleft) |
| 1331 | __field(int, haveright) |
| 1332 | ), |
| 1333 | TP_fast_assign( |
| 1334 | __entry->dev = mp->m_super->s_dev; |
| 1335 | __entry->agno = agno; |
| 1336 | __entry->agbno = agbno; |
| 1337 | __entry->len = len; |
| 1338 | __entry->isfl = isfl; |
| 1339 | __entry->haveleft = haveleft; |
| 1340 | __entry->haveright = haveright; |
| 1341 | ), |
| 1342 | TP_printk("dev %d:%d agno %u agbno %u len %u isfl %d %s", |
| 1343 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1344 | __entry->agno, |
| 1345 | __entry->agbno, |
| 1346 | __entry->len, |
| 1347 | __entry->isfl, |
| 1348 | __entry->haveleft ? |
| 1349 | (__entry->haveright ? "both" : "left") : |
| 1350 | (__entry->haveright ? "right" : "none")) |
| 1351 | |
| 1352 | ); |
| 1353 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1354 | DECLARE_EVENT_CLASS(xfs_alloc_class, |
| 1355 | TP_PROTO(struct xfs_alloc_arg *args), |
| 1356 | TP_ARGS(args), |
| 1357 | TP_STRUCT__entry( |
| 1358 | __field(dev_t, dev) |
| 1359 | __field(xfs_agnumber_t, agno) |
| 1360 | __field(xfs_agblock_t, agbno) |
| 1361 | __field(xfs_extlen_t, minlen) |
| 1362 | __field(xfs_extlen_t, maxlen) |
| 1363 | __field(xfs_extlen_t, mod) |
| 1364 | __field(xfs_extlen_t, prod) |
| 1365 | __field(xfs_extlen_t, minleft) |
| 1366 | __field(xfs_extlen_t, total) |
| 1367 | __field(xfs_extlen_t, alignment) |
| 1368 | __field(xfs_extlen_t, minalignslop) |
| 1369 | __field(xfs_extlen_t, len) |
| 1370 | __field(short, type) |
| 1371 | __field(short, otype) |
| 1372 | __field(char, wasdel) |
| 1373 | __field(char, wasfromfl) |
| 1374 | __field(char, isfl) |
| 1375 | __field(char, userdata) |
| 1376 | __field(xfs_fsblock_t, firstblock) |
| 1377 | ), |
| 1378 | TP_fast_assign( |
| 1379 | __entry->dev = args->mp->m_super->s_dev; |
| 1380 | __entry->agno = args->agno; |
| 1381 | __entry->agbno = args->agbno; |
| 1382 | __entry->minlen = args->minlen; |
| 1383 | __entry->maxlen = args->maxlen; |
| 1384 | __entry->mod = args->mod; |
| 1385 | __entry->prod = args->prod; |
| 1386 | __entry->minleft = args->minleft; |
| 1387 | __entry->total = args->total; |
| 1388 | __entry->alignment = args->alignment; |
| 1389 | __entry->minalignslop = args->minalignslop; |
| 1390 | __entry->len = args->len; |
| 1391 | __entry->type = args->type; |
| 1392 | __entry->otype = args->otype; |
| 1393 | __entry->wasdel = args->wasdel; |
| 1394 | __entry->wasfromfl = args->wasfromfl; |
| 1395 | __entry->isfl = args->isfl; |
| 1396 | __entry->userdata = args->userdata; |
| 1397 | __entry->firstblock = args->firstblock; |
| 1398 | ), |
| 1399 | TP_printk("dev %d:%d agno %u agbno %u minlen %u maxlen %u mod %u " |
| 1400 | "prod %u minleft %u total %u alignment %u minalignslop %u " |
| 1401 | "len %u type %s otype %s wasdel %d wasfromfl %d isfl %d " |
| 1402 | "userdata %d firstblock 0x%llx", |
| 1403 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1404 | __entry->agno, |
| 1405 | __entry->agbno, |
| 1406 | __entry->minlen, |
| 1407 | __entry->maxlen, |
| 1408 | __entry->mod, |
| 1409 | __entry->prod, |
| 1410 | __entry->minleft, |
| 1411 | __entry->total, |
| 1412 | __entry->alignment, |
| 1413 | __entry->minalignslop, |
| 1414 | __entry->len, |
| 1415 | __print_symbolic(__entry->type, XFS_ALLOC_TYPES), |
| 1416 | __print_symbolic(__entry->otype, XFS_ALLOC_TYPES), |
| 1417 | __entry->wasdel, |
| 1418 | __entry->wasfromfl, |
| 1419 | __entry->isfl, |
| 1420 | __entry->userdata, |
| 1421 | __entry->firstblock) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1422 | ) |
| 1423 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1424 | #define DEFINE_ALLOC_EVENT(name) \ |
| 1425 | DEFINE_EVENT(xfs_alloc_class, name, \ |
| 1426 | TP_PROTO(struct xfs_alloc_arg *args), \ |
| 1427 | TP_ARGS(args)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1428 | DEFINE_ALLOC_EVENT(xfs_alloc_exact_done); |
Christoph Hellwig | 9f9baab | 2010-12-10 15:03:57 +0000 | [diff] [blame] | 1429 | DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1430 | DEFINE_ALLOC_EVENT(xfs_alloc_exact_error); |
| 1431 | DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft); |
| 1432 | DEFINE_ALLOC_EVENT(xfs_alloc_near_first); |
| 1433 | DEFINE_ALLOC_EVENT(xfs_alloc_near_greater); |
| 1434 | DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser); |
| 1435 | DEFINE_ALLOC_EVENT(xfs_alloc_near_error); |
| 1436 | DEFINE_ALLOC_EVENT(xfs_alloc_size_neither); |
| 1437 | DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry); |
| 1438 | DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft); |
| 1439 | DEFINE_ALLOC_EVENT(xfs_alloc_size_done); |
| 1440 | DEFINE_ALLOC_EVENT(xfs_alloc_size_error); |
| 1441 | DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist); |
| 1442 | DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough); |
| 1443 | DEFINE_ALLOC_EVENT(xfs_alloc_small_done); |
| 1444 | DEFINE_ALLOC_EVENT(xfs_alloc_small_error); |
| 1445 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs); |
| 1446 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix); |
| 1447 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp); |
| 1448 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed); |
| 1449 | DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed); |
| 1450 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1451 | DECLARE_EVENT_CLASS(xfs_dir2_class, |
| 1452 | TP_PROTO(struct xfs_da_args *args), |
| 1453 | TP_ARGS(args), |
| 1454 | TP_STRUCT__entry( |
| 1455 | __field(dev_t, dev) |
| 1456 | __field(xfs_ino_t, ino) |
| 1457 | __dynamic_array(char, name, args->namelen) |
| 1458 | __field(int, namelen) |
| 1459 | __field(xfs_dahash_t, hashval) |
| 1460 | __field(xfs_ino_t, inumber) |
| 1461 | __field(int, op_flags) |
| 1462 | ), |
| 1463 | TP_fast_assign( |
| 1464 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1465 | __entry->ino = args->dp->i_ino; |
| 1466 | if (args->namelen) |
| 1467 | memcpy(__get_str(name), args->name, args->namelen); |
| 1468 | __entry->namelen = args->namelen; |
| 1469 | __entry->hashval = args->hashval; |
| 1470 | __entry->inumber = args->inumber; |
| 1471 | __entry->op_flags = args->op_flags; |
| 1472 | ), |
| 1473 | TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x " |
| 1474 | "inumber 0x%llx op_flags %s", |
| 1475 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1476 | __entry->ino, |
| 1477 | __entry->namelen, |
| 1478 | __entry->namelen ? __get_str(name) : NULL, |
| 1479 | __entry->namelen, |
| 1480 | __entry->hashval, |
| 1481 | __entry->inumber, |
| 1482 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS)) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1483 | ) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1484 | |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1485 | #define DEFINE_DIR2_EVENT(name) \ |
| 1486 | DEFINE_EVENT(xfs_dir2_class, name, \ |
| 1487 | TP_PROTO(struct xfs_da_args *args), \ |
| 1488 | TP_ARGS(args)) |
| 1489 | DEFINE_DIR2_EVENT(xfs_dir2_sf_addname); |
| 1490 | DEFINE_DIR2_EVENT(xfs_dir2_sf_create); |
| 1491 | DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup); |
| 1492 | DEFINE_DIR2_EVENT(xfs_dir2_sf_replace); |
| 1493 | DEFINE_DIR2_EVENT(xfs_dir2_sf_removename); |
| 1494 | DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4); |
| 1495 | DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8); |
| 1496 | DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block); |
| 1497 | DEFINE_DIR2_EVENT(xfs_dir2_block_addname); |
| 1498 | DEFINE_DIR2_EVENT(xfs_dir2_block_lookup); |
| 1499 | DEFINE_DIR2_EVENT(xfs_dir2_block_replace); |
| 1500 | DEFINE_DIR2_EVENT(xfs_dir2_block_removename); |
| 1501 | DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf); |
| 1502 | DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf); |
| 1503 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname); |
| 1504 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup); |
| 1505 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace); |
| 1506 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename); |
| 1507 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block); |
| 1508 | DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node); |
| 1509 | DEFINE_DIR2_EVENT(xfs_dir2_node_addname); |
| 1510 | DEFINE_DIR2_EVENT(xfs_dir2_node_lookup); |
| 1511 | DEFINE_DIR2_EVENT(xfs_dir2_node_replace); |
| 1512 | DEFINE_DIR2_EVENT(xfs_dir2_node_removename); |
| 1513 | DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf); |
| 1514 | |
| 1515 | DECLARE_EVENT_CLASS(xfs_dir2_space_class, |
| 1516 | TP_PROTO(struct xfs_da_args *args, int idx), |
| 1517 | TP_ARGS(args, idx), |
| 1518 | TP_STRUCT__entry( |
| 1519 | __field(dev_t, dev) |
| 1520 | __field(xfs_ino_t, ino) |
| 1521 | __field(int, op_flags) |
| 1522 | __field(int, idx) |
| 1523 | ), |
| 1524 | TP_fast_assign( |
| 1525 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1526 | __entry->ino = args->dp->i_ino; |
| 1527 | __entry->op_flags = args->op_flags; |
| 1528 | __entry->idx = idx; |
| 1529 | ), |
| 1530 | TP_printk("dev %d:%d ino 0x%llx op_flags %s index %d", |
| 1531 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1532 | __entry->ino, |
| 1533 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS), |
| 1534 | __entry->idx) |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1535 | ) |
Christoph Hellwig | ea9a488 | 2009-12-21 14:03:03 +0000 | [diff] [blame] | 1536 | |
| 1537 | #define DEFINE_DIR2_SPACE_EVENT(name) \ |
| 1538 | DEFINE_EVENT(xfs_dir2_space_class, name, \ |
| 1539 | TP_PROTO(struct xfs_da_args *args, int idx), \ |
| 1540 | TP_ARGS(args, idx)) |
| 1541 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add); |
| 1542 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove); |
| 1543 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode); |
| 1544 | DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode); |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1545 | |
| 1546 | TRACE_EVENT(xfs_dir2_leafn_moveents, |
| 1547 | TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count), |
| 1548 | TP_ARGS(args, src_idx, dst_idx, count), |
| 1549 | TP_STRUCT__entry( |
| 1550 | __field(dev_t, dev) |
| 1551 | __field(xfs_ino_t, ino) |
| 1552 | __field(int, op_flags) |
| 1553 | __field(int, src_idx) |
| 1554 | __field(int, dst_idx) |
| 1555 | __field(int, count) |
| 1556 | ), |
| 1557 | TP_fast_assign( |
| 1558 | __entry->dev = VFS_I(args->dp)->i_sb->s_dev; |
| 1559 | __entry->ino = args->dp->i_ino; |
| 1560 | __entry->op_flags = args->op_flags; |
| 1561 | __entry->src_idx = src_idx; |
| 1562 | __entry->dst_idx = dst_idx; |
| 1563 | __entry->count = count; |
| 1564 | ), |
| 1565 | TP_printk("dev %d:%d ino 0x%llx op_flags %s " |
| 1566 | "src_idx %d dst_idx %d count %d", |
| 1567 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1568 | __entry->ino, |
| 1569 | __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS), |
| 1570 | __entry->src_idx, |
| 1571 | __entry->dst_idx, |
| 1572 | __entry->count) |
| 1573 | ); |
| 1574 | |
Dave Chinner | 3a85cd9 | 2010-01-14 01:33:55 +0000 | [diff] [blame] | 1575 | #define XFS_SWAPEXT_INODES \ |
| 1576 | { 0, "target" }, \ |
| 1577 | { 1, "temp" } |
| 1578 | |
| 1579 | #define XFS_INODE_FORMAT_STR \ |
| 1580 | { 0, "invalid" }, \ |
| 1581 | { 1, "local" }, \ |
| 1582 | { 2, "extent" }, \ |
| 1583 | { 3, "btree" } |
| 1584 | |
| 1585 | DECLARE_EVENT_CLASS(xfs_swap_extent_class, |
| 1586 | TP_PROTO(struct xfs_inode *ip, int which), |
| 1587 | TP_ARGS(ip, which), |
| 1588 | TP_STRUCT__entry( |
| 1589 | __field(dev_t, dev) |
| 1590 | __field(int, which) |
| 1591 | __field(xfs_ino_t, ino) |
| 1592 | __field(int, format) |
| 1593 | __field(int, nex) |
| 1594 | __field(int, max_nex) |
| 1595 | __field(int, broot_size) |
| 1596 | __field(int, fork_off) |
| 1597 | ), |
| 1598 | TP_fast_assign( |
| 1599 | __entry->dev = VFS_I(ip)->i_sb->s_dev; |
| 1600 | __entry->which = which; |
| 1601 | __entry->ino = ip->i_ino; |
| 1602 | __entry->format = ip->i_d.di_format; |
| 1603 | __entry->nex = ip->i_d.di_nextents; |
| 1604 | __entry->max_nex = ip->i_df.if_ext_max; |
| 1605 | __entry->broot_size = ip->i_df.if_broot_bytes; |
| 1606 | __entry->fork_off = XFS_IFORK_BOFF(ip); |
| 1607 | ), |
| 1608 | TP_printk("dev %d:%d ino 0x%llx (%s), %s format, num_extents %d, " |
| 1609 | "Max in-fork extents %d, broot size %d, fork offset %d", |
| 1610 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1611 | __entry->ino, |
| 1612 | __print_symbolic(__entry->which, XFS_SWAPEXT_INODES), |
| 1613 | __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR), |
| 1614 | __entry->nex, |
| 1615 | __entry->max_nex, |
| 1616 | __entry->broot_size, |
| 1617 | __entry->fork_off) |
| 1618 | ) |
| 1619 | |
| 1620 | #define DEFINE_SWAPEXT_EVENT(name) \ |
| 1621 | DEFINE_EVENT(xfs_swap_extent_class, name, \ |
| 1622 | TP_PROTO(struct xfs_inode *ip, int which), \ |
| 1623 | TP_ARGS(ip, which)) |
| 1624 | |
| 1625 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before); |
| 1626 | DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after); |
| 1627 | |
Dave Chinner | 9abbc53 | 2010-04-13 15:06:46 +1000 | [diff] [blame] | 1628 | DECLARE_EVENT_CLASS(xfs_log_recover_item_class, |
| 1629 | TP_PROTO(struct log *log, struct xlog_recover *trans, |
| 1630 | struct xlog_recover_item *item, int pass), |
| 1631 | TP_ARGS(log, trans, item, pass), |
| 1632 | TP_STRUCT__entry( |
| 1633 | __field(dev_t, dev) |
| 1634 | __field(unsigned long, item) |
| 1635 | __field(xlog_tid_t, tid) |
| 1636 | __field(int, type) |
| 1637 | __field(int, pass) |
| 1638 | __field(int, count) |
| 1639 | __field(int, total) |
| 1640 | ), |
| 1641 | TP_fast_assign( |
| 1642 | __entry->dev = log->l_mp->m_super->s_dev; |
| 1643 | __entry->item = (unsigned long)item; |
| 1644 | __entry->tid = trans->r_log_tid; |
| 1645 | __entry->type = ITEM_TYPE(item); |
| 1646 | __entry->pass = pass; |
| 1647 | __entry->count = item->ri_cnt; |
| 1648 | __entry->total = item->ri_total; |
| 1649 | ), |
| 1650 | TP_printk("dev %d:%d trans 0x%x, pass %d, item 0x%p, item type %s " |
| 1651 | "item region count/total %d/%d", |
| 1652 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1653 | __entry->tid, |
| 1654 | __entry->pass, |
| 1655 | (void *)__entry->item, |
| 1656 | __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), |
| 1657 | __entry->count, |
| 1658 | __entry->total) |
| 1659 | ) |
| 1660 | |
| 1661 | #define DEFINE_LOG_RECOVER_ITEM(name) \ |
| 1662 | DEFINE_EVENT(xfs_log_recover_item_class, name, \ |
| 1663 | TP_PROTO(struct log *log, struct xlog_recover *trans, \ |
| 1664 | struct xlog_recover_item *item, int pass), \ |
| 1665 | TP_ARGS(log, trans, item, pass)) |
| 1666 | |
| 1667 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add); |
| 1668 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont); |
| 1669 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head); |
| 1670 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail); |
| 1671 | DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover); |
| 1672 | |
| 1673 | DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class, |
| 1674 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), |
| 1675 | TP_ARGS(log, buf_f), |
| 1676 | TP_STRUCT__entry( |
| 1677 | __field(dev_t, dev) |
| 1678 | __field(__int64_t, blkno) |
| 1679 | __field(unsigned short, len) |
| 1680 | __field(unsigned short, flags) |
| 1681 | __field(unsigned short, size) |
| 1682 | __field(unsigned int, map_size) |
| 1683 | ), |
| 1684 | TP_fast_assign( |
| 1685 | __entry->dev = log->l_mp->m_super->s_dev; |
| 1686 | __entry->blkno = buf_f->blf_blkno; |
| 1687 | __entry->len = buf_f->blf_len; |
| 1688 | __entry->flags = buf_f->blf_flags; |
| 1689 | __entry->size = buf_f->blf_size; |
| 1690 | __entry->map_size = buf_f->blf_map_size; |
| 1691 | ), |
| 1692 | TP_printk("dev %d:%d blkno 0x%llx, len %u, flags 0x%x, size %d, " |
| 1693 | "map_size %d", |
| 1694 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1695 | __entry->blkno, |
| 1696 | __entry->len, |
| 1697 | __entry->flags, |
| 1698 | __entry->size, |
| 1699 | __entry->map_size) |
| 1700 | ) |
| 1701 | |
| 1702 | #define DEFINE_LOG_RECOVER_BUF_ITEM(name) \ |
| 1703 | DEFINE_EVENT(xfs_log_recover_buf_item_class, name, \ |
| 1704 | TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \ |
| 1705 | TP_ARGS(log, buf_f)) |
| 1706 | |
| 1707 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel); |
| 1708 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel); |
| 1709 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add); |
| 1710 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc); |
| 1711 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover); |
| 1712 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf); |
| 1713 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf); |
| 1714 | DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf); |
| 1715 | |
| 1716 | DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class, |
| 1717 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), |
| 1718 | TP_ARGS(log, in_f), |
| 1719 | TP_STRUCT__entry( |
| 1720 | __field(dev_t, dev) |
| 1721 | __field(xfs_ino_t, ino) |
| 1722 | __field(unsigned short, size) |
| 1723 | __field(int, fields) |
| 1724 | __field(unsigned short, asize) |
| 1725 | __field(unsigned short, dsize) |
| 1726 | __field(__int64_t, blkno) |
| 1727 | __field(int, len) |
| 1728 | __field(int, boffset) |
| 1729 | ), |
| 1730 | TP_fast_assign( |
| 1731 | __entry->dev = log->l_mp->m_super->s_dev; |
| 1732 | __entry->ino = in_f->ilf_ino; |
| 1733 | __entry->size = in_f->ilf_size; |
| 1734 | __entry->fields = in_f->ilf_fields; |
| 1735 | __entry->asize = in_f->ilf_asize; |
| 1736 | __entry->dsize = in_f->ilf_dsize; |
| 1737 | __entry->blkno = in_f->ilf_blkno; |
| 1738 | __entry->len = in_f->ilf_len; |
| 1739 | __entry->boffset = in_f->ilf_boffset; |
| 1740 | ), |
| 1741 | TP_printk("dev %d:%d ino 0x%llx, size %u, fields 0x%x, asize %d, " |
| 1742 | "dsize %d, blkno 0x%llx, len %d, boffset %d", |
| 1743 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1744 | __entry->ino, |
| 1745 | __entry->size, |
| 1746 | __entry->fields, |
| 1747 | __entry->asize, |
| 1748 | __entry->dsize, |
| 1749 | __entry->blkno, |
| 1750 | __entry->len, |
| 1751 | __entry->boffset) |
| 1752 | ) |
| 1753 | #define DEFINE_LOG_RECOVER_INO_ITEM(name) \ |
| 1754 | DEFINE_EVENT(xfs_log_recover_ino_item_class, name, \ |
| 1755 | TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \ |
| 1756 | TP_ARGS(log, in_f)) |
| 1757 | |
| 1758 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover); |
| 1759 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel); |
| 1760 | DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip); |
| 1761 | |
Christoph Hellwig | a46db60 | 2011-01-07 13:02:04 +0000 | [diff] [blame^] | 1762 | DECLARE_EVENT_CLASS(xfs_discard_class, |
| 1763 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, |
| 1764 | xfs_agblock_t agbno, xfs_extlen_t len), |
| 1765 | TP_ARGS(mp, agno, agbno, len), |
| 1766 | TP_STRUCT__entry( |
| 1767 | __field(dev_t, dev) |
| 1768 | __field(xfs_agnumber_t, agno) |
| 1769 | __field(xfs_agblock_t, agbno) |
| 1770 | __field(xfs_extlen_t, len) |
| 1771 | ), |
| 1772 | TP_fast_assign( |
| 1773 | __entry->dev = mp->m_super->s_dev; |
| 1774 | __entry->agno = agno; |
| 1775 | __entry->agbno = agbno; |
| 1776 | __entry->len = len; |
| 1777 | ), |
| 1778 | TP_printk("dev %d:%d agno %u agbno %u len %u\n", |
| 1779 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1780 | __entry->agno, |
| 1781 | __entry->agbno, |
| 1782 | __entry->len) |
| 1783 | ) |
| 1784 | |
| 1785 | #define DEFINE_DISCARD_EVENT(name) \ |
| 1786 | DEFINE_EVENT(xfs_discard_class, name, \ |
| 1787 | TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \ |
| 1788 | xfs_agblock_t agbno, xfs_extlen_t len), \ |
| 1789 | TP_ARGS(mp, agno, agbno, len)) |
| 1790 | DEFINE_DISCARD_EVENT(xfs_discard_extent); |
| 1791 | DEFINE_DISCARD_EVENT(xfs_discard_toosmall); |
| 1792 | DEFINE_DISCARD_EVENT(xfs_discard_exclude); |
| 1793 | DEFINE_DISCARD_EVENT(xfs_discard_busy); |
| 1794 | |
Christoph Hellwig | 0b1b213 | 2009-12-14 23:14:59 +0000 | [diff] [blame] | 1795 | #endif /* _TRACE_XFS_H */ |
| 1796 | |
| 1797 | #undef TRACE_INCLUDE_PATH |
| 1798 | #define TRACE_INCLUDE_PATH . |
| 1799 | #define TRACE_INCLUDE_FILE xfs_trace |
| 1800 | #include <trace/define_trace.h> |