Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM f2fs |
| 3 | |
| 4 | #if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_F2FS_H |
| 6 | |
| 7 | #include <linux/tracepoint.h> |
| 8 | |
| 9 | #define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev) |
| 10 | #define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 11 | |
Steven Rostedt (Red Hat) | 5511b9a | 2015-03-27 16:18:07 -0400 | [diff] [blame] | 12 | TRACE_DEFINE_ENUM(NODE); |
| 13 | TRACE_DEFINE_ENUM(DATA); |
| 14 | TRACE_DEFINE_ENUM(META); |
| 15 | TRACE_DEFINE_ENUM(META_FLUSH); |
Jaegeuk Kim | 5d79988 | 2015-04-22 16:07:38 -0700 | [diff] [blame] | 16 | TRACE_DEFINE_ENUM(INMEM); |
| 17 | TRACE_DEFINE_ENUM(INMEM_DROP); |
| 18 | TRACE_DEFINE_ENUM(IPU); |
| 19 | TRACE_DEFINE_ENUM(OPU); |
Steven Rostedt (Red Hat) | 5511b9a | 2015-03-27 16:18:07 -0400 | [diff] [blame] | 20 | TRACE_DEFINE_ENUM(CURSEG_HOT_DATA); |
| 21 | TRACE_DEFINE_ENUM(CURSEG_WARM_DATA); |
| 22 | TRACE_DEFINE_ENUM(CURSEG_COLD_DATA); |
| 23 | TRACE_DEFINE_ENUM(CURSEG_HOT_NODE); |
| 24 | TRACE_DEFINE_ENUM(CURSEG_WARM_NODE); |
| 25 | TRACE_DEFINE_ENUM(CURSEG_COLD_NODE); |
| 26 | TRACE_DEFINE_ENUM(NO_CHECK_TYPE); |
| 27 | TRACE_DEFINE_ENUM(GC_GREEDY); |
| 28 | TRACE_DEFINE_ENUM(GC_CB); |
| 29 | TRACE_DEFINE_ENUM(FG_GC); |
| 30 | TRACE_DEFINE_ENUM(BG_GC); |
| 31 | TRACE_DEFINE_ENUM(LFS); |
| 32 | TRACE_DEFINE_ENUM(SSR); |
| 33 | TRACE_DEFINE_ENUM(__REQ_RAHEAD); |
Steven Rostedt (Red Hat) | 5511b9a | 2015-03-27 16:18:07 -0400 | [diff] [blame] | 34 | TRACE_DEFINE_ENUM(__REQ_SYNC); |
| 35 | TRACE_DEFINE_ENUM(__REQ_NOIDLE); |
| 36 | TRACE_DEFINE_ENUM(__REQ_FLUSH); |
| 37 | TRACE_DEFINE_ENUM(__REQ_FUA); |
| 38 | TRACE_DEFINE_ENUM(__REQ_PRIO); |
| 39 | TRACE_DEFINE_ENUM(__REQ_META); |
| 40 | TRACE_DEFINE_ENUM(CP_UMOUNT); |
| 41 | TRACE_DEFINE_ENUM(CP_FASTBOOT); |
| 42 | TRACE_DEFINE_ENUM(CP_SYNC); |
Jaegeuk Kim | 5d79988 | 2015-04-22 16:07:38 -0700 | [diff] [blame] | 43 | TRACE_DEFINE_ENUM(CP_RECOVERY); |
Steven Rostedt (Red Hat) | 5511b9a | 2015-03-27 16:18:07 -0400 | [diff] [blame] | 44 | TRACE_DEFINE_ENUM(CP_DISCARD); |
| 45 | |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 46 | #define show_block_type(type) \ |
| 47 | __print_symbolic(type, \ |
| 48 | { NODE, "NODE" }, \ |
| 49 | { DATA, "DATA" }, \ |
| 50 | { META, "META" }, \ |
Jaegeuk Kim | 8ce67cb | 2015-03-17 17:58:08 -0700 | [diff] [blame] | 51 | { META_FLUSH, "META_FLUSH" }, \ |
| 52 | { INMEM, "INMEM" }, \ |
| 53 | { INMEM_DROP, "INMEM_DROP" }, \ |
Chao Yu | 28bc106 | 2016-02-06 14:40:34 +0800 | [diff] [blame] | 54 | { INMEM_REVOKE, "INMEM_REVOKE" }, \ |
Jaegeuk Kim | 8ce67cb | 2015-03-17 17:58:08 -0700 | [diff] [blame] | 55 | { IPU, "IN-PLACE" }, \ |
| 56 | { OPU, "OUT-OF-PLACE" }) |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 57 | |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 58 | #define F2FS_BIO_FLAG_MASK(t) (t & (READA | WRITE_FLUSH_FUA)) |
Jaegeuk Kim | a709f4a | 2013-11-24 14:42:23 +0900 | [diff] [blame] | 59 | #define F2FS_BIO_EXTRA_MASK(t) (t & (REQ_META | REQ_PRIO)) |
| 60 | |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 61 | #define show_bio_type(op, op_flags) show_bio_op(op), \ |
| 62 | show_bio_op_flags(op_flags), show_bio_extra(op_flags) |
Jaegeuk Kim | a709f4a | 2013-11-24 14:42:23 +0900 | [diff] [blame] | 63 | |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 64 | #define show_bio_op(op) \ |
| 65 | __print_symbolic(op, \ |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 66 | { READ, "READ" }, \ |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 67 | { WRITE, "WRITE" }) |
| 68 | |
| 69 | #define show_bio_op_flags(flags) \ |
| 70 | __print_symbolic(F2FS_BIO_FLAG_MASK(flags), \ |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 71 | { READA, "READAHEAD" }, \ |
| 72 | { READ_SYNC, "READ_SYNC" }, \ |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 73 | { WRITE_SYNC, "WRITE_SYNC" }, \ |
| 74 | { WRITE_FLUSH, "WRITE_FLUSH" }, \ |
| 75 | { WRITE_FUA, "WRITE_FUA" }, \ |
| 76 | { WRITE_FLUSH_FUA, "WRITE_FLUSH_FUA" }) |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 77 | |
Jaegeuk Kim | a709f4a | 2013-11-24 14:42:23 +0900 | [diff] [blame] | 78 | #define show_bio_extra(type) \ |
| 79 | __print_symbolic(F2FS_BIO_EXTRA_MASK(type), \ |
| 80 | { REQ_META, "(M)" }, \ |
| 81 | { REQ_PRIO, "(P)" }, \ |
| 82 | { REQ_META | REQ_PRIO, "(MP)" }, \ |
| 83 | { 0, " \b" }) |
| 84 | |
Namjae Jeon | 8e46b3e | 2013-04-23 16:42:53 +0900 | [diff] [blame] | 85 | #define show_data_type(type) \ |
| 86 | __print_symbolic(type, \ |
| 87 | { CURSEG_HOT_DATA, "Hot DATA" }, \ |
| 88 | { CURSEG_WARM_DATA, "Warm DATA" }, \ |
| 89 | { CURSEG_COLD_DATA, "Cold DATA" }, \ |
| 90 | { CURSEG_HOT_NODE, "Hot NODE" }, \ |
| 91 | { CURSEG_WARM_NODE, "Warm NODE" }, \ |
| 92 | { CURSEG_COLD_NODE, "Cold NODE" }, \ |
| 93 | { NO_CHECK_TYPE, "No TYPE" }) |
| 94 | |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 95 | #define show_file_type(type) \ |
| 96 | __print_symbolic(type, \ |
| 97 | { 0, "FILE" }, \ |
| 98 | { 1, "DIR" }) |
| 99 | |
Namjae Jeon | 8e46b3e | 2013-04-23 16:42:53 +0900 | [diff] [blame] | 100 | #define show_gc_type(type) \ |
| 101 | __print_symbolic(type, \ |
| 102 | { FG_GC, "Foreground GC" }, \ |
| 103 | { BG_GC, "Background GC" }) |
| 104 | |
| 105 | #define show_alloc_mode(type) \ |
| 106 | __print_symbolic(type, \ |
| 107 | { LFS, "LFS-mode" }, \ |
| 108 | { SSR, "SSR-mode" }) |
| 109 | |
| 110 | #define show_victim_policy(type) \ |
| 111 | __print_symbolic(type, \ |
| 112 | { GC_GREEDY, "Greedy" }, \ |
| 113 | { GC_CB, "Cost-Benefit" }) |
| 114 | |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 115 | #define show_cpreason(type) \ |
| 116 | __print_symbolic(type, \ |
| 117 | { CP_UMOUNT, "Umount" }, \ |
Jaegeuk Kim | 119ee91 | 2015-01-29 11:45:33 -0800 | [diff] [blame] | 118 | { CP_FASTBOOT, "Fastboot" }, \ |
Jaegeuk Kim | 4b2fecc | 2014-09-20 22:06:39 -0700 | [diff] [blame] | 119 | { CP_SYNC, "Sync" }, \ |
Jaegeuk Kim | 1002755 | 2015-04-09 17:03:53 -0700 | [diff] [blame] | 120 | { CP_RECOVERY, "Recovery" }, \ |
Jaegeuk Kim | 4b2fecc | 2014-09-20 22:06:39 -0700 | [diff] [blame] | 121 | { CP_DISCARD, "Discard" }) |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 122 | |
Namjae Jeon | 8e46b3e | 2013-04-23 16:42:53 +0900 | [diff] [blame] | 123 | struct victim_sel_policy; |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 124 | struct f2fs_map_blocks; |
Namjae Jeon | 8e46b3e | 2013-04-23 16:42:53 +0900 | [diff] [blame] | 125 | |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 126 | DECLARE_EVENT_CLASS(f2fs__inode, |
| 127 | |
| 128 | TP_PROTO(struct inode *inode), |
| 129 | |
| 130 | TP_ARGS(inode), |
| 131 | |
| 132 | TP_STRUCT__entry( |
| 133 | __field(dev_t, dev) |
| 134 | __field(ino_t, ino) |
| 135 | __field(ino_t, pino) |
| 136 | __field(umode_t, mode) |
| 137 | __field(loff_t, size) |
| 138 | __field(unsigned int, nlink) |
| 139 | __field(blkcnt_t, blocks) |
| 140 | __field(__u8, advise) |
| 141 | ), |
| 142 | |
| 143 | TP_fast_assign( |
| 144 | __entry->dev = inode->i_sb->s_dev; |
| 145 | __entry->ino = inode->i_ino; |
| 146 | __entry->pino = F2FS_I(inode)->i_pino; |
| 147 | __entry->mode = inode->i_mode; |
| 148 | __entry->nlink = inode->i_nlink; |
| 149 | __entry->size = inode->i_size; |
| 150 | __entry->blocks = inode->i_blocks; |
| 151 | __entry->advise = F2FS_I(inode)->i_advise; |
| 152 | ), |
| 153 | |
| 154 | TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, " |
| 155 | "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x", |
| 156 | show_dev_ino(__entry), |
| 157 | (unsigned long)__entry->pino, |
| 158 | __entry->mode, |
| 159 | __entry->size, |
| 160 | (unsigned int)__entry->nlink, |
| 161 | (unsigned long long)__entry->blocks, |
| 162 | (unsigned char)__entry->advise) |
| 163 | ); |
| 164 | |
| 165 | DECLARE_EVENT_CLASS(f2fs__inode_exit, |
| 166 | |
| 167 | TP_PROTO(struct inode *inode, int ret), |
| 168 | |
| 169 | TP_ARGS(inode, ret), |
| 170 | |
| 171 | TP_STRUCT__entry( |
| 172 | __field(dev_t, dev) |
| 173 | __field(ino_t, ino) |
| 174 | __field(int, ret) |
| 175 | ), |
| 176 | |
| 177 | TP_fast_assign( |
| 178 | __entry->dev = inode->i_sb->s_dev; |
| 179 | __entry->ino = inode->i_ino; |
| 180 | __entry->ret = ret; |
| 181 | ), |
| 182 | |
| 183 | TP_printk("dev = (%d,%d), ino = %lu, ret = %d", |
| 184 | show_dev_ino(__entry), |
| 185 | __entry->ret) |
| 186 | ); |
| 187 | |
| 188 | DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter, |
| 189 | |
| 190 | TP_PROTO(struct inode *inode), |
| 191 | |
| 192 | TP_ARGS(inode) |
| 193 | ); |
| 194 | |
| 195 | TRACE_EVENT(f2fs_sync_file_exit, |
| 196 | |
Jaegeuk Kim | 29e7043 | 2015-02-10 16:23:12 -0800 | [diff] [blame] | 197 | TP_PROTO(struct inode *inode, int need_cp, int datasync, int ret), |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 198 | |
| 199 | TP_ARGS(inode, need_cp, datasync, ret), |
| 200 | |
| 201 | TP_STRUCT__entry( |
| 202 | __field(dev_t, dev) |
| 203 | __field(ino_t, ino) |
Jaegeuk Kim | 29e7043 | 2015-02-10 16:23:12 -0800 | [diff] [blame] | 204 | __field(int, need_cp) |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 205 | __field(int, datasync) |
| 206 | __field(int, ret) |
| 207 | ), |
| 208 | |
| 209 | TP_fast_assign( |
| 210 | __entry->dev = inode->i_sb->s_dev; |
| 211 | __entry->ino = inode->i_ino; |
| 212 | __entry->need_cp = need_cp; |
| 213 | __entry->datasync = datasync; |
| 214 | __entry->ret = ret; |
| 215 | ), |
| 216 | |
| 217 | TP_printk("dev = (%d,%d), ino = %lu, checkpoint is %s, " |
| 218 | "datasync = %d, ret = %d", |
| 219 | show_dev_ino(__entry), |
| 220 | __entry->need_cp ? "needed" : "not needed", |
| 221 | __entry->datasync, |
| 222 | __entry->ret) |
| 223 | ); |
| 224 | |
| 225 | TRACE_EVENT(f2fs_sync_fs, |
| 226 | |
| 227 | TP_PROTO(struct super_block *sb, int wait), |
| 228 | |
| 229 | TP_ARGS(sb, wait), |
| 230 | |
| 231 | TP_STRUCT__entry( |
| 232 | __field(dev_t, dev) |
Jaegeuk Kim | 29e7043 | 2015-02-10 16:23:12 -0800 | [diff] [blame] | 233 | __field(int, dirty) |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 234 | __field(int, wait) |
| 235 | ), |
| 236 | |
| 237 | TP_fast_assign( |
| 238 | __entry->dev = sb->s_dev; |
Chao Yu | caf0047 | 2015-01-28 17:48:42 +0800 | [diff] [blame] | 239 | __entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY); |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 240 | __entry->wait = wait; |
| 241 | ), |
| 242 | |
| 243 | TP_printk("dev = (%d,%d), superblock is %s, wait = %d", |
| 244 | show_dev(__entry), |
| 245 | __entry->dirty ? "dirty" : "not dirty", |
| 246 | __entry->wait) |
| 247 | ); |
| 248 | |
| 249 | DEFINE_EVENT(f2fs__inode, f2fs_iget, |
| 250 | |
| 251 | TP_PROTO(struct inode *inode), |
| 252 | |
| 253 | TP_ARGS(inode) |
| 254 | ); |
| 255 | |
| 256 | DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit, |
| 257 | |
| 258 | TP_PROTO(struct inode *inode, int ret), |
| 259 | |
| 260 | TP_ARGS(inode, ret) |
| 261 | ); |
| 262 | |
| 263 | DEFINE_EVENT(f2fs__inode, f2fs_evict_inode, |
| 264 | |
| 265 | TP_PROTO(struct inode *inode), |
| 266 | |
| 267 | TP_ARGS(inode) |
| 268 | ); |
| 269 | |
Jaegeuk Kim | d70b4f5 | 2013-04-25 13:24:33 +0900 | [diff] [blame] | 270 | DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode, |
| 271 | |
| 272 | TP_PROTO(struct inode *inode, int ret), |
| 273 | |
| 274 | TP_ARGS(inode, ret) |
| 275 | ); |
| 276 | |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 277 | TRACE_EVENT(f2fs_unlink_enter, |
| 278 | |
| 279 | TP_PROTO(struct inode *dir, struct dentry *dentry), |
| 280 | |
| 281 | TP_ARGS(dir, dentry), |
| 282 | |
| 283 | TP_STRUCT__entry( |
| 284 | __field(dev_t, dev) |
| 285 | __field(ino_t, ino) |
| 286 | __field(loff_t, size) |
| 287 | __field(blkcnt_t, blocks) |
| 288 | __field(const char *, name) |
| 289 | ), |
| 290 | |
| 291 | TP_fast_assign( |
| 292 | __entry->dev = dir->i_sb->s_dev; |
| 293 | __entry->ino = dir->i_ino; |
| 294 | __entry->size = dir->i_size; |
| 295 | __entry->blocks = dir->i_blocks; |
| 296 | __entry->name = dentry->d_name.name; |
| 297 | ), |
| 298 | |
| 299 | TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, " |
| 300 | "i_blocks = %llu, name = %s", |
| 301 | show_dev_ino(__entry), |
| 302 | __entry->size, |
| 303 | (unsigned long long)__entry->blocks, |
| 304 | __entry->name) |
| 305 | ); |
| 306 | |
| 307 | DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit, |
| 308 | |
| 309 | TP_PROTO(struct inode *inode, int ret), |
| 310 | |
| 311 | TP_ARGS(inode, ret) |
| 312 | ); |
Namjae Jeon | 51dd624 | 2013-04-20 01:28:52 +0900 | [diff] [blame] | 313 | |
| 314 | DEFINE_EVENT(f2fs__inode, f2fs_truncate, |
| 315 | |
| 316 | TP_PROTO(struct inode *inode), |
| 317 | |
| 318 | TP_ARGS(inode) |
| 319 | ); |
| 320 | |
| 321 | TRACE_EVENT(f2fs_truncate_data_blocks_range, |
| 322 | |
| 323 | TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free), |
| 324 | |
| 325 | TP_ARGS(inode, nid, ofs, free), |
| 326 | |
| 327 | TP_STRUCT__entry( |
| 328 | __field(dev_t, dev) |
| 329 | __field(ino_t, ino) |
| 330 | __field(nid_t, nid) |
| 331 | __field(unsigned int, ofs) |
| 332 | __field(int, free) |
| 333 | ), |
| 334 | |
| 335 | TP_fast_assign( |
| 336 | __entry->dev = inode->i_sb->s_dev; |
| 337 | __entry->ino = inode->i_ino; |
| 338 | __entry->nid = nid; |
| 339 | __entry->ofs = ofs; |
| 340 | __entry->free = free; |
| 341 | ), |
| 342 | |
| 343 | TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d", |
| 344 | show_dev_ino(__entry), |
| 345 | (unsigned int)__entry->nid, |
| 346 | __entry->ofs, |
| 347 | __entry->free) |
| 348 | ); |
| 349 | |
| 350 | DECLARE_EVENT_CLASS(f2fs__truncate_op, |
| 351 | |
| 352 | TP_PROTO(struct inode *inode, u64 from), |
| 353 | |
| 354 | TP_ARGS(inode, from), |
| 355 | |
| 356 | TP_STRUCT__entry( |
| 357 | __field(dev_t, dev) |
| 358 | __field(ino_t, ino) |
| 359 | __field(loff_t, size) |
| 360 | __field(blkcnt_t, blocks) |
| 361 | __field(u64, from) |
| 362 | ), |
| 363 | |
| 364 | TP_fast_assign( |
| 365 | __entry->dev = inode->i_sb->s_dev; |
| 366 | __entry->ino = inode->i_ino; |
| 367 | __entry->size = inode->i_size; |
| 368 | __entry->blocks = inode->i_blocks; |
| 369 | __entry->from = from; |
| 370 | ), |
| 371 | |
| 372 | TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, " |
| 373 | "start file offset = %llu", |
| 374 | show_dev_ino(__entry), |
| 375 | __entry->size, |
| 376 | (unsigned long long)__entry->blocks, |
| 377 | (unsigned long long)__entry->from) |
| 378 | ); |
| 379 | |
| 380 | DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter, |
| 381 | |
| 382 | TP_PROTO(struct inode *inode, u64 from), |
| 383 | |
| 384 | TP_ARGS(inode, from) |
| 385 | ); |
| 386 | |
| 387 | DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit, |
| 388 | |
| 389 | TP_PROTO(struct inode *inode, int ret), |
| 390 | |
| 391 | TP_ARGS(inode, ret) |
| 392 | ); |
| 393 | |
| 394 | DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter, |
| 395 | |
| 396 | TP_PROTO(struct inode *inode, u64 from), |
| 397 | |
| 398 | TP_ARGS(inode, from) |
| 399 | ); |
| 400 | |
| 401 | DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit, |
| 402 | |
| 403 | TP_PROTO(struct inode *inode, int ret), |
| 404 | |
| 405 | TP_ARGS(inode, ret) |
| 406 | ); |
| 407 | |
| 408 | DECLARE_EVENT_CLASS(f2fs__truncate_node, |
| 409 | |
| 410 | TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr), |
| 411 | |
| 412 | TP_ARGS(inode, nid, blk_addr), |
| 413 | |
| 414 | TP_STRUCT__entry( |
| 415 | __field(dev_t, dev) |
| 416 | __field(ino_t, ino) |
| 417 | __field(nid_t, nid) |
| 418 | __field(block_t, blk_addr) |
| 419 | ), |
| 420 | |
| 421 | TP_fast_assign( |
| 422 | __entry->dev = inode->i_sb->s_dev; |
| 423 | __entry->ino = inode->i_ino; |
| 424 | __entry->nid = nid; |
| 425 | __entry->blk_addr = blk_addr; |
| 426 | ), |
| 427 | |
| 428 | TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx", |
| 429 | show_dev_ino(__entry), |
| 430 | (unsigned int)__entry->nid, |
| 431 | (unsigned long long)__entry->blk_addr) |
| 432 | ); |
| 433 | |
| 434 | DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter, |
| 435 | |
| 436 | TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr), |
| 437 | |
| 438 | TP_ARGS(inode, nid, blk_addr) |
| 439 | ); |
| 440 | |
| 441 | DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit, |
| 442 | |
| 443 | TP_PROTO(struct inode *inode, int ret), |
| 444 | |
| 445 | TP_ARGS(inode, ret) |
| 446 | ); |
| 447 | |
| 448 | DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node, |
| 449 | |
| 450 | TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr), |
| 451 | |
| 452 | TP_ARGS(inode, nid, blk_addr) |
| 453 | ); |
| 454 | |
| 455 | TRACE_EVENT(f2fs_truncate_partial_nodes, |
| 456 | |
| 457 | TP_PROTO(struct inode *inode, nid_t nid[], int depth, int err), |
| 458 | |
| 459 | TP_ARGS(inode, nid, depth, err), |
| 460 | |
| 461 | TP_STRUCT__entry( |
| 462 | __field(dev_t, dev) |
| 463 | __field(ino_t, ino) |
| 464 | __field(nid_t, nid[3]) |
| 465 | __field(int, depth) |
| 466 | __field(int, err) |
| 467 | ), |
| 468 | |
| 469 | TP_fast_assign( |
| 470 | __entry->dev = inode->i_sb->s_dev; |
| 471 | __entry->ino = inode->i_ino; |
| 472 | __entry->nid[0] = nid[0]; |
| 473 | __entry->nid[1] = nid[1]; |
| 474 | __entry->nid[2] = nid[2]; |
| 475 | __entry->depth = depth; |
| 476 | __entry->err = err; |
| 477 | ), |
| 478 | |
| 479 | TP_printk("dev = (%d,%d), ino = %lu, " |
| 480 | "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d", |
| 481 | show_dev_ino(__entry), |
| 482 | (unsigned int)__entry->nid[0], |
| 483 | (unsigned int)__entry->nid[1], |
| 484 | (unsigned int)__entry->nid[2], |
| 485 | __entry->depth, |
| 486 | __entry->err) |
| 487 | ); |
| 488 | |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 489 | TRACE_EVENT(f2fs_map_blocks, |
| 490 | TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int ret), |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 491 | |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 492 | TP_ARGS(inode, map, ret), |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 493 | |
| 494 | TP_STRUCT__entry( |
| 495 | __field(dev_t, dev) |
| 496 | __field(ino_t, ino) |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 497 | __field(block_t, m_lblk) |
| 498 | __field(block_t, m_pblk) |
| 499 | __field(unsigned int, m_len) |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 500 | __field(int, ret) |
| 501 | ), |
| 502 | |
| 503 | TP_fast_assign( |
| 504 | __entry->dev = inode->i_sb->s_dev; |
| 505 | __entry->ino = inode->i_ino; |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 506 | __entry->m_lblk = map->m_lblk; |
| 507 | __entry->m_pblk = map->m_pblk; |
| 508 | __entry->m_len = map->m_len; |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 509 | __entry->ret = ret; |
| 510 | ), |
| 511 | |
| 512 | TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, " |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 513 | "start blkaddr = 0x%llx, len = 0x%llx, err = %d", |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 514 | show_dev_ino(__entry), |
Jaegeuk Kim | 003a3e1 | 2015-04-06 19:55:34 -0700 | [diff] [blame] | 515 | (unsigned long long)__entry->m_lblk, |
| 516 | (unsigned long long)__entry->m_pblk, |
| 517 | (unsigned long long)__entry->m_len, |
Namjae Jeon | 848753a | 2013-04-23 16:38:02 +0900 | [diff] [blame] | 518 | __entry->ret) |
| 519 | ); |
| 520 | |
Jaegeuk Kim | 5c26743 | 2015-10-05 11:32:34 -0700 | [diff] [blame] | 521 | TRACE_EVENT(f2fs_background_gc, |
| 522 | |
| 523 | TP_PROTO(struct super_block *sb, long wait_ms, |
| 524 | unsigned int prefree, unsigned int free), |
| 525 | |
| 526 | TP_ARGS(sb, wait_ms, prefree, free), |
| 527 | |
| 528 | TP_STRUCT__entry( |
| 529 | __field(dev_t, dev) |
| 530 | __field(long, wait_ms) |
| 531 | __field(unsigned int, prefree) |
| 532 | __field(unsigned int, free) |
| 533 | ), |
| 534 | |
| 535 | TP_fast_assign( |
| 536 | __entry->dev = sb->s_dev; |
| 537 | __entry->wait_ms = wait_ms; |
| 538 | __entry->prefree = prefree; |
| 539 | __entry->free = free; |
| 540 | ), |
| 541 | |
| 542 | TP_printk("dev = (%d,%d), wait_ms = %ld, prefree = %u, free = %u", |
| 543 | show_dev(__entry), |
| 544 | __entry->wait_ms, |
| 545 | __entry->prefree, |
| 546 | __entry->free) |
| 547 | ); |
| 548 | |
Namjae Jeon | 8e46b3e | 2013-04-23 16:42:53 +0900 | [diff] [blame] | 549 | TRACE_EVENT(f2fs_get_victim, |
| 550 | |
| 551 | TP_PROTO(struct super_block *sb, int type, int gc_type, |
| 552 | struct victim_sel_policy *p, unsigned int pre_victim, |
| 553 | unsigned int prefree, unsigned int free), |
| 554 | |
| 555 | TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free), |
| 556 | |
| 557 | TP_STRUCT__entry( |
| 558 | __field(dev_t, dev) |
| 559 | __field(int, type) |
| 560 | __field(int, gc_type) |
| 561 | __field(int, alloc_mode) |
| 562 | __field(int, gc_mode) |
| 563 | __field(unsigned int, victim) |
| 564 | __field(unsigned int, ofs_unit) |
| 565 | __field(unsigned int, pre_victim) |
| 566 | __field(unsigned int, prefree) |
| 567 | __field(unsigned int, free) |
| 568 | ), |
| 569 | |
| 570 | TP_fast_assign( |
| 571 | __entry->dev = sb->s_dev; |
| 572 | __entry->type = type; |
| 573 | __entry->gc_type = gc_type; |
| 574 | __entry->alloc_mode = p->alloc_mode; |
| 575 | __entry->gc_mode = p->gc_mode; |
| 576 | __entry->victim = p->min_segno; |
| 577 | __entry->ofs_unit = p->ofs_unit; |
| 578 | __entry->pre_victim = pre_victim; |
| 579 | __entry->prefree = prefree; |
| 580 | __entry->free = free; |
| 581 | ), |
| 582 | |
| 583 | TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), victim = %u " |
| 584 | "ofs_unit = %u, pre_victim_secno = %d, prefree = %u, free = %u", |
| 585 | show_dev(__entry), |
| 586 | show_data_type(__entry->type), |
| 587 | show_gc_type(__entry->gc_type), |
| 588 | show_alloc_mode(__entry->alloc_mode), |
| 589 | show_victim_policy(__entry->gc_mode), |
| 590 | __entry->victim, |
| 591 | __entry->ofs_unit, |
| 592 | (int)__entry->pre_victim, |
| 593 | __entry->prefree, |
| 594 | __entry->free) |
| 595 | ); |
| 596 | |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 597 | TRACE_EVENT(f2fs_fallocate, |
| 598 | |
| 599 | TP_PROTO(struct inode *inode, int mode, |
| 600 | loff_t offset, loff_t len, int ret), |
| 601 | |
| 602 | TP_ARGS(inode, mode, offset, len, ret), |
| 603 | |
| 604 | TP_STRUCT__entry( |
| 605 | __field(dev_t, dev) |
| 606 | __field(ino_t, ino) |
| 607 | __field(int, mode) |
| 608 | __field(loff_t, offset) |
| 609 | __field(loff_t, len) |
| 610 | __field(loff_t, size) |
| 611 | __field(blkcnt_t, blocks) |
| 612 | __field(int, ret) |
| 613 | ), |
| 614 | |
| 615 | TP_fast_assign( |
| 616 | __entry->dev = inode->i_sb->s_dev; |
| 617 | __entry->ino = inode->i_ino; |
| 618 | __entry->mode = mode; |
| 619 | __entry->offset = offset; |
| 620 | __entry->len = len; |
| 621 | __entry->size = inode->i_size; |
| 622 | __entry->blocks = inode->i_blocks; |
| 623 | __entry->ret = ret; |
| 624 | ), |
| 625 | |
| 626 | TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, " |
| 627 | "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d", |
| 628 | show_dev_ino(__entry), |
| 629 | __entry->mode, |
| 630 | (unsigned long long)__entry->offset, |
| 631 | (unsigned long long)__entry->len, |
| 632 | (unsigned long long)__entry->size, |
| 633 | (unsigned long long)__entry->blocks, |
| 634 | __entry->ret) |
| 635 | ); |
| 636 | |
Chao Yu | 70407fad | 2014-07-31 21:11:22 +0800 | [diff] [blame] | 637 | TRACE_EVENT(f2fs_direct_IO_enter, |
| 638 | |
| 639 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 640 | |
| 641 | TP_ARGS(inode, offset, len, rw), |
| 642 | |
| 643 | TP_STRUCT__entry( |
| 644 | __field(dev_t, dev) |
| 645 | __field(ino_t, ino) |
| 646 | __field(loff_t, pos) |
| 647 | __field(unsigned long, len) |
| 648 | __field(int, rw) |
| 649 | ), |
| 650 | |
| 651 | TP_fast_assign( |
| 652 | __entry->dev = inode->i_sb->s_dev; |
| 653 | __entry->ino = inode->i_ino; |
| 654 | __entry->pos = offset; |
| 655 | __entry->len = len; |
| 656 | __entry->rw = rw; |
| 657 | ), |
| 658 | |
| 659 | TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d", |
| 660 | show_dev_ino(__entry), |
| 661 | __entry->pos, |
| 662 | __entry->len, |
| 663 | __entry->rw) |
| 664 | ); |
| 665 | |
| 666 | TRACE_EVENT(f2fs_direct_IO_exit, |
| 667 | |
| 668 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
| 669 | int rw, int ret), |
| 670 | |
| 671 | TP_ARGS(inode, offset, len, rw, ret), |
| 672 | |
| 673 | TP_STRUCT__entry( |
| 674 | __field(dev_t, dev) |
| 675 | __field(ino_t, ino) |
| 676 | __field(loff_t, pos) |
| 677 | __field(unsigned long, len) |
| 678 | __field(int, rw) |
| 679 | __field(int, ret) |
| 680 | ), |
| 681 | |
| 682 | TP_fast_assign( |
| 683 | __entry->dev = inode->i_sb->s_dev; |
| 684 | __entry->ino = inode->i_ino; |
| 685 | __entry->pos = offset; |
| 686 | __entry->len = len; |
| 687 | __entry->rw = rw; |
| 688 | __entry->ret = ret; |
| 689 | ), |
| 690 | |
| 691 | TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu " |
| 692 | "rw = %d ret = %d", |
| 693 | show_dev_ino(__entry), |
| 694 | __entry->pos, |
| 695 | __entry->len, |
| 696 | __entry->rw, |
| 697 | __entry->ret) |
| 698 | ); |
| 699 | |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 700 | TRACE_EVENT(f2fs_reserve_new_blocks, |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 701 | |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 702 | TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node, |
| 703 | blkcnt_t count), |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 704 | |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 705 | TP_ARGS(inode, nid, ofs_in_node, count), |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 706 | |
| 707 | TP_STRUCT__entry( |
| 708 | __field(dev_t, dev) |
| 709 | __field(nid_t, nid) |
| 710 | __field(unsigned int, ofs_in_node) |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 711 | __field(blkcnt_t, count) |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 712 | ), |
| 713 | |
| 714 | TP_fast_assign( |
| 715 | __entry->dev = inode->i_sb->s_dev; |
| 716 | __entry->nid = nid; |
| 717 | __entry->ofs_in_node = ofs_in_node; |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 718 | __entry->count = count; |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 719 | ), |
| 720 | |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 721 | TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu", |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 722 | show_dev(__entry), |
| 723 | (unsigned int)__entry->nid, |
Chao Yu | 46008c6 | 2016-05-09 19:56:30 +0800 | [diff] [blame] | 724 | __entry->ofs_in_node, |
| 725 | (unsigned long long)__entry->count) |
Namjae Jeon | c01e285 | 2013-04-23 17:00:52 +0900 | [diff] [blame] | 726 | ); |
| 727 | |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 728 | DECLARE_EVENT_CLASS(f2fs__submit_page_bio, |
| 729 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 730 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 731 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 732 | TP_ARGS(page, fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 733 | |
| 734 | TP_STRUCT__entry( |
| 735 | __field(dev_t, dev) |
| 736 | __field(ino_t, ino) |
| 737 | __field(pgoff_t, index) |
Chao Yu | 7a9d754 | 2016-02-22 18:36:38 +0800 | [diff] [blame] | 738 | __field(block_t, old_blkaddr) |
| 739 | __field(block_t, new_blkaddr) |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 740 | __field(int, op) |
| 741 | __field(int, op_flags) |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 742 | __field(int, type) |
| 743 | ), |
| 744 | |
| 745 | TP_fast_assign( |
| 746 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 747 | __entry->ino = page->mapping->host->i_ino; |
| 748 | __entry->index = page->index; |
Chao Yu | 7a9d754 | 2016-02-22 18:36:38 +0800 | [diff] [blame] | 749 | __entry->old_blkaddr = fio->old_blkaddr; |
| 750 | __entry->new_blkaddr = fio->new_blkaddr; |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 751 | __entry->op = fio->op; |
| 752 | __entry->op_flags = fio->op_flags; |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 753 | __entry->type = fio->type; |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 754 | ), |
| 755 | |
| 756 | TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 757 | "oldaddr = 0x%llx, newaddr = 0x%llx rw = %s%si%s, type = %s", |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 758 | show_dev_ino(__entry), |
| 759 | (unsigned long)__entry->index, |
Chao Yu | 7a9d754 | 2016-02-22 18:36:38 +0800 | [diff] [blame] | 760 | (unsigned long long)__entry->old_blkaddr, |
| 761 | (unsigned long long)__entry->new_blkaddr, |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 762 | show_bio_type(__entry->op, __entry->op_flags), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 763 | show_block_type(__entry->type)) |
| 764 | ); |
| 765 | |
| 766 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio, |
| 767 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 768 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 769 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 770 | TP_ARGS(page, fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 771 | |
| 772 | TP_CONDITION(page->mapping) |
| 773 | ); |
| 774 | |
| 775 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio, |
| 776 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 777 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 778 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 779 | TP_ARGS(page, fio), |
Chao Yu | 3e1c8f1 | 2014-12-23 16:35:21 +0800 | [diff] [blame] | 780 | |
| 781 | TP_CONDITION(page->mapping) |
| 782 | ); |
| 783 | |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 784 | DECLARE_EVENT_CLASS(f2fs__submit_bio, |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 785 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 786 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
| 787 | struct bio *bio), |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 788 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 789 | TP_ARGS(sb, fio, bio), |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 790 | |
| 791 | TP_STRUCT__entry( |
| 792 | __field(dev_t, dev) |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 793 | __field(int, op) |
| 794 | __field(int, op_flags) |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 795 | __field(int, type) |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 796 | __field(sector_t, sector) |
| 797 | __field(unsigned int, size) |
| 798 | ), |
| 799 | |
| 800 | TP_fast_assign( |
| 801 | __entry->dev = sb->s_dev; |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 802 | __entry->op = fio->op; |
| 803 | __entry->op_flags = fio->op_flags; |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 804 | __entry->type = fio->type; |
Kent Overstreet | 4f024f3 | 2013-10-11 15:44:27 -0700 | [diff] [blame] | 805 | __entry->sector = bio->bi_iter.bi_sector; |
| 806 | __entry->size = bio->bi_iter.bi_size; |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 807 | ), |
| 808 | |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 809 | TP_printk("dev = (%d,%d), %s%s%s, %s, sector = %lld, size = %u", |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 810 | show_dev(__entry), |
Mike Christie | 04d328d | 2016-06-05 14:31:55 -0500 | [diff] [blame] | 811 | show_bio_type(__entry->op, __entry->op_flags), |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 812 | show_block_type(__entry->type), |
Namjae Jeon | 6ec178d | 2013-04-23 17:51:43 +0900 | [diff] [blame] | 813 | (unsigned long long)__entry->sector, |
| 814 | __entry->size) |
| 815 | ); |
| 816 | |
Jaegeuk Kim | 93dfe2a | 2013-11-30 12:51:14 +0900 | [diff] [blame] | 817 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 818 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 819 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
| 820 | struct bio *bio), |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 821 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 822 | TP_ARGS(sb, fio, bio), |
Jaegeuk Kim | 93dfe2a | 2013-11-30 12:51:14 +0900 | [diff] [blame] | 823 | |
| 824 | TP_CONDITION(bio) |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 825 | ); |
| 826 | |
Jaegeuk Kim | 93dfe2a | 2013-11-30 12:51:14 +0900 | [diff] [blame] | 827 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 828 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 829 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
| 830 | struct bio *bio), |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 831 | |
Chao Yu | 2ace38e | 2014-12-24 16:08:14 +0800 | [diff] [blame] | 832 | TP_ARGS(sb, fio, bio), |
Jaegeuk Kim | 93dfe2a | 2013-11-30 12:51:14 +0900 | [diff] [blame] | 833 | |
| 834 | TP_CONDITION(bio) |
Chao Yu | d4d288b | 2013-11-24 12:36:42 +0900 | [diff] [blame] | 835 | ); |
| 836 | |
Chao Yu | 62aed04 | 2014-05-06 16:46:04 +0800 | [diff] [blame] | 837 | TRACE_EVENT(f2fs_write_begin, |
| 838 | |
| 839 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 840 | unsigned int flags), |
| 841 | |
| 842 | TP_ARGS(inode, pos, len, flags), |
| 843 | |
| 844 | TP_STRUCT__entry( |
| 845 | __field(dev_t, dev) |
| 846 | __field(ino_t, ino) |
| 847 | __field(loff_t, pos) |
| 848 | __field(unsigned int, len) |
| 849 | __field(unsigned int, flags) |
| 850 | ), |
| 851 | |
| 852 | TP_fast_assign( |
| 853 | __entry->dev = inode->i_sb->s_dev; |
| 854 | __entry->ino = inode->i_ino; |
| 855 | __entry->pos = pos; |
| 856 | __entry->len = len; |
| 857 | __entry->flags = flags; |
| 858 | ), |
| 859 | |
| 860 | TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u", |
| 861 | show_dev_ino(__entry), |
| 862 | (unsigned long long)__entry->pos, |
| 863 | __entry->len, |
| 864 | __entry->flags) |
| 865 | ); |
| 866 | |
Chao Yu | dfb2bf3 | 2014-05-06 16:47:23 +0800 | [diff] [blame] | 867 | TRACE_EVENT(f2fs_write_end, |
| 868 | |
| 869 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 870 | unsigned int copied), |
| 871 | |
| 872 | TP_ARGS(inode, pos, len, copied), |
| 873 | |
| 874 | TP_STRUCT__entry( |
| 875 | __field(dev_t, dev) |
| 876 | __field(ino_t, ino) |
| 877 | __field(loff_t, pos) |
| 878 | __field(unsigned int, len) |
| 879 | __field(unsigned int, copied) |
| 880 | ), |
| 881 | |
| 882 | TP_fast_assign( |
| 883 | __entry->dev = inode->i_sb->s_dev; |
| 884 | __entry->ino = inode->i_ino; |
| 885 | __entry->pos = pos; |
| 886 | __entry->len = len; |
| 887 | __entry->copied = copied; |
| 888 | ), |
| 889 | |
| 890 | TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u", |
| 891 | show_dev_ino(__entry), |
| 892 | (unsigned long long)__entry->pos, |
| 893 | __entry->len, |
| 894 | __entry->copied) |
| 895 | ); |
| 896 | |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 897 | DECLARE_EVENT_CLASS(f2fs__page, |
| 898 | |
| 899 | TP_PROTO(struct page *page, int type), |
| 900 | |
| 901 | TP_ARGS(page, type), |
| 902 | |
| 903 | TP_STRUCT__entry( |
| 904 | __field(dev_t, dev) |
| 905 | __field(ino_t, ino) |
| 906 | __field(int, type) |
| 907 | __field(int, dir) |
| 908 | __field(pgoff_t, index) |
| 909 | __field(int, dirty) |
Chao Yu | c20e89c | 2014-05-06 16:53:08 +0800 | [diff] [blame] | 910 | __field(int, uptodate) |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 911 | ), |
| 912 | |
| 913 | TP_fast_assign( |
| 914 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 915 | __entry->ino = page->mapping->host->i_ino; |
| 916 | __entry->type = type; |
| 917 | __entry->dir = S_ISDIR(page->mapping->host->i_mode); |
| 918 | __entry->index = page->index; |
| 919 | __entry->dirty = PageDirty(page); |
Chao Yu | c20e89c | 2014-05-06 16:53:08 +0800 | [diff] [blame] | 920 | __entry->uptodate = PageUptodate(page); |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 921 | ), |
| 922 | |
Chao Yu | c20e89c | 2014-05-06 16:53:08 +0800 | [diff] [blame] | 923 | TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, " |
| 924 | "dirty = %d, uptodate = %d", |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 925 | show_dev_ino(__entry), |
| 926 | show_block_type(__entry->type), |
| 927 | show_file_type(__entry->dir), |
| 928 | (unsigned long)__entry->index, |
Chao Yu | c20e89c | 2014-05-06 16:53:08 +0800 | [diff] [blame] | 929 | __entry->dirty, |
| 930 | __entry->uptodate) |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 931 | ); |
| 932 | |
Chao Yu | ecda0de | 2014-05-06 16:48:26 +0800 | [diff] [blame] | 933 | DEFINE_EVENT(f2fs__page, f2fs_writepage, |
| 934 | |
| 935 | TP_PROTO(struct page *page, int type), |
| 936 | |
| 937 | TP_ARGS(page, type) |
| 938 | ); |
| 939 | |
Jaegeuk Kim | 8ce67cb | 2015-03-17 17:58:08 -0700 | [diff] [blame] | 940 | DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page, |
| 941 | |
| 942 | TP_PROTO(struct page *page, int type), |
| 943 | |
| 944 | TP_ARGS(page, type) |
| 945 | ); |
| 946 | |
Chao Yu | c20e89c | 2014-05-06 16:53:08 +0800 | [diff] [blame] | 947 | DEFINE_EVENT(f2fs__page, f2fs_readpage, |
| 948 | |
| 949 | TP_PROTO(struct page *page, int type), |
| 950 | |
| 951 | TP_ARGS(page, type) |
| 952 | ); |
| 953 | |
Jaegeuk Kim | 26c6b88 | 2013-10-24 17:53:29 +0900 | [diff] [blame] | 954 | DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty, |
| 955 | |
| 956 | TP_PROTO(struct page *page, int type), |
| 957 | |
| 958 | TP_ARGS(page, type) |
| 959 | ); |
| 960 | |
Jaegeuk Kim | e943a10 | 2013-10-25 14:26:31 +0900 | [diff] [blame] | 961 | DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite, |
| 962 | |
| 963 | TP_PROTO(struct page *page, int type), |
| 964 | |
| 965 | TP_ARGS(page, type) |
| 966 | ); |
| 967 | |
Jaegeuk Kim | 8ce67cb | 2015-03-17 17:58:08 -0700 | [diff] [blame] | 968 | DEFINE_EVENT(f2fs__page, f2fs_register_inmem_page, |
| 969 | |
| 970 | TP_PROTO(struct page *page, int type), |
| 971 | |
| 972 | TP_ARGS(page, type) |
| 973 | ); |
| 974 | |
| 975 | DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page, |
| 976 | |
| 977 | TP_PROTO(struct page *page, int type), |
| 978 | |
| 979 | TP_ARGS(page, type) |
| 980 | ); |
| 981 | |
Chao Yu | e574843 | 2014-05-06 16:51:24 +0800 | [diff] [blame] | 982 | TRACE_EVENT(f2fs_writepages, |
| 983 | |
| 984 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type), |
| 985 | |
| 986 | TP_ARGS(inode, wbc, type), |
| 987 | |
| 988 | TP_STRUCT__entry( |
| 989 | __field(dev_t, dev) |
| 990 | __field(ino_t, ino) |
| 991 | __field(int, type) |
| 992 | __field(int, dir) |
| 993 | __field(long, nr_to_write) |
| 994 | __field(long, pages_skipped) |
| 995 | __field(loff_t, range_start) |
| 996 | __field(loff_t, range_end) |
| 997 | __field(pgoff_t, writeback_index) |
| 998 | __field(int, sync_mode) |
| 999 | __field(char, for_kupdate) |
| 1000 | __field(char, for_background) |
| 1001 | __field(char, tagged_writepages) |
| 1002 | __field(char, for_reclaim) |
| 1003 | __field(char, range_cyclic) |
| 1004 | __field(char, for_sync) |
| 1005 | ), |
| 1006 | |
| 1007 | TP_fast_assign( |
| 1008 | __entry->dev = inode->i_sb->s_dev; |
| 1009 | __entry->ino = inode->i_ino; |
| 1010 | __entry->type = type; |
| 1011 | __entry->dir = S_ISDIR(inode->i_mode); |
| 1012 | __entry->nr_to_write = wbc->nr_to_write; |
| 1013 | __entry->pages_skipped = wbc->pages_skipped; |
| 1014 | __entry->range_start = wbc->range_start; |
| 1015 | __entry->range_end = wbc->range_end; |
| 1016 | __entry->writeback_index = inode->i_mapping->writeback_index; |
| 1017 | __entry->sync_mode = wbc->sync_mode; |
| 1018 | __entry->for_kupdate = wbc->for_kupdate; |
| 1019 | __entry->for_background = wbc->for_background; |
| 1020 | __entry->tagged_writepages = wbc->tagged_writepages; |
| 1021 | __entry->for_reclaim = wbc->for_reclaim; |
| 1022 | __entry->range_cyclic = wbc->range_cyclic; |
| 1023 | __entry->for_sync = wbc->for_sync; |
| 1024 | ), |
| 1025 | |
| 1026 | TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, " |
| 1027 | "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, " |
| 1028 | "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u", |
| 1029 | show_dev_ino(__entry), |
| 1030 | show_block_type(__entry->type), |
| 1031 | show_file_type(__entry->dir), |
| 1032 | __entry->nr_to_write, |
| 1033 | __entry->pages_skipped, |
| 1034 | __entry->range_start, |
| 1035 | __entry->range_end, |
| 1036 | (unsigned long)__entry->writeback_index, |
| 1037 | __entry->sync_mode, |
| 1038 | __entry->for_kupdate, |
| 1039 | __entry->for_background, |
| 1040 | __entry->tagged_writepages, |
| 1041 | __entry->for_reclaim, |
| 1042 | __entry->range_cyclic, |
| 1043 | __entry->for_sync) |
| 1044 | ); |
| 1045 | |
Chao Yu | b8c2940 | 2015-10-12 17:02:26 +0800 | [diff] [blame] | 1046 | TRACE_EVENT(f2fs_readpages, |
| 1047 | |
| 1048 | TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage), |
| 1049 | |
| 1050 | TP_ARGS(inode, page, nrpage), |
| 1051 | |
| 1052 | TP_STRUCT__entry( |
| 1053 | __field(dev_t, dev) |
| 1054 | __field(ino_t, ino) |
| 1055 | __field(pgoff_t, start) |
| 1056 | __field(unsigned int, nrpage) |
| 1057 | ), |
| 1058 | |
| 1059 | TP_fast_assign( |
| 1060 | __entry->dev = inode->i_sb->s_dev; |
| 1061 | __entry->ino = inode->i_ino; |
| 1062 | __entry->start = page->index; |
| 1063 | __entry->nrpage = nrpage; |
| 1064 | ), |
| 1065 | |
| 1066 | TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u", |
| 1067 | show_dev_ino(__entry), |
| 1068 | (unsigned long)__entry->start, |
| 1069 | __entry->nrpage) |
| 1070 | ); |
| 1071 | |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1072 | TRACE_EVENT(f2fs_write_checkpoint, |
| 1073 | |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 1074 | TP_PROTO(struct super_block *sb, int reason, char *msg), |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1075 | |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 1076 | TP_ARGS(sb, reason, msg), |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1077 | |
| 1078 | TP_STRUCT__entry( |
| 1079 | __field(dev_t, dev) |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 1080 | __field(int, reason) |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1081 | __field(char *, msg) |
| 1082 | ), |
| 1083 | |
| 1084 | TP_fast_assign( |
| 1085 | __entry->dev = sb->s_dev; |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 1086 | __entry->reason = reason; |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1087 | __entry->msg = msg; |
| 1088 | ), |
| 1089 | |
| 1090 | TP_printk("dev = (%d,%d), checkpoint for %s, state = %s", |
| 1091 | show_dev(__entry), |
Jaegeuk Kim | 75ab4cb | 2014-09-20 21:57:51 -0700 | [diff] [blame] | 1092 | show_cpreason(__entry->reason), |
Namjae Jeon | 2af4bd6 | 2013-04-23 18:26:54 +0900 | [diff] [blame] | 1093 | __entry->msg) |
| 1094 | ); |
| 1095 | |
Jaegeuk Kim | 1661d07 | 2013-11-12 17:01:00 +0900 | [diff] [blame] | 1096 | TRACE_EVENT(f2fs_issue_discard, |
| 1097 | |
| 1098 | TP_PROTO(struct super_block *sb, block_t blkstart, block_t blklen), |
| 1099 | |
| 1100 | TP_ARGS(sb, blkstart, blklen), |
| 1101 | |
| 1102 | TP_STRUCT__entry( |
| 1103 | __field(dev_t, dev) |
| 1104 | __field(block_t, blkstart) |
| 1105 | __field(block_t, blklen) |
| 1106 | ), |
| 1107 | |
| 1108 | TP_fast_assign( |
| 1109 | __entry->dev = sb->s_dev; |
| 1110 | __entry->blkstart = blkstart; |
| 1111 | __entry->blklen = blklen; |
| 1112 | ), |
| 1113 | |
| 1114 | TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx", |
| 1115 | show_dev(__entry), |
| 1116 | (unsigned long long)__entry->blkstart, |
| 1117 | (unsigned long long)__entry->blklen) |
| 1118 | ); |
Jaegeuk Kim | 24a9ee0 | 2014-07-25 17:46:10 -0700 | [diff] [blame] | 1119 | |
| 1120 | TRACE_EVENT(f2fs_issue_flush, |
| 1121 | |
Jaegeuk Kim | 29e7043 | 2015-02-10 16:23:12 -0800 | [diff] [blame] | 1122 | TP_PROTO(struct super_block *sb, unsigned int nobarrier, |
| 1123 | unsigned int flush_merge), |
Jaegeuk Kim | 24a9ee0 | 2014-07-25 17:46:10 -0700 | [diff] [blame] | 1124 | |
| 1125 | TP_ARGS(sb, nobarrier, flush_merge), |
| 1126 | |
| 1127 | TP_STRUCT__entry( |
| 1128 | __field(dev_t, dev) |
Jaegeuk Kim | 29e7043 | 2015-02-10 16:23:12 -0800 | [diff] [blame] | 1129 | __field(unsigned int, nobarrier) |
| 1130 | __field(unsigned int, flush_merge) |
Jaegeuk Kim | 24a9ee0 | 2014-07-25 17:46:10 -0700 | [diff] [blame] | 1131 | ), |
| 1132 | |
| 1133 | TP_fast_assign( |
| 1134 | __entry->dev = sb->s_dev; |
| 1135 | __entry->nobarrier = nobarrier; |
| 1136 | __entry->flush_merge = flush_merge; |
| 1137 | ), |
| 1138 | |
| 1139 | TP_printk("dev = (%d,%d), %s %s", |
| 1140 | show_dev(__entry), |
| 1141 | __entry->nobarrier ? "skip (nobarrier)" : "issue", |
| 1142 | __entry->flush_merge ? " with flush_merge" : "") |
| 1143 | ); |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1144 | |
| 1145 | TRACE_EVENT(f2fs_lookup_extent_tree_start, |
| 1146 | |
| 1147 | TP_PROTO(struct inode *inode, unsigned int pgofs), |
| 1148 | |
| 1149 | TP_ARGS(inode, pgofs), |
| 1150 | |
| 1151 | TP_STRUCT__entry( |
| 1152 | __field(dev_t, dev) |
| 1153 | __field(ino_t, ino) |
| 1154 | __field(unsigned int, pgofs) |
| 1155 | ), |
| 1156 | |
| 1157 | TP_fast_assign( |
| 1158 | __entry->dev = inode->i_sb->s_dev; |
| 1159 | __entry->ino = inode->i_ino; |
| 1160 | __entry->pgofs = pgofs; |
| 1161 | ), |
| 1162 | |
| 1163 | TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u", |
| 1164 | show_dev_ino(__entry), |
| 1165 | __entry->pgofs) |
| 1166 | ); |
| 1167 | |
| 1168 | TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end, |
| 1169 | |
| 1170 | TP_PROTO(struct inode *inode, unsigned int pgofs, |
Jaegeuk Kim | 84bc926 | 2015-06-29 16:01:14 -0700 | [diff] [blame] | 1171 | struct extent_info *ei), |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1172 | |
Jaegeuk Kim | 84bc926 | 2015-06-29 16:01:14 -0700 | [diff] [blame] | 1173 | TP_ARGS(inode, pgofs, ei), |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1174 | |
Jaegeuk Kim | 84bc926 | 2015-06-29 16:01:14 -0700 | [diff] [blame] | 1175 | TP_CONDITION(ei), |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1176 | |
| 1177 | TP_STRUCT__entry( |
| 1178 | __field(dev_t, dev) |
| 1179 | __field(ino_t, ino) |
| 1180 | __field(unsigned int, pgofs) |
| 1181 | __field(unsigned int, fofs) |
| 1182 | __field(u32, blk) |
| 1183 | __field(unsigned int, len) |
| 1184 | ), |
| 1185 | |
| 1186 | TP_fast_assign( |
| 1187 | __entry->dev = inode->i_sb->s_dev; |
| 1188 | __entry->ino = inode->i_ino; |
| 1189 | __entry->pgofs = pgofs; |
Jaegeuk Kim | 84bc926 | 2015-06-29 16:01:14 -0700 | [diff] [blame] | 1190 | __entry->fofs = ei->fofs; |
| 1191 | __entry->blk = ei->blk; |
| 1192 | __entry->len = ei->len; |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1193 | ), |
| 1194 | |
| 1195 | TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, " |
| 1196 | "ext_info(fofs: %u, blk: %u, len: %u)", |
| 1197 | show_dev_ino(__entry), |
| 1198 | __entry->pgofs, |
| 1199 | __entry->fofs, |
| 1200 | __entry->blk, |
| 1201 | __entry->len) |
| 1202 | ); |
| 1203 | |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1204 | TRACE_EVENT(f2fs_update_extent_tree_range, |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1205 | |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1206 | TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr, |
| 1207 | unsigned int len), |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1208 | |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1209 | TP_ARGS(inode, pgofs, blkaddr, len), |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1210 | |
| 1211 | TP_STRUCT__entry( |
| 1212 | __field(dev_t, dev) |
| 1213 | __field(ino_t, ino) |
| 1214 | __field(unsigned int, pgofs) |
| 1215 | __field(u32, blk) |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1216 | __field(unsigned int, len) |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1217 | ), |
| 1218 | |
| 1219 | TP_fast_assign( |
| 1220 | __entry->dev = inode->i_sb->s_dev; |
| 1221 | __entry->ino = inode->i_ino; |
| 1222 | __entry->pgofs = pgofs; |
| 1223 | __entry->blk = blkaddr; |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1224 | __entry->len = len; |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1225 | ), |
| 1226 | |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1227 | TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, " |
| 1228 | "blkaddr = %u, len = %u", |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1229 | show_dev_ino(__entry), |
| 1230 | __entry->pgofs, |
Chao Yu | 744288c | 2015-09-06 17:50:13 +0800 | [diff] [blame] | 1231 | __entry->blk, |
| 1232 | __entry->len) |
Chao Yu | 1ec4610 | 2015-02-05 17:59:59 +0800 | [diff] [blame] | 1233 | ); |
| 1234 | |
| 1235 | TRACE_EVENT(f2fs_shrink_extent_tree, |
| 1236 | |
| 1237 | TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt, |
| 1238 | unsigned int tree_cnt), |
| 1239 | |
| 1240 | TP_ARGS(sbi, node_cnt, tree_cnt), |
| 1241 | |
| 1242 | TP_STRUCT__entry( |
| 1243 | __field(dev_t, dev) |
| 1244 | __field(unsigned int, node_cnt) |
| 1245 | __field(unsigned int, tree_cnt) |
| 1246 | ), |
| 1247 | |
| 1248 | TP_fast_assign( |
| 1249 | __entry->dev = sbi->sb->s_dev; |
| 1250 | __entry->node_cnt = node_cnt; |
| 1251 | __entry->tree_cnt = tree_cnt; |
| 1252 | ), |
| 1253 | |
| 1254 | TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u", |
| 1255 | show_dev(__entry), |
| 1256 | __entry->node_cnt, |
| 1257 | __entry->tree_cnt) |
| 1258 | ); |
| 1259 | |
| 1260 | TRACE_EVENT(f2fs_destroy_extent_tree, |
| 1261 | |
| 1262 | TP_PROTO(struct inode *inode, unsigned int node_cnt), |
| 1263 | |
| 1264 | TP_ARGS(inode, node_cnt), |
| 1265 | |
| 1266 | TP_STRUCT__entry( |
| 1267 | __field(dev_t, dev) |
| 1268 | __field(ino_t, ino) |
| 1269 | __field(unsigned int, node_cnt) |
| 1270 | ), |
| 1271 | |
| 1272 | TP_fast_assign( |
| 1273 | __entry->dev = inode->i_sb->s_dev; |
| 1274 | __entry->ino = inode->i_ino; |
| 1275 | __entry->node_cnt = node_cnt; |
| 1276 | ), |
| 1277 | |
| 1278 | TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u", |
| 1279 | show_dev_ino(__entry), |
| 1280 | __entry->node_cnt) |
| 1281 | ); |
| 1282 | |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1283 | DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes, |
| 1284 | |
Jaegeuk Kim | 523be8a | 2016-05-13 12:36:58 -0700 | [diff] [blame] | 1285 | TP_PROTO(struct super_block *sb, int type, s64 count), |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1286 | |
| 1287 | TP_ARGS(sb, type, count), |
| 1288 | |
| 1289 | TP_STRUCT__entry( |
| 1290 | __field(dev_t, dev) |
| 1291 | __field(int, type) |
Jaegeuk Kim | 523be8a | 2016-05-13 12:36:58 -0700 | [diff] [blame] | 1292 | __field(s64, count) |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1293 | ), |
| 1294 | |
| 1295 | TP_fast_assign( |
| 1296 | __entry->dev = sb->s_dev; |
| 1297 | __entry->type = type; |
| 1298 | __entry->count = count; |
| 1299 | ), |
| 1300 | |
Jaegeuk Kim | 523be8a | 2016-05-13 12:36:58 -0700 | [diff] [blame] | 1301 | TP_printk("dev = (%d,%d), %s, dirty count = %lld", |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1302 | show_dev(__entry), |
| 1303 | show_file_type(__entry->type), |
| 1304 | __entry->count) |
| 1305 | ); |
| 1306 | |
| 1307 | DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_enter, |
| 1308 | |
Jaegeuk Kim | 523be8a | 2016-05-13 12:36:58 -0700 | [diff] [blame] | 1309 | TP_PROTO(struct super_block *sb, int type, s64 count), |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1310 | |
| 1311 | TP_ARGS(sb, type, count) |
| 1312 | ); |
| 1313 | |
| 1314 | DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_exit, |
| 1315 | |
Jaegeuk Kim | 523be8a | 2016-05-13 12:36:58 -0700 | [diff] [blame] | 1316 | TP_PROTO(struct super_block *sb, int type, s64 count), |
Chao Yu | 4cf1853 | 2015-12-17 17:17:16 +0800 | [diff] [blame] | 1317 | |
| 1318 | TP_ARGS(sb, type, count) |
| 1319 | ); |
| 1320 | |
Namjae Jeon | a2a4a7e | 2013-04-20 01:28:40 +0900 | [diff] [blame] | 1321 | #endif /* _TRACE_F2FS_H */ |
| 1322 | |
| 1323 | /* This part must be outside protection */ |
| 1324 | #include <trace/define_trace.h> |