aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2013-04-23 04:00:52 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-04-23 05:15:16 -0400
commitc01e285324793a86c2c90c8451ed6feb04b3d310 (patch)
treeea072bf411ce60ca40e4fb4c44400d58cdf9499d /include/trace
parent8e46b3ed11b750a740fec0a313ad9118059fc37b (diff)
f2fs: add tracepoints to debug the block allocation
Add tracepoints to debug the block allocation & fallocate. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> [Jaegeuk: enhance information] Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 6f7cf7af8899..56b6240e6c01 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -514,6 +514,70 @@ TRACE_EVENT(f2fs_get_victim,
514 __entry->free) 514 __entry->free)
515); 515);
516 516
517TRACE_EVENT(f2fs_fallocate,
518
519 TP_PROTO(struct inode *inode, int mode,
520 loff_t offset, loff_t len, int ret),
521
522 TP_ARGS(inode, mode, offset, len, ret),
523
524 TP_STRUCT__entry(
525 __field(dev_t, dev)
526 __field(ino_t, ino)
527 __field(int, mode)
528 __field(loff_t, offset)
529 __field(loff_t, len)
530 __field(loff_t, size)
531 __field(blkcnt_t, blocks)
532 __field(int, ret)
533 ),
534
535 TP_fast_assign(
536 __entry->dev = inode->i_sb->s_dev;
537 __entry->ino = inode->i_ino;
538 __entry->mode = mode;
539 __entry->offset = offset;
540 __entry->len = len;
541 __entry->size = inode->i_size;
542 __entry->blocks = inode->i_blocks;
543 __entry->ret = ret;
544 ),
545
546 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
547 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
548 show_dev_ino(__entry),
549 __entry->mode,
550 (unsigned long long)__entry->offset,
551 (unsigned long long)__entry->len,
552 (unsigned long long)__entry->size,
553 (unsigned long long)__entry->blocks,
554 __entry->ret)
555);
556
557TRACE_EVENT(f2fs_reserve_new_block,
558
559 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node),
560
561 TP_ARGS(inode, nid, ofs_in_node),
562
563 TP_STRUCT__entry(
564 __field(dev_t, dev)
565 __field(nid_t, nid)
566 __field(unsigned int, ofs_in_node)
567 ),
568
569 TP_fast_assign(
570 __entry->dev = inode->i_sb->s_dev;
571 __entry->nid = nid;
572 __entry->ofs_in_node = ofs_in_node;
573 ),
574
575 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u",
576 show_dev(__entry),
577 (unsigned int)__entry->nid,
578 __entry->ofs_in_node)
579);
580
517#endif /* _TRACE_F2FS_H */ 581#endif /* _TRACE_F2FS_H */
518 582
519 /* This part must be outside protection */ 583 /* This part must be outside protection */