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