diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-07-11 00:01:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-11 00:01:52 -0400 |
commit | b3d4c2b10b68d205d3eb1b5c17dcb4649a502798 (patch) | |
tree | bd03e3dc922f62b019d5b1b5a0eb089f36e0502e /include/trace | |
parent | 169ddc3ec83b5f732e51d975befb191d50795844 (diff) |
ext4: Add new ext4 trim tracepoints
Add ext4_trim_extent and ext4_trim_all_free.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 6f27a59fc90d..51d88139eb8c 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1542,6 +1542,55 @@ TRACE_EVENT(ext4_journal_start, | |||
1542 | __entry->nblocks, (void *)__entry->ip) | 1542 | __entry->nblocks, (void *)__entry->ip) |
1543 | ); | 1543 | ); |
1544 | 1544 | ||
1545 | DECLARE_EVENT_CLASS(ext4__trim, | ||
1546 | TP_PROTO(struct super_block *sb, | ||
1547 | ext4_group_t group, | ||
1548 | ext4_grpblk_t start, | ||
1549 | ext4_grpblk_t len), | ||
1550 | |||
1551 | TP_ARGS(sb, group, start, len), | ||
1552 | |||
1553 | TP_STRUCT__entry( | ||
1554 | __field( int, dev_major ) | ||
1555 | __field( int, dev_minor ) | ||
1556 | __field( __u32, group ) | ||
1557 | __field( int, start ) | ||
1558 | __field( int, len ) | ||
1559 | ), | ||
1560 | |||
1561 | TP_fast_assign( | ||
1562 | __entry->dev_major = MAJOR(sb->s_dev); | ||
1563 | __entry->dev_minor = MINOR(sb->s_dev); | ||
1564 | __entry->group = group; | ||
1565 | __entry->start = start; | ||
1566 | __entry->len = len; | ||
1567 | ), | ||
1568 | |||
1569 | TP_printk("dev %d,%d group %u, start %d, len %d", | ||
1570 | __entry->dev_major, __entry->dev_minor, | ||
1571 | __entry->group, __entry->start, __entry->len) | ||
1572 | ); | ||
1573 | |||
1574 | DEFINE_EVENT(ext4__trim, ext4_trim_extent, | ||
1575 | |||
1576 | TP_PROTO(struct super_block *sb, | ||
1577 | ext4_group_t group, | ||
1578 | ext4_grpblk_t start, | ||
1579 | ext4_grpblk_t len), | ||
1580 | |||
1581 | TP_ARGS(sb, group, start, len) | ||
1582 | ); | ||
1583 | |||
1584 | DEFINE_EVENT(ext4__trim, ext4_trim_all_free, | ||
1585 | |||
1586 | TP_PROTO(struct super_block *sb, | ||
1587 | ext4_group_t group, | ||
1588 | ext4_grpblk_t start, | ||
1589 | ext4_grpblk_t len), | ||
1590 | |||
1591 | TP_ARGS(sb, group, start, len) | ||
1592 | ); | ||
1593 | |||
1545 | #endif /* _TRACE_EXT4_H */ | 1594 | #endif /* _TRACE_EXT4_H */ |
1546 | 1595 | ||
1547 | /* This part must be outside protection */ | 1596 | /* This part must be outside protection */ |