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