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