aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/9p.h176
-rw-r--r--include/trace/events/asoc.h25
-rw-r--r--include/trace/events/ext4.h480
-rw-r--r--include/trace/events/rcu.h459
-rw-r--r--include/trace/events/regmap.h136
-rw-r--r--include/trace/events/rpm.h99
-rw-r--r--include/trace/events/sched.h9
-rw-r--r--include/trace/events/vmscan.h8
-rw-r--r--include/trace/ftrace.h3
9 files changed, 1380 insertions, 15 deletions
diff --git a/include/trace/events/9p.h b/include/trace/events/9p.h
new file mode 100644
index 000000000000..beeaed8398ec
--- /dev/null
+++ b/include/trace/events/9p.h
@@ -0,0 +1,176 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM 9p
3
4#if !defined(_TRACE_9P_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_9P_H
6
7#include <linux/tracepoint.h>
8
9#define show_9p_op(type) \
10 __print_symbolic(type, \
11 { P9_TLERROR, "P9_TLERROR" }, \
12 { P9_RLERROR, "P9_RLERROR" }, \
13 { P9_TSTATFS, "P9_TSTATFS" }, \
14 { P9_RSTATFS, "P9_RSTATFS" }, \
15 { P9_TLOPEN, "P9_TLOPEN" }, \
16 { P9_RLOPEN, "P9_RLOPEN" }, \
17 { P9_TLCREATE, "P9_TLCREATE" }, \
18 { P9_RLCREATE, "P9_RLCREATE" }, \
19 { P9_TSYMLINK, "P9_TSYMLINK" }, \
20 { P9_RSYMLINK, "P9_RSYMLINK" }, \
21 { P9_TMKNOD, "P9_TMKNOD" }, \
22 { P9_RMKNOD, "P9_RMKNOD" }, \
23 { P9_TRENAME, "P9_TRENAME" }, \
24 { P9_RRENAME, "P9_RRENAME" }, \
25 { P9_TREADLINK, "P9_TREADLINK" }, \
26 { P9_RREADLINK, "P9_RREADLINK" }, \
27 { P9_TGETATTR, "P9_TGETATTR" }, \
28 { P9_RGETATTR, "P9_RGETATTR" }, \
29 { P9_TSETATTR, "P9_TSETATTR" }, \
30 { P9_RSETATTR, "P9_RSETATTR" }, \
31 { P9_TXATTRWALK, "P9_TXATTRWALK" }, \
32 { P9_RXATTRWALK, "P9_RXATTRWALK" }, \
33 { P9_TXATTRCREATE, "P9_TXATTRCREATE" }, \
34 { P9_RXATTRCREATE, "P9_RXATTRCREATE" }, \
35 { P9_TREADDIR, "P9_TREADDIR" }, \
36 { P9_RREADDIR, "P9_RREADDIR" }, \
37 { P9_TFSYNC, "P9_TFSYNC" }, \
38 { P9_RFSYNC, "P9_RFSYNC" }, \
39 { P9_TLOCK, "P9_TLOCK" }, \
40 { P9_RLOCK, "P9_RLOCK" }, \
41 { P9_TGETLOCK, "P9_TGETLOCK" }, \
42 { P9_RGETLOCK, "P9_RGETLOCK" }, \
43 { P9_TLINK, "P9_TLINK" }, \
44 { P9_RLINK, "P9_RLINK" }, \
45 { P9_TMKDIR, "P9_TMKDIR" }, \
46 { P9_RMKDIR, "P9_RMKDIR" }, \
47 { P9_TRENAMEAT, "P9_TRENAMEAT" }, \
48 { P9_RRENAMEAT, "P9_RRENAMEAT" }, \
49 { P9_TUNLINKAT, "P9_TUNLINKAT" }, \
50 { P9_RUNLINKAT, "P9_RUNLINKAT" }, \
51 { P9_TVERSION, "P9_TVERSION" }, \
52 { P9_RVERSION, "P9_RVERSION" }, \
53 { P9_TAUTH, "P9_TAUTH" }, \
54 { P9_RAUTH, "P9_RAUTH" }, \
55 { P9_TATTACH, "P9_TATTACH" }, \
56 { P9_RATTACH, "P9_RATTACH" }, \
57 { P9_TERROR, "P9_TERROR" }, \
58 { P9_RERROR, "P9_RERROR" }, \
59 { P9_TFLUSH, "P9_TFLUSH" }, \
60 { P9_RFLUSH, "P9_RFLUSH" }, \
61 { P9_TWALK, "P9_TWALK" }, \
62 { P9_RWALK, "P9_RWALK" }, \
63 { P9_TOPEN, "P9_TOPEN" }, \
64 { P9_ROPEN, "P9_ROPEN" }, \
65 { P9_TCREATE, "P9_TCREATE" }, \
66 { P9_RCREATE, "P9_RCREATE" }, \
67 { P9_TREAD, "P9_TREAD" }, \
68 { P9_RREAD, "P9_RREAD" }, \
69 { P9_TWRITE, "P9_TWRITE" }, \
70 { P9_RWRITE, "P9_RWRITE" }, \
71 { P9_TCLUNK, "P9_TCLUNK" }, \
72 { P9_RCLUNK, "P9_RCLUNK" }, \
73 { P9_TREMOVE, "P9_TREMOVE" }, \
74 { P9_RREMOVE, "P9_RREMOVE" }, \
75 { P9_TSTAT, "P9_TSTAT" }, \
76 { P9_RSTAT, "P9_RSTAT" }, \
77 { P9_TWSTAT, "P9_TWSTAT" }, \
78 { P9_RWSTAT, "P9_RWSTAT" })
79
80TRACE_EVENT(9p_client_req,
81 TP_PROTO(struct p9_client *clnt, int8_t type, int tag),
82
83 TP_ARGS(clnt, type, tag),
84
85 TP_STRUCT__entry(
86 __field( void *, clnt )
87 __field( __u8, type )
88 __field( __u32, tag )
89 ),
90
91 TP_fast_assign(
92 __entry->clnt = clnt;
93 __entry->type = type;
94 __entry->tag = tag;
95 ),
96
97 TP_printk("client %lu request %s tag %d",
98 (long)__entry->clnt, show_9p_op(__entry->type),
99 __entry->tag)
100 );
101
102TRACE_EVENT(9p_client_res,
103 TP_PROTO(struct p9_client *clnt, int8_t type, int tag, int err),
104
105 TP_ARGS(clnt, type, tag, err),
106
107 TP_STRUCT__entry(
108 __field( void *, clnt )
109 __field( __u8, type )
110 __field( __u32, tag )
111 __field( __u32, err )
112 ),
113
114 TP_fast_assign(
115 __entry->clnt = clnt;
116 __entry->type = type;
117 __entry->tag = tag;
118 __entry->err = err;
119 ),
120
121 TP_printk("client %lu response %s tag %d err %d",
122 (long)__entry->clnt, show_9p_op(__entry->type),
123 __entry->tag, __entry->err)
124);
125
126/* dump 32 bytes of protocol data */
127#define P9_PROTO_DUMP_SZ 32
128TRACE_EVENT(9p_protocol_dump,
129 TP_PROTO(struct p9_client *clnt, struct p9_fcall *pdu),
130
131 TP_ARGS(clnt, pdu),
132
133 TP_STRUCT__entry(
134 __field( void *, clnt )
135 __field( __u8, type )
136 __field( __u16, tag )
137 __array( unsigned char, line, P9_PROTO_DUMP_SZ )
138 ),
139
140 TP_fast_assign(
141 __entry->clnt = clnt;
142 __entry->type = pdu->id;
143 __entry->tag = pdu->tag;
144 memcpy(__entry->line, pdu->sdata, P9_PROTO_DUMP_SZ);
145 ),
146 TP_printk("clnt %lu %s(tag = %d)\n%.3x: "
147 "%02x %02x %02x %02x %02x %02x %02x %02x "
148 "%02x %02x %02x %02x %02x %02x %02x %02x\n"
149 "%.3x: "
150 "%02x %02x %02x %02x %02x %02x %02x %02x "
151 "%02x %02x %02x %02x %02x %02x %02x %02x\n",
152 (long)__entry->clnt, show_9p_op(__entry->type),
153 __entry->tag, 0,
154 __entry->line[0], __entry->line[1],
155 __entry->line[2], __entry->line[3],
156 __entry->line[4], __entry->line[5],
157 __entry->line[6], __entry->line[7],
158 __entry->line[8], __entry->line[9],
159 __entry->line[10], __entry->line[11],
160 __entry->line[12], __entry->line[13],
161 __entry->line[14], __entry->line[15],
162 16,
163 __entry->line[16], __entry->line[17],
164 __entry->line[18], __entry->line[19],
165 __entry->line[20], __entry->line[21],
166 __entry->line[22], __entry->line[23],
167 __entry->line[24], __entry->line[25],
168 __entry->line[26], __entry->line[27],
169 __entry->line[28], __entry->line[29],
170 __entry->line[30], __entry->line[31])
171 );
172
173#endif /* _TRACE_9P_H */
174
175/* This part must be outside protection */
176#include <trace/define_trace.h>
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 603f5a0f0365..ab26f8aa3c78 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -216,6 +216,31 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
216 216
217); 217);
218 218
219TRACE_EVENT(snd_soc_dapm_walk_done,
220
221 TP_PROTO(struct snd_soc_card *card),
222
223 TP_ARGS(card),
224
225 TP_STRUCT__entry(
226 __string( name, card->name )
227 __field( int, power_checks )
228 __field( int, path_checks )
229 __field( int, neighbour_checks )
230 ),
231
232 TP_fast_assign(
233 __assign_str(name, card->name);
234 __entry->power_checks = card->dapm_stats.power_checks;
235 __entry->path_checks = card->dapm_stats.path_checks;
236 __entry->neighbour_checks = card->dapm_stats.neighbour_checks;
237 ),
238
239 TP_printk("%s: checks %d power, %d path, %d neighbour",
240 __get_str(name), (int)__entry->power_checks,
241 (int)__entry->path_checks, (int)__entry->neighbour_checks)
242);
243
219TRACE_EVENT(snd_soc_jack_irq, 244TRACE_EVENT(snd_soc_jack_irq,
220 245
221 TP_PROTO(const char *name), 246 TP_PROTO(const char *name),
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index b50a54736242..748ff7cbe555 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -9,9 +9,12 @@
9 9
10struct ext4_allocation_context; 10struct ext4_allocation_context;
11struct ext4_allocation_request; 11struct ext4_allocation_request;
12struct ext4_extent;
12struct ext4_prealloc_space; 13struct ext4_prealloc_space;
13struct ext4_inode_info; 14struct ext4_inode_info;
14struct mpage_da_data; 15struct mpage_da_data;
16struct ext4_map_blocks;
17struct ext4_extent;
15 18
16#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) 19#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
17 20
@@ -1032,9 +1035,9 @@ TRACE_EVENT(ext4_forget,
1032); 1035);
1033 1036
1034TRACE_EVENT(ext4_da_update_reserve_space, 1037TRACE_EVENT(ext4_da_update_reserve_space,
1035 TP_PROTO(struct inode *inode, int used_blocks), 1038 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
1036 1039
1037 TP_ARGS(inode, used_blocks), 1040 TP_ARGS(inode, used_blocks, quota_claim),
1038 1041
1039 TP_STRUCT__entry( 1042 TP_STRUCT__entry(
1040 __field( dev_t, dev ) 1043 __field( dev_t, dev )
@@ -1045,6 +1048,7 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1045 __field( int, reserved_data_blocks ) 1048 __field( int, reserved_data_blocks )
1046 __field( int, reserved_meta_blocks ) 1049 __field( int, reserved_meta_blocks )
1047 __field( int, allocated_meta_blocks ) 1050 __field( int, allocated_meta_blocks )
1051 __field( int, quota_claim )
1048 ), 1052 ),
1049 1053
1050 TP_fast_assign( 1054 TP_fast_assign(
@@ -1053,19 +1057,24 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1053 __entry->mode = inode->i_mode; 1057 __entry->mode = inode->i_mode;
1054 __entry->i_blocks = inode->i_blocks; 1058 __entry->i_blocks = inode->i_blocks;
1055 __entry->used_blocks = used_blocks; 1059 __entry->used_blocks = used_blocks;
1056 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1060 __entry->reserved_data_blocks =
1057 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1061 EXT4_I(inode)->i_reserved_data_blocks;
1058 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1062 __entry->reserved_meta_blocks =
1063 EXT4_I(inode)->i_reserved_meta_blocks;
1064 __entry->allocated_meta_blocks =
1065 EXT4_I(inode)->i_allocated_meta_blocks;
1066 __entry->quota_claim = quota_claim;
1059 ), 1067 ),
1060 1068
1061 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " 1069 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1062 "reserved_data_blocks %d reserved_meta_blocks %d " 1070 "reserved_data_blocks %d reserved_meta_blocks %d "
1063 "allocated_meta_blocks %d", 1071 "allocated_meta_blocks %d quota_claim %d",
1064 MAJOR(__entry->dev), MINOR(__entry->dev), 1072 MAJOR(__entry->dev), MINOR(__entry->dev),
1065 (unsigned long) __entry->ino, 1073 (unsigned long) __entry->ino,
1066 __entry->mode, __entry->i_blocks, 1074 __entry->mode, __entry->i_blocks,
1067 __entry->used_blocks, __entry->reserved_data_blocks, 1075 __entry->used_blocks, __entry->reserved_data_blocks,
1068 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1076 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks,
1077 __entry->quota_claim)
1069); 1078);
1070 1079
1071TRACE_EVENT(ext4_da_reserve_space, 1080TRACE_EVENT(ext4_da_reserve_space,
@@ -1386,6 +1395,87 @@ DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
1386 TP_ARGS(inode) 1395 TP_ARGS(inode)
1387); 1396);
1388 1397
1398/* 'ux' is the uninitialized extent. */
1399TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
1400 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1401 struct ext4_extent *ux),
1402
1403 TP_ARGS(inode, map, ux),
1404
1405 TP_STRUCT__entry(
1406 __field( ino_t, ino )
1407 __field( dev_t, dev )
1408 __field( ext4_lblk_t, m_lblk )
1409 __field( unsigned, m_len )
1410 __field( ext4_lblk_t, u_lblk )
1411 __field( unsigned, u_len )
1412 __field( ext4_fsblk_t, u_pblk )
1413 ),
1414
1415 TP_fast_assign(
1416 __entry->ino = inode->i_ino;
1417 __entry->dev = inode->i_sb->s_dev;
1418 __entry->m_lblk = map->m_lblk;
1419 __entry->m_len = map->m_len;
1420 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1421 __entry->u_len = ext4_ext_get_actual_len(ux);
1422 __entry->u_pblk = ext4_ext_pblock(ux);
1423 ),
1424
1425 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1426 "u_pblk %llu",
1427 MAJOR(__entry->dev), MINOR(__entry->dev),
1428 (unsigned long) __entry->ino,
1429 __entry->m_lblk, __entry->m_len,
1430 __entry->u_lblk, __entry->u_len, __entry->u_pblk)
1431);
1432
1433/*
1434 * 'ux' is the uninitialized extent.
1435 * 'ix' is the initialized extent to which blocks are transferred.
1436 */
1437TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
1438 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1439 struct ext4_extent *ux, struct ext4_extent *ix),
1440
1441 TP_ARGS(inode, map, ux, ix),
1442
1443 TP_STRUCT__entry(
1444 __field( ino_t, ino )
1445 __field( dev_t, dev )
1446 __field( ext4_lblk_t, m_lblk )
1447 __field( unsigned, m_len )
1448 __field( ext4_lblk_t, u_lblk )
1449 __field( unsigned, u_len )
1450 __field( ext4_fsblk_t, u_pblk )
1451 __field( ext4_lblk_t, i_lblk )
1452 __field( unsigned, i_len )
1453 __field( ext4_fsblk_t, i_pblk )
1454 ),
1455
1456 TP_fast_assign(
1457 __entry->ino = inode->i_ino;
1458 __entry->dev = inode->i_sb->s_dev;
1459 __entry->m_lblk = map->m_lblk;
1460 __entry->m_len = map->m_len;
1461 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1462 __entry->u_len = ext4_ext_get_actual_len(ux);
1463 __entry->u_pblk = ext4_ext_pblock(ux);
1464 __entry->i_lblk = le32_to_cpu(ix->ee_block);
1465 __entry->i_len = ext4_ext_get_actual_len(ix);
1466 __entry->i_pblk = ext4_ext_pblock(ix);
1467 ),
1468
1469 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
1470 "u_lblk %u u_len %u u_pblk %llu "
1471 "i_lblk %u i_len %u i_pblk %llu ",
1472 MAJOR(__entry->dev), MINOR(__entry->dev),
1473 (unsigned long) __entry->ino,
1474 __entry->m_lblk, __entry->m_len,
1475 __entry->u_lblk, __entry->u_len, __entry->u_pblk,
1476 __entry->i_lblk, __entry->i_len, __entry->i_pblk)
1477);
1478
1389DECLARE_EVENT_CLASS(ext4__map_blocks_enter, 1479DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
1390 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 1480 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1391 unsigned int len, unsigned int flags), 1481 unsigned int len, unsigned int flags),
@@ -1589,6 +1679,382 @@ DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
1589 TP_ARGS(sb, group, start, len) 1679 TP_ARGS(sb, group, start, len)
1590); 1680);
1591 1681
1682TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
1683 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1684 unsigned int allocated, ext4_fsblk_t newblock),
1685
1686 TP_ARGS(inode, map, allocated, newblock),
1687
1688 TP_STRUCT__entry(
1689 __field( ino_t, ino )
1690 __field( dev_t, dev )
1691 __field( ext4_lblk_t, lblk )
1692 __field( ext4_fsblk_t, pblk )
1693 __field( unsigned int, len )
1694 __field( int, flags )
1695 __field( unsigned int, allocated )
1696 __field( ext4_fsblk_t, newblk )
1697 ),
1698
1699 TP_fast_assign(
1700 __entry->ino = inode->i_ino;
1701 __entry->dev = inode->i_sb->s_dev;
1702 __entry->lblk = map->m_lblk;
1703 __entry->pblk = map->m_pblk;
1704 __entry->len = map->m_len;
1705 __entry->flags = map->m_flags;
1706 __entry->allocated = allocated;
1707 __entry->newblk = newblock;
1708 ),
1709
1710 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d"
1711 "allocated %d newblock %llu",
1712 MAJOR(__entry->dev), MINOR(__entry->dev),
1713 (unsigned long) __entry->ino,
1714 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
1715 __entry->len, __entry->flags,
1716 (unsigned int) __entry->allocated,
1717 (unsigned long long) __entry->newblk)
1718);
1719
1720TRACE_EVENT(ext4_get_implied_cluster_alloc_exit,
1721 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1722
1723 TP_ARGS(sb, map, ret),
1724
1725 TP_STRUCT__entry(
1726 __field( dev_t, dev )
1727 __field( ext4_lblk_t, lblk )
1728 __field( ext4_fsblk_t, pblk )
1729 __field( unsigned int, len )
1730 __field( unsigned int, flags )
1731 __field( int, ret )
1732 ),
1733
1734 TP_fast_assign(
1735 __entry->dev = sb->s_dev;
1736 __entry->lblk = map->m_lblk;
1737 __entry->pblk = map->m_pblk;
1738 __entry->len = map->m_len;
1739 __entry->flags = map->m_flags;
1740 __entry->ret = ret;
1741 ),
1742
1743 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d",
1744 MAJOR(__entry->dev), MINOR(__entry->dev),
1745 __entry->lblk, (unsigned long long) __entry->pblk,
1746 __entry->len, __entry->flags, __entry->ret)
1747);
1748
1749TRACE_EVENT(ext4_ext_put_in_cache,
1750 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len,
1751 ext4_fsblk_t start),
1752
1753 TP_ARGS(inode, lblk, len, start),
1754
1755 TP_STRUCT__entry(
1756 __field( ino_t, ino )
1757 __field( dev_t, dev )
1758 __field( ext4_lblk_t, lblk )
1759 __field( unsigned int, len )
1760 __field( ext4_fsblk_t, start )
1761 ),
1762
1763 TP_fast_assign(
1764 __entry->ino = inode->i_ino;
1765 __entry->dev = inode->i_sb->s_dev;
1766 __entry->lblk = lblk;
1767 __entry->len = len;
1768 __entry->start = start;
1769 ),
1770
1771 TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu",
1772 MAJOR(__entry->dev), MINOR(__entry->dev),
1773 (unsigned long) __entry->ino,
1774 (unsigned) __entry->lblk,
1775 __entry->len,
1776 (unsigned long long) __entry->start)
1777);
1778
1779TRACE_EVENT(ext4_ext_in_cache,
1780 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1781
1782 TP_ARGS(inode, lblk, ret),
1783
1784 TP_STRUCT__entry(
1785 __field( ino_t, ino )
1786 __field( dev_t, dev )
1787 __field( ext4_lblk_t, lblk )
1788 __field( int, ret )
1789 ),
1790
1791 TP_fast_assign(
1792 __entry->ino = inode->i_ino;
1793 __entry->dev = inode->i_sb->s_dev;
1794 __entry->lblk = lblk;
1795 __entry->ret = ret;
1796 ),
1797
1798 TP_printk("dev %d,%d ino %lu lblk %u ret %d",
1799 MAJOR(__entry->dev), MINOR(__entry->dev),
1800 (unsigned long) __entry->ino,
1801 (unsigned) __entry->lblk,
1802 __entry->ret)
1803
1804);
1805
1806TRACE_EVENT(ext4_find_delalloc_range,
1807 TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to,
1808 int reverse, int found, ext4_lblk_t found_blk),
1809
1810 TP_ARGS(inode, from, to, reverse, found, found_blk),
1811
1812 TP_STRUCT__entry(
1813 __field( ino_t, ino )
1814 __field( dev_t, dev )
1815 __field( ext4_lblk_t, from )
1816 __field( ext4_lblk_t, to )
1817 __field( int, reverse )
1818 __field( int, found )
1819 __field( ext4_lblk_t, found_blk )
1820 ),
1821
1822 TP_fast_assign(
1823 __entry->ino = inode->i_ino;
1824 __entry->dev = inode->i_sb->s_dev;
1825 __entry->from = from;
1826 __entry->to = to;
1827 __entry->reverse = reverse;
1828 __entry->found = found;
1829 __entry->found_blk = found_blk;
1830 ),
1831
1832 TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d "
1833 "(blk = %u)",
1834 MAJOR(__entry->dev), MINOR(__entry->dev),
1835 (unsigned long) __entry->ino,
1836 (unsigned) __entry->from, (unsigned) __entry->to,
1837 __entry->reverse, __entry->found,
1838 (unsigned) __entry->found_blk)
1839);
1840
1841TRACE_EVENT(ext4_get_reserved_cluster_alloc,
1842 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1843
1844 TP_ARGS(inode, lblk, len),
1845
1846 TP_STRUCT__entry(
1847 __field( ino_t, ino )
1848 __field( dev_t, dev )
1849 __field( ext4_lblk_t, lblk )
1850 __field( unsigned int, len )
1851 ),
1852
1853 TP_fast_assign(
1854 __entry->ino = inode->i_ino;
1855 __entry->dev = inode->i_sb->s_dev;
1856 __entry->lblk = lblk;
1857 __entry->len = len;
1858 ),
1859
1860 TP_printk("dev %d,%d ino %lu lblk %u len %u",
1861 MAJOR(__entry->dev), MINOR(__entry->dev),
1862 (unsigned long) __entry->ino,
1863 (unsigned) __entry->lblk,
1864 __entry->len)
1865);
1866
1867TRACE_EVENT(ext4_ext_show_extent,
1868 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk,
1869 unsigned short len),
1870
1871 TP_ARGS(inode, lblk, pblk, len),
1872
1873 TP_STRUCT__entry(
1874 __field( ino_t, ino )
1875 __field( dev_t, dev )
1876 __field( ext4_lblk_t, lblk )
1877 __field( ext4_fsblk_t, pblk )
1878 __field( unsigned short, len )
1879 ),
1880
1881 TP_fast_assign(
1882 __entry->ino = inode->i_ino;
1883 __entry->dev = inode->i_sb->s_dev;
1884 __entry->lblk = lblk;
1885 __entry->pblk = pblk;
1886 __entry->len = len;
1887 ),
1888
1889 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
1890 MAJOR(__entry->dev), MINOR(__entry->dev),
1891 (unsigned long) __entry->ino,
1892 (unsigned) __entry->lblk,
1893 (unsigned long long) __entry->pblk,
1894 (unsigned short) __entry->len)
1895);
1896
1897TRACE_EVENT(ext4_remove_blocks,
1898 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1899 ext4_lblk_t from, ext4_fsblk_t to,
1900 ext4_fsblk_t partial_cluster),
1901
1902 TP_ARGS(inode, ex, from, to, partial_cluster),
1903
1904 TP_STRUCT__entry(
1905 __field( ino_t, ino )
1906 __field( dev_t, dev )
1907 __field( ext4_lblk_t, ee_lblk )
1908 __field( ext4_fsblk_t, ee_pblk )
1909 __field( unsigned short, ee_len )
1910 __field( ext4_lblk_t, from )
1911 __field( ext4_lblk_t, to )
1912 __field( ext4_fsblk_t, partial )
1913 ),
1914
1915 TP_fast_assign(
1916 __entry->ino = inode->i_ino;
1917 __entry->dev = inode->i_sb->s_dev;
1918 __entry->ee_lblk = cpu_to_le32(ex->ee_block);
1919 __entry->ee_pblk = ext4_ext_pblock(ex);
1920 __entry->ee_len = ext4_ext_get_actual_len(ex);
1921 __entry->from = from;
1922 __entry->to = to;
1923 __entry->partial = partial_cluster;
1924 ),
1925
1926 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
1927 "from %u to %u partial_cluster %u",
1928 MAJOR(__entry->dev), MINOR(__entry->dev),
1929 (unsigned long) __entry->ino,
1930 (unsigned) __entry->ee_lblk,
1931 (unsigned long long) __entry->ee_pblk,
1932 (unsigned short) __entry->ee_len,
1933 (unsigned) __entry->from,
1934 (unsigned) __entry->to,
1935 (unsigned) __entry->partial)
1936);
1937
1938TRACE_EVENT(ext4_ext_rm_leaf,
1939 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1940 struct ext4_extent *ex, ext4_fsblk_t partial_cluster),
1941
1942 TP_ARGS(inode, start, ex, partial_cluster),
1943
1944 TP_STRUCT__entry(
1945 __field( ino_t, ino )
1946 __field( dev_t, dev )
1947 __field( ext4_lblk_t, start )
1948 __field( ext4_lblk_t, ee_lblk )
1949 __field( ext4_fsblk_t, ee_pblk )
1950 __field( short, ee_len )
1951 __field( ext4_fsblk_t, partial )
1952 ),
1953
1954 TP_fast_assign(
1955 __entry->ino = inode->i_ino;
1956 __entry->dev = inode->i_sb->s_dev;
1957 __entry->start = start;
1958 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
1959 __entry->ee_pblk = ext4_ext_pblock(ex);
1960 __entry->ee_len = ext4_ext_get_actual_len(ex);
1961 __entry->partial = partial_cluster;
1962 ),
1963
1964 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
1965 "partial_cluster %u",
1966 MAJOR(__entry->dev), MINOR(__entry->dev),
1967 (unsigned long) __entry->ino,
1968 (unsigned) __entry->start,
1969 (unsigned) __entry->ee_lblk,
1970 (unsigned long long) __entry->ee_pblk,
1971 (unsigned short) __entry->ee_len,
1972 (unsigned) __entry->partial)
1973);
1974
1975TRACE_EVENT(ext4_ext_rm_idx,
1976 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
1977
1978 TP_ARGS(inode, pblk),
1979
1980 TP_STRUCT__entry(
1981 __field( ino_t, ino )
1982 __field( dev_t, dev )
1983 __field( ext4_fsblk_t, pblk )
1984 ),
1985
1986 TP_fast_assign(
1987 __entry->ino = inode->i_ino;
1988 __entry->dev = inode->i_sb->s_dev;
1989 __entry->pblk = pblk;
1990 ),
1991
1992 TP_printk("dev %d,%d ino %lu index_pblk %llu",
1993 MAJOR(__entry->dev), MINOR(__entry->dev),
1994 (unsigned long) __entry->ino,
1995 (unsigned long long) __entry->pblk)
1996);
1997
1998TRACE_EVENT(ext4_ext_remove_space,
1999 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth),
2000
2001 TP_ARGS(inode, start, depth),
2002
2003 TP_STRUCT__entry(
2004 __field( ino_t, ino )
2005 __field( dev_t, dev )
2006 __field( ext4_lblk_t, start )
2007 __field( int, depth )
2008 ),
2009
2010 TP_fast_assign(
2011 __entry->ino = inode->i_ino;
2012 __entry->dev = inode->i_sb->s_dev;
2013 __entry->start = start;
2014 __entry->depth = depth;
2015 ),
2016
2017 TP_printk("dev %d,%d ino %lu since %u depth %d",
2018 MAJOR(__entry->dev), MINOR(__entry->dev),
2019 (unsigned long) __entry->ino,
2020 (unsigned) __entry->start,
2021 __entry->depth)
2022);
2023
2024TRACE_EVENT(ext4_ext_remove_space_done,
2025 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth,
2026 ext4_lblk_t partial, unsigned short eh_entries),
2027
2028 TP_ARGS(inode, start, depth, partial, eh_entries),
2029
2030 TP_STRUCT__entry(
2031 __field( ino_t, ino )
2032 __field( dev_t, dev )
2033 __field( ext4_lblk_t, start )
2034 __field( int, depth )
2035 __field( ext4_lblk_t, partial )
2036 __field( unsigned short, eh_entries )
2037 ),
2038
2039 TP_fast_assign(
2040 __entry->ino = inode->i_ino;
2041 __entry->dev = inode->i_sb->s_dev;
2042 __entry->start = start;
2043 __entry->depth = depth;
2044 __entry->partial = partial;
2045 __entry->eh_entries = eh_entries;
2046 ),
2047
2048 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u "
2049 "remaining_entries %u",
2050 MAJOR(__entry->dev), MINOR(__entry->dev),
2051 (unsigned long) __entry->ino,
2052 (unsigned) __entry->start,
2053 __entry->depth,
2054 (unsigned) __entry->partial,
2055 (unsigned short) __entry->eh_entries)
2056);
2057
1592#endif /* _TRACE_EXT4_H */ 2058#endif /* _TRACE_EXT4_H */
1593 2059
1594/* This part must be outside protection */ 2060/* This part must be outside protection */
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
new file mode 100644
index 000000000000..669fbd62ec25
--- /dev/null
+++ b/include/trace/events/rcu.h
@@ -0,0 +1,459 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM rcu
3
4#if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_RCU_H
6
7#include <linux/tracepoint.h>
8
9/*
10 * Tracepoint for start/end markers used for utilization calculations.
11 * By convention, the string is of the following forms:
12 *
13 * "Start <activity>" -- Mark the start of the specified activity,
14 * such as "context switch". Nesting is permitted.
15 * "End <activity>" -- Mark the end of the specified activity.
16 *
17 * An "@" character within "<activity>" is a comment character: Data
18 * reduction scripts will ignore the "@" and the remainder of the line.
19 */
20TRACE_EVENT(rcu_utilization,
21
22 TP_PROTO(char *s),
23
24 TP_ARGS(s),
25
26 TP_STRUCT__entry(
27 __field(char *, s)
28 ),
29
30 TP_fast_assign(
31 __entry->s = s;
32 ),
33
34 TP_printk("%s", __entry->s)
35);
36
37#ifdef CONFIG_RCU_TRACE
38
39#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
40
41/*
42 * Tracepoint for grace-period events: starting and ending a grace
43 * period ("start" and "end", respectively), a CPU noting the start
44 * of a new grace period or the end of an old grace period ("cpustart"
45 * and "cpuend", respectively), a CPU passing through a quiescent
46 * state ("cpuqs"), a CPU coming online or going offline ("cpuonl"
47 * and "cpuofl", respectively), and a CPU being kicked for being too
48 * long in dyntick-idle mode ("kick").
49 */
50TRACE_EVENT(rcu_grace_period,
51
52 TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent),
53
54 TP_ARGS(rcuname, gpnum, gpevent),
55
56 TP_STRUCT__entry(
57 __field(char *, rcuname)
58 __field(unsigned long, gpnum)
59 __field(char *, gpevent)
60 ),
61
62 TP_fast_assign(
63 __entry->rcuname = rcuname;
64 __entry->gpnum = gpnum;
65 __entry->gpevent = gpevent;
66 ),
67
68 TP_printk("%s %lu %s",
69 __entry->rcuname, __entry->gpnum, __entry->gpevent)
70);
71
72/*
73 * Tracepoint for grace-period-initialization events. These are
74 * distinguished by the type of RCU, the new grace-period number, the
75 * rcu_node structure level, the starting and ending CPU covered by the
76 * rcu_node structure, and the mask of CPUs that will be waited for.
77 * All but the type of RCU are extracted from the rcu_node structure.
78 */
79TRACE_EVENT(rcu_grace_period_init,
80
81 TP_PROTO(char *rcuname, unsigned long gpnum, u8 level,
82 int grplo, int grphi, unsigned long qsmask),
83
84 TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask),
85
86 TP_STRUCT__entry(
87 __field(char *, rcuname)
88 __field(unsigned long, gpnum)
89 __field(u8, level)
90 __field(int, grplo)
91 __field(int, grphi)
92 __field(unsigned long, qsmask)
93 ),
94
95 TP_fast_assign(
96 __entry->rcuname = rcuname;
97 __entry->gpnum = gpnum;
98 __entry->level = level;
99 __entry->grplo = grplo;
100 __entry->grphi = grphi;
101 __entry->qsmask = qsmask;
102 ),
103
104 TP_printk("%s %lu %u %d %d %lx",
105 __entry->rcuname, __entry->gpnum, __entry->level,
106 __entry->grplo, __entry->grphi, __entry->qsmask)
107);
108
109/*
110 * Tracepoint for tasks blocking within preemptible-RCU read-side
111 * critical sections. Track the type of RCU (which one day might
112 * include SRCU), the grace-period number that the task is blocking
113 * (the current or the next), and the task's PID.
114 */
115TRACE_EVENT(rcu_preempt_task,
116
117 TP_PROTO(char *rcuname, int pid, unsigned long gpnum),
118
119 TP_ARGS(rcuname, pid, gpnum),
120
121 TP_STRUCT__entry(
122 __field(char *, rcuname)
123 __field(unsigned long, gpnum)
124 __field(int, pid)
125 ),
126
127 TP_fast_assign(
128 __entry->rcuname = rcuname;
129 __entry->gpnum = gpnum;
130 __entry->pid = pid;
131 ),
132
133 TP_printk("%s %lu %d",
134 __entry->rcuname, __entry->gpnum, __entry->pid)
135);
136
137/*
138 * Tracepoint for tasks that blocked within a given preemptible-RCU
139 * read-side critical section exiting that critical section. Track the
140 * type of RCU (which one day might include SRCU) and the task's PID.
141 */
142TRACE_EVENT(rcu_unlock_preempted_task,
143
144 TP_PROTO(char *rcuname, unsigned long gpnum, int pid),
145
146 TP_ARGS(rcuname, gpnum, pid),
147
148 TP_STRUCT__entry(
149 __field(char *, rcuname)
150 __field(unsigned long, gpnum)
151 __field(int, pid)
152 ),
153
154 TP_fast_assign(
155 __entry->rcuname = rcuname;
156 __entry->gpnum = gpnum;
157 __entry->pid = pid;
158 ),
159
160 TP_printk("%s %lu %d", __entry->rcuname, __entry->gpnum, __entry->pid)
161);
162
163/*
164 * Tracepoint for quiescent-state-reporting events. These are
165 * distinguished by the type of RCU, the grace-period number, the
166 * mask of quiescent lower-level entities, the rcu_node structure level,
167 * the starting and ending CPU covered by the rcu_node structure, and
168 * whether there are any blocked tasks blocking the current grace period.
169 * All but the type of RCU are extracted from the rcu_node structure.
170 */
171TRACE_EVENT(rcu_quiescent_state_report,
172
173 TP_PROTO(char *rcuname, unsigned long gpnum,
174 unsigned long mask, unsigned long qsmask,
175 u8 level, int grplo, int grphi, int gp_tasks),
176
177 TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks),
178
179 TP_STRUCT__entry(
180 __field(char *, rcuname)
181 __field(unsigned long, gpnum)
182 __field(unsigned long, mask)
183 __field(unsigned long, qsmask)
184 __field(u8, level)
185 __field(int, grplo)
186 __field(int, grphi)
187 __field(u8, gp_tasks)
188 ),
189
190 TP_fast_assign(
191 __entry->rcuname = rcuname;
192 __entry->gpnum = gpnum;
193 __entry->mask = mask;
194 __entry->qsmask = qsmask;
195 __entry->level = level;
196 __entry->grplo = grplo;
197 __entry->grphi = grphi;
198 __entry->gp_tasks = gp_tasks;
199 ),
200
201 TP_printk("%s %lu %lx>%lx %u %d %d %u",
202 __entry->rcuname, __entry->gpnum,
203 __entry->mask, __entry->qsmask, __entry->level,
204 __entry->grplo, __entry->grphi, __entry->gp_tasks)
205);
206
207/*
208 * Tracepoint for quiescent states detected by force_quiescent_state().
209 * These trace events include the type of RCU, the grace-period number
210 * that was blocked by the CPU, the CPU itself, and the type of quiescent
211 * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline,
212 * or "kick" when kicking a CPU that has been in dyntick-idle mode for
213 * too long.
214 */
215TRACE_EVENT(rcu_fqs,
216
217 TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent),
218
219 TP_ARGS(rcuname, gpnum, cpu, qsevent),
220
221 TP_STRUCT__entry(
222 __field(char *, rcuname)
223 __field(unsigned long, gpnum)
224 __field(int, cpu)
225 __field(char *, qsevent)
226 ),
227
228 TP_fast_assign(
229 __entry->rcuname = rcuname;
230 __entry->gpnum = gpnum;
231 __entry->cpu = cpu;
232 __entry->qsevent = qsevent;
233 ),
234
235 TP_printk("%s %lu %d %s",
236 __entry->rcuname, __entry->gpnum,
237 __entry->cpu, __entry->qsevent)
238);
239
240#endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */
241
242/*
243 * Tracepoint for dyntick-idle entry/exit events. These take a string
244 * as argument: "Start" for entering dyntick-idle mode and "End" for
245 * leaving it.
246 */
247TRACE_EVENT(rcu_dyntick,
248
249 TP_PROTO(char *polarity),
250
251 TP_ARGS(polarity),
252
253 TP_STRUCT__entry(
254 __field(char *, polarity)
255 ),
256
257 TP_fast_assign(
258 __entry->polarity = polarity;
259 ),
260
261 TP_printk("%s", __entry->polarity)
262);
263
264/*
265 * Tracepoint for the registration of a single RCU callback function.
266 * The first argument is the type of RCU, the second argument is
267 * a pointer to the RCU callback itself, and the third element is the
268 * new RCU callback queue length for the current CPU.
269 */
270TRACE_EVENT(rcu_callback,
271
272 TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen),
273
274 TP_ARGS(rcuname, rhp, qlen),
275
276 TP_STRUCT__entry(
277 __field(char *, rcuname)
278 __field(void *, rhp)
279 __field(void *, func)
280 __field(long, qlen)
281 ),
282
283 TP_fast_assign(
284 __entry->rcuname = rcuname;
285 __entry->rhp = rhp;
286 __entry->func = rhp->func;
287 __entry->qlen = qlen;
288 ),
289
290 TP_printk("%s rhp=%p func=%pf %ld",
291 __entry->rcuname, __entry->rhp, __entry->func, __entry->qlen)
292);
293
294/*
295 * Tracepoint for the registration of a single RCU callback of the special
296 * kfree() form. The first argument is the RCU type, the second argument
297 * is a pointer to the RCU callback, the third argument is the offset
298 * of the callback within the enclosing RCU-protected data structure,
299 * and the fourth argument is the new RCU callback queue length for the
300 * current CPU.
301 */
302TRACE_EVENT(rcu_kfree_callback,
303
304 TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset,
305 long qlen),
306
307 TP_ARGS(rcuname, rhp, offset, qlen),
308
309 TP_STRUCT__entry(
310 __field(char *, rcuname)
311 __field(void *, rhp)
312 __field(unsigned long, offset)
313 __field(long, qlen)
314 ),
315
316 TP_fast_assign(
317 __entry->rcuname = rcuname;
318 __entry->rhp = rhp;
319 __entry->offset = offset;
320 __entry->qlen = qlen;
321 ),
322
323 TP_printk("%s rhp=%p func=%ld %ld",
324 __entry->rcuname, __entry->rhp, __entry->offset,
325 __entry->qlen)
326);
327
328/*
329 * Tracepoint for marking the beginning rcu_do_batch, performed to start
330 * RCU callback invocation. The first argument is the RCU flavor,
331 * the second is the total number of callbacks (including those that
332 * are not yet ready to be invoked), and the third argument is the
333 * current RCU-callback batch limit.
334 */
335TRACE_EVENT(rcu_batch_start,
336
337 TP_PROTO(char *rcuname, long qlen, int blimit),
338
339 TP_ARGS(rcuname, qlen, blimit),
340
341 TP_STRUCT__entry(
342 __field(char *, rcuname)
343 __field(long, qlen)
344 __field(int, blimit)
345 ),
346
347 TP_fast_assign(
348 __entry->rcuname = rcuname;
349 __entry->qlen = qlen;
350 __entry->blimit = blimit;
351 ),
352
353 TP_printk("%s CBs=%ld bl=%d",
354 __entry->rcuname, __entry->qlen, __entry->blimit)
355);
356
357/*
358 * Tracepoint for the invocation of a single RCU callback function.
359 * The first argument is the type of RCU, and the second argument is
360 * a pointer to the RCU callback itself.
361 */
362TRACE_EVENT(rcu_invoke_callback,
363
364 TP_PROTO(char *rcuname, struct rcu_head *rhp),
365
366 TP_ARGS(rcuname, rhp),
367
368 TP_STRUCT__entry(
369 __field(char *, rcuname)
370 __field(void *, rhp)
371 __field(void *, func)
372 ),
373
374 TP_fast_assign(
375 __entry->rcuname = rcuname;
376 __entry->rhp = rhp;
377 __entry->func = rhp->func;
378 ),
379
380 TP_printk("%s rhp=%p func=%pf",
381 __entry->rcuname, __entry->rhp, __entry->func)
382);
383
384/*
385 * Tracepoint for the invocation of a single RCU callback of the special
386 * kfree() form. The first argument is the RCU flavor, the second
387 * argument is a pointer to the RCU callback, and the third argument
388 * is the offset of the callback within the enclosing RCU-protected
389 * data structure.
390 */
391TRACE_EVENT(rcu_invoke_kfree_callback,
392
393 TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset),
394
395 TP_ARGS(rcuname, rhp, offset),
396
397 TP_STRUCT__entry(
398 __field(char *, rcuname)
399 __field(void *, rhp)
400 __field(unsigned long, offset)
401 ),
402
403 TP_fast_assign(
404 __entry->rcuname = rcuname;
405 __entry->rhp = rhp;
406 __entry->offset = offset;
407 ),
408
409 TP_printk("%s rhp=%p func=%ld",
410 __entry->rcuname, __entry->rhp, __entry->offset)
411);
412
413/*
414 * Tracepoint for exiting rcu_do_batch after RCU callbacks have been
415 * invoked. The first argument is the name of the RCU flavor and
416 * the second argument is number of callbacks actually invoked.
417 */
418TRACE_EVENT(rcu_batch_end,
419
420 TP_PROTO(char *rcuname, int callbacks_invoked),
421
422 TP_ARGS(rcuname, callbacks_invoked),
423
424 TP_STRUCT__entry(
425 __field(char *, rcuname)
426 __field(int, callbacks_invoked)
427 ),
428
429 TP_fast_assign(
430 __entry->rcuname = rcuname;
431 __entry->callbacks_invoked = callbacks_invoked;
432 ),
433
434 TP_printk("%s CBs-invoked=%d",
435 __entry->rcuname, __entry->callbacks_invoked)
436);
437
438#else /* #ifdef CONFIG_RCU_TRACE */
439
440#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
441#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, qsmask) do { } while (0)
442#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0)
443#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0)
444#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks) do { } while (0)
445#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
446#define trace_rcu_dyntick(polarity) do { } while (0)
447#define trace_rcu_callback(rcuname, rhp, qlen) do { } while (0)
448#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen) do { } while (0)
449#define trace_rcu_batch_start(rcuname, qlen, blimit) do { } while (0)
450#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
451#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
452#define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0)
453
454#endif /* #else #ifdef CONFIG_RCU_TRACE */
455
456#endif /* _TRACE_RCU_H */
457
458/* This part must be outside protection */
459#include <trace/define_trace.h>
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h
new file mode 100644
index 000000000000..1e3193b8fcc8
--- /dev/null
+++ b/include/trace/events/regmap.h
@@ -0,0 +1,136 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM regmap
3
4#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_REGMAP_H
6
7#include <linux/device.h>
8#include <linux/ktime.h>
9#include <linux/tracepoint.h>
10
11struct regmap;
12
13/*
14 * Log register events
15 */
16DECLARE_EVENT_CLASS(regmap_reg,
17
18 TP_PROTO(struct device *dev, unsigned int reg,
19 unsigned int val),
20
21 TP_ARGS(dev, reg, val),
22
23 TP_STRUCT__entry(
24 __string( name, dev_name(dev) )
25 __field( unsigned int, reg )
26 __field( unsigned int, val )
27 ),
28
29 TP_fast_assign(
30 __assign_str(name, dev_name(dev));
31 __entry->reg = reg;
32 __entry->val = val;
33 ),
34
35 TP_printk("%s reg=%x val=%x", __get_str(name),
36 (unsigned int)__entry->reg,
37 (unsigned int)__entry->val)
38);
39
40DEFINE_EVENT(regmap_reg, regmap_reg_write,
41
42 TP_PROTO(struct device *dev, unsigned int reg,
43 unsigned int val),
44
45 TP_ARGS(dev, reg, val)
46
47);
48
49DEFINE_EVENT(regmap_reg, regmap_reg_read,
50
51 TP_PROTO(struct device *dev, unsigned int reg,
52 unsigned int val),
53
54 TP_ARGS(dev, reg, val)
55
56);
57
58DECLARE_EVENT_CLASS(regmap_block,
59
60 TP_PROTO(struct device *dev, unsigned int reg, int count),
61
62 TP_ARGS(dev, reg, count),
63
64 TP_STRUCT__entry(
65 __string( name, dev_name(dev) )
66 __field( unsigned int, reg )
67 __field( int, count )
68 ),
69
70 TP_fast_assign(
71 __assign_str(name, dev_name(dev));
72 __entry->reg = reg;
73 __entry->count = count;
74 ),
75
76 TP_printk("%s reg=%x count=%d", __get_str(name),
77 (unsigned int)__entry->reg,
78 (int)__entry->count)
79);
80
81DEFINE_EVENT(regmap_block, regmap_hw_read_start,
82
83 TP_PROTO(struct device *dev, unsigned int reg, int count),
84
85 TP_ARGS(dev, reg, count)
86);
87
88DEFINE_EVENT(regmap_block, regmap_hw_read_done,
89
90 TP_PROTO(struct device *dev, unsigned int reg, int count),
91
92 TP_ARGS(dev, reg, count)
93);
94
95DEFINE_EVENT(regmap_block, regmap_hw_write_start,
96
97 TP_PROTO(struct device *dev, unsigned int reg, int count),
98
99 TP_ARGS(dev, reg, count)
100);
101
102DEFINE_EVENT(regmap_block, regmap_hw_write_done,
103
104 TP_PROTO(struct device *dev, unsigned int reg, int count),
105
106 TP_ARGS(dev, reg, count)
107);
108
109TRACE_EVENT(regcache_sync,
110
111 TP_PROTO(struct device *dev, const char *type,
112 const char *status),
113
114 TP_ARGS(dev, type, status),
115
116 TP_STRUCT__entry(
117 __string( name, dev_name(dev) )
118 __string( status, status )
119 __string( type, type )
120 __field( int, type )
121 ),
122
123 TP_fast_assign(
124 __assign_str(name, dev_name(dev));
125 __assign_str(status, status);
126 __assign_str(type, type);
127 ),
128
129 TP_printk("%s type=%s status=%s", __get_str(name),
130 __get_str(type), __get_str(status))
131);
132
133#endif /* _TRACE_REGMAP_H */
134
135/* This part must be outside protection */
136#include <trace/define_trace.h>
diff --git a/include/trace/events/rpm.h b/include/trace/events/rpm.h
new file mode 100644
index 000000000000..d62c558bf64b
--- /dev/null
+++ b/include/trace/events/rpm.h
@@ -0,0 +1,99 @@
1
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM rpm
4
5#if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_RUNTIME_POWER_H
7
8#include <linux/ktime.h>
9#include <linux/tracepoint.h>
10#include <linux/device.h>
11
12/*
13 * The rpm_internal events are used for tracing some important
14 * runtime pm internal functions.
15 */
16DECLARE_EVENT_CLASS(rpm_internal,
17
18 TP_PROTO(struct device *dev, int flags),
19
20 TP_ARGS(dev, flags),
21
22 TP_STRUCT__entry(
23 __string( name, dev_name(dev) )
24 __field( int, flags )
25 __field( int , usage_count )
26 __field( int , disable_depth )
27 __field( int , runtime_auto )
28 __field( int , request_pending )
29 __field( int , irq_safe )
30 __field( int , child_count )
31 ),
32
33 TP_fast_assign(
34 __assign_str(name, dev_name(dev));
35 __entry->flags = flags;
36 __entry->usage_count = atomic_read(
37 &dev->power.usage_count);
38 __entry->disable_depth = dev->power.disable_depth;
39 __entry->runtime_auto = dev->power.runtime_auto;
40 __entry->request_pending = dev->power.request_pending;
41 __entry->irq_safe = dev->power.irq_safe;
42 __entry->child_count = atomic_read(
43 &dev->power.child_count);
44 ),
45
46 TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
47 " irq-%-1d child-%d",
48 __get_str(name), __entry->flags,
49 __entry->usage_count,
50 __entry->disable_depth,
51 __entry->runtime_auto,
52 __entry->request_pending,
53 __entry->irq_safe,
54 __entry->child_count
55 )
56);
57DEFINE_EVENT(rpm_internal, rpm_suspend,
58
59 TP_PROTO(struct device *dev, int flags),
60
61 TP_ARGS(dev, flags)
62);
63DEFINE_EVENT(rpm_internal, rpm_resume,
64
65 TP_PROTO(struct device *dev, int flags),
66
67 TP_ARGS(dev, flags)
68);
69DEFINE_EVENT(rpm_internal, rpm_idle,
70
71 TP_PROTO(struct device *dev, int flags),
72
73 TP_ARGS(dev, flags)
74);
75
76TRACE_EVENT(rpm_return_int,
77 TP_PROTO(struct device *dev, unsigned long ip, int ret),
78 TP_ARGS(dev, ip, ret),
79
80 TP_STRUCT__entry(
81 __string( name, dev_name(dev))
82 __field( unsigned long, ip )
83 __field( int, ret )
84 ),
85
86 TP_fast_assign(
87 __assign_str(name, dev_name(dev));
88 __entry->ip = ip;
89 __entry->ret = ret;
90 ),
91
92 TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
93 __entry->ret)
94);
95
96#endif /* _TRACE_RUNTIME_POWER_H */
97
98/* This part must be outside protection */
99#include <trace/define_trace.h>
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index f6334782a593..959ff18b63b6 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
100 * For all intents and purposes a preempted task is a running task. 100 * For all intents and purposes a preempted task is a running task.
101 */ 101 */
102 if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) 102 if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
103 state = TASK_RUNNING; 103 state = TASK_RUNNING | TASK_STATE_MAX;
104#endif 104#endif
105 105
106 return state; 106 return state;
@@ -137,13 +137,14 @@ TRACE_EVENT(sched_switch,
137 __entry->next_prio = next->prio; 137 __entry->next_prio = next->prio;
138 ), 138 ),
139 139
140 TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d", 140 TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
141 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, 141 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
142 __entry->prev_state ? 142 __entry->prev_state & (TASK_STATE_MAX-1) ?
143 __print_flags(__entry->prev_state, "|", 143 __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
144 { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, 144 { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
145 { 16, "Z" }, { 32, "X" }, { 64, "x" }, 145 { 16, "Z" }, { 32, "X" }, { 64, "x" },
146 { 128, "W" }) : "R", 146 { 128, "W" }) : "R",
147 __entry->prev_state & TASK_STATE_MAX ? "+" : "",
147 __entry->next_comm, __entry->next_pid, __entry->next_prio) 148 __entry->next_comm, __entry->next_pid, __entry->next_prio)
148); 149);
149 150
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
index 36851f7f13da..edc4b3d25a2d 100644
--- a/include/trace/events/vmscan.h
+++ b/include/trace/events/vmscan.h
@@ -266,7 +266,7 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
266 unsigned long nr_lumpy_taken, 266 unsigned long nr_lumpy_taken,
267 unsigned long nr_lumpy_dirty, 267 unsigned long nr_lumpy_dirty,
268 unsigned long nr_lumpy_failed, 268 unsigned long nr_lumpy_failed,
269 int isolate_mode), 269 isolate_mode_t isolate_mode),
270 270
271 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode), 271 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode),
272 272
@@ -278,7 +278,7 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
278 __field(unsigned long, nr_lumpy_taken) 278 __field(unsigned long, nr_lumpy_taken)
279 __field(unsigned long, nr_lumpy_dirty) 279 __field(unsigned long, nr_lumpy_dirty)
280 __field(unsigned long, nr_lumpy_failed) 280 __field(unsigned long, nr_lumpy_failed)
281 __field(int, isolate_mode) 281 __field(isolate_mode_t, isolate_mode)
282 ), 282 ),
283 283
284 TP_fast_assign( 284 TP_fast_assign(
@@ -312,7 +312,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
312 unsigned long nr_lumpy_taken, 312 unsigned long nr_lumpy_taken,
313 unsigned long nr_lumpy_dirty, 313 unsigned long nr_lumpy_dirty,
314 unsigned long nr_lumpy_failed, 314 unsigned long nr_lumpy_failed,
315 int isolate_mode), 315 isolate_mode_t isolate_mode),
316 316
317 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) 317 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
318 318
@@ -327,7 +327,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
327 unsigned long nr_lumpy_taken, 327 unsigned long nr_lumpy_taken,
328 unsigned long nr_lumpy_dirty, 328 unsigned long nr_lumpy_dirty,
329 unsigned long nr_lumpy_failed, 329 unsigned long nr_lumpy_failed,
330 int isolate_mode), 330 isolate_mode_t isolate_mode),
331 331
332 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode) 332 TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
333 333
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 533c49f48047..769724944fc6 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -711,6 +711,9 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
711#undef __perf_count 711#undef __perf_count
712#define __perf_count(c) __count = (c) 712#define __perf_count(c) __count = (c)
713 713
714#undef TP_perf_assign
715#define TP_perf_assign(args...) args
716
714#undef DECLARE_EVENT_CLASS 717#undef DECLARE_EVENT_CLASS
715#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 718#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
716static notrace void \ 719static notrace void \