aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-02-05 04:59:59 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2015-03-03 12:58:47 -0500
commit1ec4610c522cc51219cc022ef120a928828fa934 (patch)
treebb287725a378bd5ebc4474bab98e2e95708ee527 /include/trace
parent4bf6fd9fedf14a8bab75f3710cd63e7bc8928014 (diff)
f2fs: add trace for rb-tree extent cache ops
This patch adds trace for lookup/update/shrink/destroy ops in rb-tree extent cache. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 5422dbfaf97d..09a56dc75f8d 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1011,6 +1011,140 @@ TRACE_EVENT(f2fs_issue_flush,
1011 __entry->nobarrier ? "skip (nobarrier)" : "issue", 1011 __entry->nobarrier ? "skip (nobarrier)" : "issue",
1012 __entry->flush_merge ? " with flush_merge" : "") 1012 __entry->flush_merge ? " with flush_merge" : "")
1013); 1013);
1014
1015TRACE_EVENT(f2fs_lookup_extent_tree_start,
1016
1017 TP_PROTO(struct inode *inode, unsigned int pgofs),
1018
1019 TP_ARGS(inode, pgofs),
1020
1021 TP_STRUCT__entry(
1022 __field(dev_t, dev)
1023 __field(ino_t, ino)
1024 __field(unsigned int, pgofs)
1025 ),
1026
1027 TP_fast_assign(
1028 __entry->dev = inode->i_sb->s_dev;
1029 __entry->ino = inode->i_ino;
1030 __entry->pgofs = pgofs;
1031 ),
1032
1033 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u",
1034 show_dev_ino(__entry),
1035 __entry->pgofs)
1036);
1037
1038TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end,
1039
1040 TP_PROTO(struct inode *inode, unsigned int pgofs,
1041 struct extent_node *en),
1042
1043 TP_ARGS(inode, pgofs, en),
1044
1045 TP_CONDITION(en),
1046
1047 TP_STRUCT__entry(
1048 __field(dev_t, dev)
1049 __field(ino_t, ino)
1050 __field(unsigned int, pgofs)
1051 __field(unsigned int, fofs)
1052 __field(u32, blk)
1053 __field(unsigned int, len)
1054 ),
1055
1056 TP_fast_assign(
1057 __entry->dev = inode->i_sb->s_dev;
1058 __entry->ino = inode->i_ino;
1059 __entry->pgofs = pgofs;
1060 __entry->fofs = en->ei.fofs;
1061 __entry->blk = en->ei.blk;
1062 __entry->len = en->ei.len;
1063 ),
1064
1065 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
1066 "ext_info(fofs: %u, blk: %u, len: %u)",
1067 show_dev_ino(__entry),
1068 __entry->pgofs,
1069 __entry->fofs,
1070 __entry->blk,
1071 __entry->len)
1072);
1073
1074TRACE_EVENT(f2fs_update_extent_tree,
1075
1076 TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr),
1077
1078 TP_ARGS(inode, pgofs, blkaddr),
1079
1080 TP_STRUCT__entry(
1081 __field(dev_t, dev)
1082 __field(ino_t, ino)
1083 __field(unsigned int, pgofs)
1084 __field(u32, blk)
1085 ),
1086
1087 TP_fast_assign(
1088 __entry->dev = inode->i_sb->s_dev;
1089 __entry->ino = inode->i_ino;
1090 __entry->pgofs = pgofs;
1091 __entry->blk = blkaddr;
1092 ),
1093
1094 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, blkaddr = %u",
1095 show_dev_ino(__entry),
1096 __entry->pgofs,
1097 __entry->blk)
1098);
1099
1100TRACE_EVENT(f2fs_shrink_extent_tree,
1101
1102 TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
1103 unsigned int tree_cnt),
1104
1105 TP_ARGS(sbi, node_cnt, tree_cnt),
1106
1107 TP_STRUCT__entry(
1108 __field(dev_t, dev)
1109 __field(unsigned int, node_cnt)
1110 __field(unsigned int, tree_cnt)
1111 ),
1112
1113 TP_fast_assign(
1114 __entry->dev = sbi->sb->s_dev;
1115 __entry->node_cnt = node_cnt;
1116 __entry->tree_cnt = tree_cnt;
1117 ),
1118
1119 TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u",
1120 show_dev(__entry),
1121 __entry->node_cnt,
1122 __entry->tree_cnt)
1123);
1124
1125TRACE_EVENT(f2fs_destroy_extent_tree,
1126
1127 TP_PROTO(struct inode *inode, unsigned int node_cnt),
1128
1129 TP_ARGS(inode, node_cnt),
1130
1131 TP_STRUCT__entry(
1132 __field(dev_t, dev)
1133 __field(ino_t, ino)
1134 __field(unsigned int, node_cnt)
1135 ),
1136
1137 TP_fast_assign(
1138 __entry->dev = inode->i_sb->s_dev;
1139 __entry->ino = inode->i_ino;
1140 __entry->node_cnt = node_cnt;
1141 ),
1142
1143 TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u",
1144 show_dev_ino(__entry),
1145 __entry->node_cnt)
1146);
1147
1014#endif /* _TRACE_F2FS_H */ 1148#endif /* _TRACE_F2FS_H */
1015 1149
1016 /* This part must be outside protection */ 1150 /* This part must be outside protection */