aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/bcache.h271
-rw-r--r--include/trace/events/block.h12
-rw-r--r--include/trace/events/ext4.h16
-rw-r--r--include/trace/events/f2fs.h682
-rw-r--r--include/trace/events/filemap.h58
-rw-r--r--include/trace/events/host1x.h253
-rw-r--r--include/trace/events/jbd2.h21
-rw-r--r--include/trace/events/kvm.h12
-rw-r--r--include/trace/events/printk.h25
-rw-r--r--include/trace/events/rcu.h55
-rw-r--r--include/trace/events/regmap.h48
-rw-r--r--include/trace/events/timer.h31
-rw-r--r--include/trace/events/writeback.h5
13 files changed, 1440 insertions, 49 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h
new file mode 100644
index 000000000000..3cc5a0b278c3
--- /dev/null
+++ b/include/trace/events/bcache.h
@@ -0,0 +1,271 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM bcache
3
4#if !defined(_TRACE_BCACHE_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_BCACHE_H
6
7#include <linux/tracepoint.h>
8
9struct search;
10
11DECLARE_EVENT_CLASS(bcache_request,
12
13 TP_PROTO(struct search *s, struct bio *bio),
14
15 TP_ARGS(s, bio),
16
17 TP_STRUCT__entry(
18 __field(dev_t, dev )
19 __field(unsigned int, orig_major )
20 __field(unsigned int, orig_minor )
21 __field(sector_t, sector )
22 __field(dev_t, orig_sector )
23 __field(unsigned int, nr_sector )
24 __array(char, rwbs, 6 )
25 __array(char, comm, TASK_COMM_LEN )
26 ),
27
28 TP_fast_assign(
29 __entry->dev = bio->bi_bdev->bd_dev;
30 __entry->orig_major = s->d->disk->major;
31 __entry->orig_minor = s->d->disk->first_minor;
32 __entry->sector = bio->bi_sector;
33 __entry->orig_sector = bio->bi_sector - 16;
34 __entry->nr_sector = bio->bi_size >> 9;
35 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
36 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
37 ),
38
39 TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d @ %llu)",
40 MAJOR(__entry->dev), MINOR(__entry->dev),
41 __entry->rwbs,
42 (unsigned long long)__entry->sector,
43 __entry->nr_sector, __entry->comm,
44 __entry->orig_major, __entry->orig_minor,
45 (unsigned long long)__entry->orig_sector)
46);
47
48DEFINE_EVENT(bcache_request, bcache_request_start,
49
50 TP_PROTO(struct search *s, struct bio *bio),
51
52 TP_ARGS(s, bio)
53);
54
55DEFINE_EVENT(bcache_request, bcache_request_end,
56
57 TP_PROTO(struct search *s, struct bio *bio),
58
59 TP_ARGS(s, bio)
60);
61
62DECLARE_EVENT_CLASS(bcache_bio,
63
64 TP_PROTO(struct bio *bio),
65
66 TP_ARGS(bio),
67
68 TP_STRUCT__entry(
69 __field(dev_t, dev )
70 __field(sector_t, sector )
71 __field(unsigned int, nr_sector )
72 __array(char, rwbs, 6 )
73 __array(char, comm, TASK_COMM_LEN )
74 ),
75
76 TP_fast_assign(
77 __entry->dev = bio->bi_bdev->bd_dev;
78 __entry->sector = bio->bi_sector;
79 __entry->nr_sector = bio->bi_size >> 9;
80 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
81 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
82 ),
83
84 TP_printk("%d,%d %s %llu + %u [%s]",
85 MAJOR(__entry->dev), MINOR(__entry->dev),
86 __entry->rwbs,
87 (unsigned long long)__entry->sector,
88 __entry->nr_sector, __entry->comm)
89);
90
91
92DEFINE_EVENT(bcache_bio, bcache_passthrough,
93
94 TP_PROTO(struct bio *bio),
95
96 TP_ARGS(bio)
97);
98
99DEFINE_EVENT(bcache_bio, bcache_cache_hit,
100
101 TP_PROTO(struct bio *bio),
102
103 TP_ARGS(bio)
104);
105
106DEFINE_EVENT(bcache_bio, bcache_cache_miss,
107
108 TP_PROTO(struct bio *bio),
109
110 TP_ARGS(bio)
111);
112
113DEFINE_EVENT(bcache_bio, bcache_read_retry,
114
115 TP_PROTO(struct bio *bio),
116
117 TP_ARGS(bio)
118);
119
120DEFINE_EVENT(bcache_bio, bcache_writethrough,
121
122 TP_PROTO(struct bio *bio),
123
124 TP_ARGS(bio)
125);
126
127DEFINE_EVENT(bcache_bio, bcache_writeback,
128
129 TP_PROTO(struct bio *bio),
130
131 TP_ARGS(bio)
132);
133
134DEFINE_EVENT(bcache_bio, bcache_write_skip,
135
136 TP_PROTO(struct bio *bio),
137
138 TP_ARGS(bio)
139);
140
141DEFINE_EVENT(bcache_bio, bcache_btree_read,
142
143 TP_PROTO(struct bio *bio),
144
145 TP_ARGS(bio)
146);
147
148DEFINE_EVENT(bcache_bio, bcache_btree_write,
149
150 TP_PROTO(struct bio *bio),
151
152 TP_ARGS(bio)
153);
154
155DEFINE_EVENT(bcache_bio, bcache_write_dirty,
156
157 TP_PROTO(struct bio *bio),
158
159 TP_ARGS(bio)
160);
161
162DEFINE_EVENT(bcache_bio, bcache_read_dirty,
163
164 TP_PROTO(struct bio *bio),
165
166 TP_ARGS(bio)
167);
168
169DEFINE_EVENT(bcache_bio, bcache_write_moving,
170
171 TP_PROTO(struct bio *bio),
172
173 TP_ARGS(bio)
174);
175
176DEFINE_EVENT(bcache_bio, bcache_read_moving,
177
178 TP_PROTO(struct bio *bio),
179
180 TP_ARGS(bio)
181);
182
183DEFINE_EVENT(bcache_bio, bcache_journal_write,
184
185 TP_PROTO(struct bio *bio),
186
187 TP_ARGS(bio)
188);
189
190DECLARE_EVENT_CLASS(bcache_cache_bio,
191
192 TP_PROTO(struct bio *bio,
193 sector_t orig_sector,
194 struct block_device* orig_bdev),
195
196 TP_ARGS(bio, orig_sector, orig_bdev),
197
198 TP_STRUCT__entry(
199 __field(dev_t, dev )
200 __field(dev_t, orig_dev )
201 __field(sector_t, sector )
202 __field(sector_t, orig_sector )
203 __field(unsigned int, nr_sector )
204 __array(char, rwbs, 6 )
205 __array(char, comm, TASK_COMM_LEN )
206 ),
207
208 TP_fast_assign(
209 __entry->dev = bio->bi_bdev->bd_dev;
210 __entry->orig_dev = orig_bdev->bd_dev;
211 __entry->sector = bio->bi_sector;
212 __entry->orig_sector = orig_sector;
213 __entry->nr_sector = bio->bi_size >> 9;
214 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
215 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
216 ),
217
218 TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d %llu)",
219 MAJOR(__entry->dev), MINOR(__entry->dev),
220 __entry->rwbs,
221 (unsigned long long)__entry->sector,
222 __entry->nr_sector, __entry->comm,
223 MAJOR(__entry->orig_dev), MINOR(__entry->orig_dev),
224 (unsigned long long)__entry->orig_sector)
225);
226
227DEFINE_EVENT(bcache_cache_bio, bcache_cache_insert,
228
229 TP_PROTO(struct bio *bio,
230 sector_t orig_sector,
231 struct block_device *orig_bdev),
232
233 TP_ARGS(bio, orig_sector, orig_bdev)
234);
235
236DECLARE_EVENT_CLASS(bcache_gc,
237
238 TP_PROTO(uint8_t *uuid),
239
240 TP_ARGS(uuid),
241
242 TP_STRUCT__entry(
243 __field(uint8_t *, uuid)
244 ),
245
246 TP_fast_assign(
247 __entry->uuid = uuid;
248 ),
249
250 TP_printk("%pU", __entry->uuid)
251);
252
253
254DEFINE_EVENT(bcache_gc, bcache_gc_start,
255
256 TP_PROTO(uint8_t *uuid),
257
258 TP_ARGS(uuid)
259);
260
261DEFINE_EVENT(bcache_gc, bcache_gc_end,
262
263 TP_PROTO(uint8_t *uuid),
264
265 TP_ARGS(uuid)
266);
267
268#endif /* _TRACE_BCACHE_H */
269
270/* This part must be outside protection */
271#include <trace/define_trace.h>
diff --git a/include/trace/events/block.h b/include/trace/events/block.h
index 9c1467357b03..60ae7c3db912 100644
--- a/include/trace/events/block.h
+++ b/include/trace/events/block.h
@@ -244,7 +244,7 @@ TRACE_EVENT(block_bio_bounce,
244 __entry->dev = bio->bi_bdev ? 244 __entry->dev = bio->bi_bdev ?
245 bio->bi_bdev->bd_dev : 0; 245 bio->bi_bdev->bd_dev : 0;
246 __entry->sector = bio->bi_sector; 246 __entry->sector = bio->bi_sector;
247 __entry->nr_sector = bio->bi_size >> 9; 247 __entry->nr_sector = bio_sectors(bio);
248 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 248 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
249 memcpy(__entry->comm, current->comm, TASK_COMM_LEN); 249 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
250 ), 250 ),
@@ -281,7 +281,7 @@ TRACE_EVENT(block_bio_complete,
281 TP_fast_assign( 281 TP_fast_assign(
282 __entry->dev = bio->bi_bdev->bd_dev; 282 __entry->dev = bio->bi_bdev->bd_dev;
283 __entry->sector = bio->bi_sector; 283 __entry->sector = bio->bi_sector;
284 __entry->nr_sector = bio->bi_size >> 9; 284 __entry->nr_sector = bio_sectors(bio);
285 __entry->error = error; 285 __entry->error = error;
286 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 286 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
287 ), 287 ),
@@ -309,7 +309,7 @@ DECLARE_EVENT_CLASS(block_bio_merge,
309 TP_fast_assign( 309 TP_fast_assign(
310 __entry->dev = bio->bi_bdev->bd_dev; 310 __entry->dev = bio->bi_bdev->bd_dev;
311 __entry->sector = bio->bi_sector; 311 __entry->sector = bio->bi_sector;
312 __entry->nr_sector = bio->bi_size >> 9; 312 __entry->nr_sector = bio_sectors(bio);
313 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 313 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
314 memcpy(__entry->comm, current->comm, TASK_COMM_LEN); 314 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
315 ), 315 ),
@@ -376,7 +376,7 @@ TRACE_EVENT(block_bio_queue,
376 TP_fast_assign( 376 TP_fast_assign(
377 __entry->dev = bio->bi_bdev->bd_dev; 377 __entry->dev = bio->bi_bdev->bd_dev;
378 __entry->sector = bio->bi_sector; 378 __entry->sector = bio->bi_sector;
379 __entry->nr_sector = bio->bi_size >> 9; 379 __entry->nr_sector = bio_sectors(bio);
380 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 380 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
381 memcpy(__entry->comm, current->comm, TASK_COMM_LEN); 381 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
382 ), 382 ),
@@ -404,7 +404,7 @@ DECLARE_EVENT_CLASS(block_get_rq,
404 TP_fast_assign( 404 TP_fast_assign(
405 __entry->dev = bio ? bio->bi_bdev->bd_dev : 0; 405 __entry->dev = bio ? bio->bi_bdev->bd_dev : 0;
406 __entry->sector = bio ? bio->bi_sector : 0; 406 __entry->sector = bio ? bio->bi_sector : 0;
407 __entry->nr_sector = bio ? bio->bi_size >> 9 : 0; 407 __entry->nr_sector = bio ? bio_sectors(bio) : 0;
408 blk_fill_rwbs(__entry->rwbs, 408 blk_fill_rwbs(__entry->rwbs,
409 bio ? bio->bi_rw : 0, __entry->nr_sector); 409 bio ? bio->bi_rw : 0, __entry->nr_sector);
410 memcpy(__entry->comm, current->comm, TASK_COMM_LEN); 410 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
@@ -580,7 +580,7 @@ TRACE_EVENT(block_bio_remap,
580 TP_fast_assign( 580 TP_fast_assign(
581 __entry->dev = bio->bi_bdev->bd_dev; 581 __entry->dev = bio->bi_bdev->bd_dev;
582 __entry->sector = bio->bi_sector; 582 __entry->sector = bio->bi_sector;
583 __entry->nr_sector = bio->bi_size >> 9; 583 __entry->nr_sector = bio_sectors(bio);
584 __entry->old_dev = dev; 584 __entry->old_dev = dev;
585 __entry->old_sector = from; 585 __entry->old_sector = from;
586 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); 586 blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size);
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 4ee471003859..d0e686402df8 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -257,15 +257,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
257 __entry->pos, __entry->len, __entry->copied) 257 __entry->pos, __entry->len, __entry->copied)
258); 258);
259 259
260DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, 260DEFINE_EVENT(ext4__write_end, ext4_write_end,
261
262 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
263 unsigned int copied),
264
265 TP_ARGS(inode, pos, len, copied)
266);
267
268DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end,
269 261
270 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 262 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
271 unsigned int copied), 263 unsigned int copied),
@@ -1956,7 +1948,7 @@ TRACE_EVENT(ext4_remove_blocks,
1956 __entry->to = to; 1948 __entry->to = to;
1957 __entry->partial = partial_cluster; 1949 __entry->partial = partial_cluster;
1958 __entry->ee_pblk = ext4_ext_pblock(ex); 1950 __entry->ee_pblk = ext4_ext_pblock(ex);
1959 __entry->ee_lblk = cpu_to_le32(ex->ee_block); 1951 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
1960 __entry->ee_len = ext4_ext_get_actual_len(ex); 1952 __entry->ee_len = ext4_ext_get_actual_len(ex);
1961 ), 1953 ),
1962 1954
@@ -2060,7 +2052,7 @@ TRACE_EVENT(ext4_ext_remove_space,
2060 2052
2061TRACE_EVENT(ext4_ext_remove_space_done, 2053TRACE_EVENT(ext4_ext_remove_space_done,
2062 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, 2054 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth,
2063 ext4_lblk_t partial, unsigned short eh_entries), 2055 ext4_lblk_t partial, __le16 eh_entries),
2064 2056
2065 TP_ARGS(inode, start, depth, partial, eh_entries), 2057 TP_ARGS(inode, start, depth, partial, eh_entries),
2066 2058
@@ -2079,7 +2071,7 @@ TRACE_EVENT(ext4_ext_remove_space_done,
2079 __entry->start = start; 2071 __entry->start = start;
2080 __entry->depth = depth; 2072 __entry->depth = depth;
2081 __entry->partial = partial; 2073 __entry->partial = partial;
2082 __entry->eh_entries = eh_entries; 2074 __entry->eh_entries = le16_to_cpu(eh_entries);
2083 ), 2075 ),
2084 2076
2085 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " 2077 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u "
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
new file mode 100644
index 000000000000..52ae54828eda
--- /dev/null
+++ b/include/trace/events/f2fs.h
@@ -0,0 +1,682 @@
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
11
12#define show_block_type(type) \
13 __print_symbolic(type, \
14 { NODE, "NODE" }, \
15 { DATA, "DATA" }, \
16 { META, "META" }, \
17 { META_FLUSH, "META_FLUSH" })
18
19#define show_bio_type(type) \
20 __print_symbolic(type, \
21 { READ, "READ" }, \
22 { READA, "READAHEAD" }, \
23 { READ_SYNC, "READ_SYNC" }, \
24 { WRITE, "WRITE" }, \
25 { WRITE_SYNC, "WRITE_SYNC" }, \
26 { WRITE_FLUSH, "WRITE_FLUSH" }, \
27 { WRITE_FUA, "WRITE_FUA" })
28
29#define show_data_type(type) \
30 __print_symbolic(type, \
31 { CURSEG_HOT_DATA, "Hot DATA" }, \
32 { CURSEG_WARM_DATA, "Warm DATA" }, \
33 { CURSEG_COLD_DATA, "Cold DATA" }, \
34 { CURSEG_HOT_NODE, "Hot NODE" }, \
35 { CURSEG_WARM_NODE, "Warm NODE" }, \
36 { CURSEG_COLD_NODE, "Cold NODE" }, \
37 { NO_CHECK_TYPE, "No TYPE" })
38
39#define show_gc_type(type) \
40 __print_symbolic(type, \
41 { FG_GC, "Foreground GC" }, \
42 { BG_GC, "Background GC" })
43
44#define show_alloc_mode(type) \
45 __print_symbolic(type, \
46 { LFS, "LFS-mode" }, \
47 { SSR, "SSR-mode" })
48
49#define show_victim_policy(type) \
50 __print_symbolic(type, \
51 { GC_GREEDY, "Greedy" }, \
52 { GC_CB, "Cost-Benefit" })
53
54struct victim_sel_policy;
55
56DECLARE_EVENT_CLASS(f2fs__inode,
57
58 TP_PROTO(struct inode *inode),
59
60 TP_ARGS(inode),
61
62 TP_STRUCT__entry(
63 __field(dev_t, dev)
64 __field(ino_t, ino)
65 __field(ino_t, pino)
66 __field(umode_t, mode)
67 __field(loff_t, size)
68 __field(unsigned int, nlink)
69 __field(blkcnt_t, blocks)
70 __field(__u8, advise)
71 ),
72
73 TP_fast_assign(
74 __entry->dev = inode->i_sb->s_dev;
75 __entry->ino = inode->i_ino;
76 __entry->pino = F2FS_I(inode)->i_pino;
77 __entry->mode = inode->i_mode;
78 __entry->nlink = inode->i_nlink;
79 __entry->size = inode->i_size;
80 __entry->blocks = inode->i_blocks;
81 __entry->advise = F2FS_I(inode)->i_advise;
82 ),
83
84 TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
85 "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
86 show_dev_ino(__entry),
87 (unsigned long)__entry->pino,
88 __entry->mode,
89 __entry->size,
90 (unsigned int)__entry->nlink,
91 (unsigned long long)__entry->blocks,
92 (unsigned char)__entry->advise)
93);
94
95DECLARE_EVENT_CLASS(f2fs__inode_exit,
96
97 TP_PROTO(struct inode *inode, int ret),
98
99 TP_ARGS(inode, ret),
100
101 TP_STRUCT__entry(
102 __field(dev_t, dev)
103 __field(ino_t, ino)
104 __field(int, ret)
105 ),
106
107 TP_fast_assign(
108 __entry->dev = inode->i_sb->s_dev;
109 __entry->ino = inode->i_ino;
110 __entry->ret = ret;
111 ),
112
113 TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
114 show_dev_ino(__entry),
115 __entry->ret)
116);
117
118DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter,
119
120 TP_PROTO(struct inode *inode),
121
122 TP_ARGS(inode)
123);
124
125TRACE_EVENT(f2fs_sync_file_exit,
126
127 TP_PROTO(struct inode *inode, bool need_cp, int datasync, int ret),
128
129 TP_ARGS(inode, need_cp, datasync, ret),
130
131 TP_STRUCT__entry(
132 __field(dev_t, dev)
133 __field(ino_t, ino)
134 __field(bool, need_cp)
135 __field(int, datasync)
136 __field(int, ret)
137 ),
138
139 TP_fast_assign(
140 __entry->dev = inode->i_sb->s_dev;
141 __entry->ino = inode->i_ino;
142 __entry->need_cp = need_cp;
143 __entry->datasync = datasync;
144 __entry->ret = ret;
145 ),
146
147 TP_printk("dev = (%d,%d), ino = %lu, checkpoint is %s, "
148 "datasync = %d, ret = %d",
149 show_dev_ino(__entry),
150 __entry->need_cp ? "needed" : "not needed",
151 __entry->datasync,
152 __entry->ret)
153);
154
155TRACE_EVENT(f2fs_sync_fs,
156
157 TP_PROTO(struct super_block *sb, int wait),
158
159 TP_ARGS(sb, wait),
160
161 TP_STRUCT__entry(
162 __field(dev_t, dev)
163 __field(int, dirty)
164 __field(int, wait)
165 ),
166
167 TP_fast_assign(
168 __entry->dev = sb->s_dev;
169 __entry->dirty = F2FS_SB(sb)->s_dirty;
170 __entry->wait = wait;
171 ),
172
173 TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
174 show_dev(__entry),
175 __entry->dirty ? "dirty" : "not dirty",
176 __entry->wait)
177);
178
179DEFINE_EVENT(f2fs__inode, f2fs_iget,
180
181 TP_PROTO(struct inode *inode),
182
183 TP_ARGS(inode)
184);
185
186DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit,
187
188 TP_PROTO(struct inode *inode, int ret),
189
190 TP_ARGS(inode, ret)
191);
192
193DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
194
195 TP_PROTO(struct inode *inode),
196
197 TP_ARGS(inode)
198);
199
200DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode,
201
202 TP_PROTO(struct inode *inode, int ret),
203
204 TP_ARGS(inode, ret)
205);
206
207TRACE_EVENT(f2fs_unlink_enter,
208
209 TP_PROTO(struct inode *dir, struct dentry *dentry),
210
211 TP_ARGS(dir, dentry),
212
213 TP_STRUCT__entry(
214 __field(dev_t, dev)
215 __field(ino_t, ino)
216 __field(loff_t, size)
217 __field(blkcnt_t, blocks)
218 __field(const char *, name)
219 ),
220
221 TP_fast_assign(
222 __entry->dev = dir->i_sb->s_dev;
223 __entry->ino = dir->i_ino;
224 __entry->size = dir->i_size;
225 __entry->blocks = dir->i_blocks;
226 __entry->name = dentry->d_name.name;
227 ),
228
229 TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
230 "i_blocks = %llu, name = %s",
231 show_dev_ino(__entry),
232 __entry->size,
233 (unsigned long long)__entry->blocks,
234 __entry->name)
235);
236
237DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit,
238
239 TP_PROTO(struct inode *inode, int ret),
240
241 TP_ARGS(inode, ret)
242);
243
244DEFINE_EVENT(f2fs__inode, f2fs_truncate,
245
246 TP_PROTO(struct inode *inode),
247
248 TP_ARGS(inode)
249);
250
251TRACE_EVENT(f2fs_truncate_data_blocks_range,
252
253 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
254
255 TP_ARGS(inode, nid, ofs, free),
256
257 TP_STRUCT__entry(
258 __field(dev_t, dev)
259 __field(ino_t, ino)
260 __field(nid_t, nid)
261 __field(unsigned int, ofs)
262 __field(int, free)
263 ),
264
265 TP_fast_assign(
266 __entry->dev = inode->i_sb->s_dev;
267 __entry->ino = inode->i_ino;
268 __entry->nid = nid;
269 __entry->ofs = ofs;
270 __entry->free = free;
271 ),
272
273 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
274 show_dev_ino(__entry),
275 (unsigned int)__entry->nid,
276 __entry->ofs,
277 __entry->free)
278);
279
280DECLARE_EVENT_CLASS(f2fs__truncate_op,
281
282 TP_PROTO(struct inode *inode, u64 from),
283
284 TP_ARGS(inode, from),
285
286 TP_STRUCT__entry(
287 __field(dev_t, dev)
288 __field(ino_t, ino)
289 __field(loff_t, size)
290 __field(blkcnt_t, blocks)
291 __field(u64, from)
292 ),
293
294 TP_fast_assign(
295 __entry->dev = inode->i_sb->s_dev;
296 __entry->ino = inode->i_ino;
297 __entry->size = inode->i_size;
298 __entry->blocks = inode->i_blocks;
299 __entry->from = from;
300 ),
301
302 TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
303 "start file offset = %llu",
304 show_dev_ino(__entry),
305 __entry->size,
306 (unsigned long long)__entry->blocks,
307 (unsigned long long)__entry->from)
308);
309
310DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter,
311
312 TP_PROTO(struct inode *inode, u64 from),
313
314 TP_ARGS(inode, from)
315);
316
317DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit,
318
319 TP_PROTO(struct inode *inode, int ret),
320
321 TP_ARGS(inode, ret)
322);
323
324DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter,
325
326 TP_PROTO(struct inode *inode, u64 from),
327
328 TP_ARGS(inode, from)
329);
330
331DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit,
332
333 TP_PROTO(struct inode *inode, int ret),
334
335 TP_ARGS(inode, ret)
336);
337
338DECLARE_EVENT_CLASS(f2fs__truncate_node,
339
340 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
341
342 TP_ARGS(inode, nid, blk_addr),
343
344 TP_STRUCT__entry(
345 __field(dev_t, dev)
346 __field(ino_t, ino)
347 __field(nid_t, nid)
348 __field(block_t, blk_addr)
349 ),
350
351 TP_fast_assign(
352 __entry->dev = inode->i_sb->s_dev;
353 __entry->ino = inode->i_ino;
354 __entry->nid = nid;
355 __entry->blk_addr = blk_addr;
356 ),
357
358 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
359 show_dev_ino(__entry),
360 (unsigned int)__entry->nid,
361 (unsigned long long)__entry->blk_addr)
362);
363
364DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter,
365
366 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
367
368 TP_ARGS(inode, nid, blk_addr)
369);
370
371DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit,
372
373 TP_PROTO(struct inode *inode, int ret),
374
375 TP_ARGS(inode, ret)
376);
377
378DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node,
379
380 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
381
382 TP_ARGS(inode, nid, blk_addr)
383);
384
385TRACE_EVENT(f2fs_truncate_partial_nodes,
386
387 TP_PROTO(struct inode *inode, nid_t nid[], int depth, int err),
388
389 TP_ARGS(inode, nid, depth, err),
390
391 TP_STRUCT__entry(
392 __field(dev_t, dev)
393 __field(ino_t, ino)
394 __field(nid_t, nid[3])
395 __field(int, depth)
396 __field(int, err)
397 ),
398
399 TP_fast_assign(
400 __entry->dev = inode->i_sb->s_dev;
401 __entry->ino = inode->i_ino;
402 __entry->nid[0] = nid[0];
403 __entry->nid[1] = nid[1];
404 __entry->nid[2] = nid[2];
405 __entry->depth = depth;
406 __entry->err = err;
407 ),
408
409 TP_printk("dev = (%d,%d), ino = %lu, "
410 "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
411 show_dev_ino(__entry),
412 (unsigned int)__entry->nid[0],
413 (unsigned int)__entry->nid[1],
414 (unsigned int)__entry->nid[2],
415 __entry->depth,
416 __entry->err)
417);
418
419TRACE_EVENT_CONDITION(f2fs_readpage,
420
421 TP_PROTO(struct page *page, sector_t blkaddr, int type),
422
423 TP_ARGS(page, blkaddr, type),
424
425 TP_CONDITION(page->mapping),
426
427 TP_STRUCT__entry(
428 __field(dev_t, dev)
429 __field(ino_t, ino)
430 __field(pgoff_t, index)
431 __field(sector_t, blkaddr)
432 __field(int, type)
433 ),
434
435 TP_fast_assign(
436 __entry->dev = page->mapping->host->i_sb->s_dev;
437 __entry->ino = page->mapping->host->i_ino;
438 __entry->index = page->index;
439 __entry->blkaddr = blkaddr;
440 __entry->type = type;
441 ),
442
443 TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
444 "blkaddr = 0x%llx, bio_type = %s",
445 show_dev_ino(__entry),
446 (unsigned long)__entry->index,
447 (unsigned long long)__entry->blkaddr,
448 show_bio_type(__entry->type))
449);
450
451TRACE_EVENT(f2fs_get_data_block,
452 TP_PROTO(struct inode *inode, sector_t iblock,
453 struct buffer_head *bh, int ret),
454
455 TP_ARGS(inode, iblock, bh, ret),
456
457 TP_STRUCT__entry(
458 __field(dev_t, dev)
459 __field(ino_t, ino)
460 __field(sector_t, iblock)
461 __field(sector_t, bh_start)
462 __field(size_t, bh_size)
463 __field(int, ret)
464 ),
465
466 TP_fast_assign(
467 __entry->dev = inode->i_sb->s_dev;
468 __entry->ino = inode->i_ino;
469 __entry->iblock = iblock;
470 __entry->bh_start = bh->b_blocknr;
471 __entry->bh_size = bh->b_size;
472 __entry->ret = ret;
473 ),
474
475 TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
476 "start blkaddr = 0x%llx, len = 0x%llx bytes, err = %d",
477 show_dev_ino(__entry),
478 (unsigned long long)__entry->iblock,
479 (unsigned long long)__entry->bh_start,
480 (unsigned long long)__entry->bh_size,
481 __entry->ret)
482);
483
484TRACE_EVENT(f2fs_get_victim,
485
486 TP_PROTO(struct super_block *sb, int type, int gc_type,
487 struct victim_sel_policy *p, unsigned int pre_victim,
488 unsigned int prefree, unsigned int free),
489
490 TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free),
491
492 TP_STRUCT__entry(
493 __field(dev_t, dev)
494 __field(int, type)
495 __field(int, gc_type)
496 __field(int, alloc_mode)
497 __field(int, gc_mode)
498 __field(unsigned int, victim)
499 __field(unsigned int, ofs_unit)
500 __field(unsigned int, pre_victim)
501 __field(unsigned int, prefree)
502 __field(unsigned int, free)
503 ),
504
505 TP_fast_assign(
506 __entry->dev = sb->s_dev;
507 __entry->type = type;
508 __entry->gc_type = gc_type;
509 __entry->alloc_mode = p->alloc_mode;
510 __entry->gc_mode = p->gc_mode;
511 __entry->victim = p->min_segno;
512 __entry->ofs_unit = p->ofs_unit;
513 __entry->pre_victim = pre_victim;
514 __entry->prefree = prefree;
515 __entry->free = free;
516 ),
517
518 TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), victim = %u "
519 "ofs_unit = %u, pre_victim_secno = %d, prefree = %u, free = %u",
520 show_dev(__entry),
521 show_data_type(__entry->type),
522 show_gc_type(__entry->gc_type),
523 show_alloc_mode(__entry->alloc_mode),
524 show_victim_policy(__entry->gc_mode),
525 __entry->victim,
526 __entry->ofs_unit,
527 (int)__entry->pre_victim,
528 __entry->prefree,
529 __entry->free)
530);
531
532TRACE_EVENT(f2fs_fallocate,
533
534 TP_PROTO(struct inode *inode, int mode,
535 loff_t offset, loff_t len, int ret),
536
537 TP_ARGS(inode, mode, offset, len, ret),
538
539 TP_STRUCT__entry(
540 __field(dev_t, dev)
541 __field(ino_t, ino)
542 __field(int, mode)
543 __field(loff_t, offset)
544 __field(loff_t, len)
545 __field(loff_t, size)
546 __field(blkcnt_t, blocks)
547 __field(int, ret)
548 ),
549
550 TP_fast_assign(
551 __entry->dev = inode->i_sb->s_dev;
552 __entry->ino = inode->i_ino;
553 __entry->mode = mode;
554 __entry->offset = offset;
555 __entry->len = len;
556 __entry->size = inode->i_size;
557 __entry->blocks = inode->i_blocks;
558 __entry->ret = ret;
559 ),
560
561 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
562 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
563 show_dev_ino(__entry),
564 __entry->mode,
565 (unsigned long long)__entry->offset,
566 (unsigned long long)__entry->len,
567 (unsigned long long)__entry->size,
568 (unsigned long long)__entry->blocks,
569 __entry->ret)
570);
571
572TRACE_EVENT(f2fs_reserve_new_block,
573
574 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node),
575
576 TP_ARGS(inode, nid, ofs_in_node),
577
578 TP_STRUCT__entry(
579 __field(dev_t, dev)
580 __field(nid_t, nid)
581 __field(unsigned int, ofs_in_node)
582 ),
583
584 TP_fast_assign(
585 __entry->dev = inode->i_sb->s_dev;
586 __entry->nid = nid;
587 __entry->ofs_in_node = ofs_in_node;
588 ),
589
590 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u",
591 show_dev(__entry),
592 (unsigned int)__entry->nid,
593 __entry->ofs_in_node)
594);
595
596TRACE_EVENT(f2fs_do_submit_bio,
597
598 TP_PROTO(struct super_block *sb, int btype, bool sync, struct bio *bio),
599
600 TP_ARGS(sb, btype, sync, bio),
601
602 TP_STRUCT__entry(
603 __field(dev_t, dev)
604 __field(int, btype)
605 __field(bool, sync)
606 __field(sector_t, sector)
607 __field(unsigned int, size)
608 ),
609
610 TP_fast_assign(
611 __entry->dev = sb->s_dev;
612 __entry->btype = btype;
613 __entry->sync = sync;
614 __entry->sector = bio->bi_sector;
615 __entry->size = bio->bi_size;
616 ),
617
618 TP_printk("dev = (%d,%d), type = %s, io = %s, sector = %lld, size = %u",
619 show_dev(__entry),
620 show_block_type(__entry->btype),
621 __entry->sync ? "sync" : "no sync",
622 (unsigned long long)__entry->sector,
623 __entry->size)
624);
625
626TRACE_EVENT(f2fs_submit_write_page,
627
628 TP_PROTO(struct page *page, block_t blk_addr, int type),
629
630 TP_ARGS(page, blk_addr, type),
631
632 TP_STRUCT__entry(
633 __field(dev_t, dev)
634 __field(ino_t, ino)
635 __field(int, type)
636 __field(pgoff_t, index)
637 __field(block_t, block)
638 ),
639
640 TP_fast_assign(
641 __entry->dev = page->mapping->host->i_sb->s_dev;
642 __entry->ino = page->mapping->host->i_ino;
643 __entry->type = type;
644 __entry->index = page->index;
645 __entry->block = blk_addr;
646 ),
647
648 TP_printk("dev = (%d,%d), ino = %lu, %s, index = %lu, blkaddr = 0x%llx",
649 show_dev_ino(__entry),
650 show_block_type(__entry->type),
651 (unsigned long)__entry->index,
652 (unsigned long long)__entry->block)
653);
654
655TRACE_EVENT(f2fs_write_checkpoint,
656
657 TP_PROTO(struct super_block *sb, bool is_umount, char *msg),
658
659 TP_ARGS(sb, is_umount, msg),
660
661 TP_STRUCT__entry(
662 __field(dev_t, dev)
663 __field(bool, is_umount)
664 __field(char *, msg)
665 ),
666
667 TP_fast_assign(
668 __entry->dev = sb->s_dev;
669 __entry->is_umount = is_umount;
670 __entry->msg = msg;
671 ),
672
673 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
674 show_dev(__entry),
675 __entry->is_umount ? "clean umount" : "consistency",
676 __entry->msg)
677);
678
679#endif /* _TRACE_F2FS_H */
680
681 /* This part must be outside protection */
682#include <trace/define_trace.h>
diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h
new file mode 100644
index 000000000000..0421f49a20f7
--- /dev/null
+++ b/include/trace/events/filemap.h
@@ -0,0 +1,58 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM filemap
3
4#if !defined(_TRACE_FILEMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_FILEMAP_H
6
7#include <linux/types.h>
8#include <linux/tracepoint.h>
9#include <linux/mm.h>
10#include <linux/memcontrol.h>
11#include <linux/device.h>
12#include <linux/kdev_t.h>
13
14DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
15
16 TP_PROTO(struct page *page),
17
18 TP_ARGS(page),
19
20 TP_STRUCT__entry(
21 __field(struct page *, page)
22 __field(unsigned long, i_ino)
23 __field(unsigned long, index)
24 __field(dev_t, s_dev)
25 ),
26
27 TP_fast_assign(
28 __entry->page = page;
29 __entry->i_ino = page->mapping->host->i_ino;
30 __entry->index = page->index;
31 if (page->mapping->host->i_sb)
32 __entry->s_dev = page->mapping->host->i_sb->s_dev;
33 else
34 __entry->s_dev = page->mapping->host->i_rdev;
35 ),
36
37 TP_printk("dev %d:%d ino %lx page=%p pfn=%lu ofs=%lu",
38 MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
39 __entry->i_ino,
40 __entry->page,
41 page_to_pfn(__entry->page),
42 __entry->index << PAGE_SHIFT)
43);
44
45DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_delete_from_page_cache,
46 TP_PROTO(struct page *page),
47 TP_ARGS(page)
48 );
49
50DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_add_to_page_cache,
51 TP_PROTO(struct page *page),
52 TP_ARGS(page)
53 );
54
55#endif /* _TRACE_FILEMAP_H */
56
57/* This part must be outside protection */
58#include <trace/define_trace.h>
diff --git a/include/trace/events/host1x.h b/include/trace/events/host1x.h
new file mode 100644
index 000000000000..94db6a2c3540
--- /dev/null
+++ b/include/trace/events/host1x.h
@@ -0,0 +1,253 @@
1/*
2 * include/trace/events/host1x.h
3 *
4 * host1x event logging to ftrace.
5 *
6 * Copyright (c) 2010-2013, NVIDIA Corporation.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22
23#undef TRACE_SYSTEM
24#define TRACE_SYSTEM host1x
25
26#if !defined(_TRACE_HOST1X_H) || defined(TRACE_HEADER_MULTI_READ)
27#define _TRACE_HOST1X_H
28
29#include <linux/ktime.h>
30#include <linux/tracepoint.h>
31
32DECLARE_EVENT_CLASS(host1x,
33 TP_PROTO(const char *name),
34 TP_ARGS(name),
35 TP_STRUCT__entry(__field(const char *, name)),
36 TP_fast_assign(__entry->name = name;),
37 TP_printk("name=%s", __entry->name)
38);
39
40DEFINE_EVENT(host1x, host1x_channel_open,
41 TP_PROTO(const char *name),
42 TP_ARGS(name)
43);
44
45DEFINE_EVENT(host1x, host1x_channel_release,
46 TP_PROTO(const char *name),
47 TP_ARGS(name)
48);
49
50DEFINE_EVENT(host1x, host1x_cdma_begin,
51 TP_PROTO(const char *name),
52 TP_ARGS(name)
53);
54
55DEFINE_EVENT(host1x, host1x_cdma_end,
56 TP_PROTO(const char *name),
57 TP_ARGS(name)
58);
59
60TRACE_EVENT(host1x_cdma_push,
61 TP_PROTO(const char *name, u32 op1, u32 op2),
62
63 TP_ARGS(name, op1, op2),
64
65 TP_STRUCT__entry(
66 __field(const char *, name)
67 __field(u32, op1)
68 __field(u32, op2)
69 ),
70
71 TP_fast_assign(
72 __entry->name = name;
73 __entry->op1 = op1;
74 __entry->op2 = op2;
75 ),
76
77 TP_printk("name=%s, op1=%08x, op2=%08x",
78 __entry->name, __entry->op1, __entry->op2)
79);
80
81TRACE_EVENT(host1x_cdma_push_gather,
82 TP_PROTO(const char *name, u32 mem_id,
83 u32 words, u32 offset, void *cmdbuf),
84
85 TP_ARGS(name, mem_id, words, offset, cmdbuf),
86
87 TP_STRUCT__entry(
88 __field(const char *, name)
89 __field(u32, mem_id)
90 __field(u32, words)
91 __field(u32, offset)
92 __field(bool, cmdbuf)
93 __dynamic_array(u32, cmdbuf, words)
94 ),
95
96 TP_fast_assign(
97 if (cmdbuf) {
98 memcpy(__get_dynamic_array(cmdbuf), cmdbuf+offset,
99 words * sizeof(u32));
100 }
101 __entry->cmdbuf = cmdbuf;
102 __entry->name = name;
103 __entry->mem_id = mem_id;
104 __entry->words = words;
105 __entry->offset = offset;
106 ),
107
108 TP_printk("name=%s, mem_id=%08x, words=%u, offset=%d, contents=[%s]",
109 __entry->name, __entry->mem_id,
110 __entry->words, __entry->offset,
111 __print_hex(__get_dynamic_array(cmdbuf),
112 __entry->cmdbuf ? __entry->words * 4 : 0))
113);
114
115TRACE_EVENT(host1x_channel_submit,
116 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 waitchks,
117 u32 syncpt_id, u32 syncpt_incrs),
118
119 TP_ARGS(name, cmdbufs, relocs, waitchks, syncpt_id, syncpt_incrs),
120
121 TP_STRUCT__entry(
122 __field(const char *, name)
123 __field(u32, cmdbufs)
124 __field(u32, relocs)
125 __field(u32, waitchks)
126 __field(u32, syncpt_id)
127 __field(u32, syncpt_incrs)
128 ),
129
130 TP_fast_assign(
131 __entry->name = name;
132 __entry->cmdbufs = cmdbufs;
133 __entry->relocs = relocs;
134 __entry->waitchks = waitchks;
135 __entry->syncpt_id = syncpt_id;
136 __entry->syncpt_incrs = syncpt_incrs;
137 ),
138
139 TP_printk("name=%s, cmdbufs=%u, relocs=%u, waitchks=%d,"
140 "syncpt_id=%u, syncpt_incrs=%u",
141 __entry->name, __entry->cmdbufs, __entry->relocs, __entry->waitchks,
142 __entry->syncpt_id, __entry->syncpt_incrs)
143);
144
145TRACE_EVENT(host1x_channel_submitted,
146 TP_PROTO(const char *name, u32 syncpt_base, u32 syncpt_max),
147
148 TP_ARGS(name, syncpt_base, syncpt_max),
149
150 TP_STRUCT__entry(
151 __field(const char *, name)
152 __field(u32, syncpt_base)
153 __field(u32, syncpt_max)
154 ),
155
156 TP_fast_assign(
157 __entry->name = name;
158 __entry->syncpt_base = syncpt_base;
159 __entry->syncpt_max = syncpt_max;
160 ),
161
162 TP_printk("name=%s, syncpt_base=%d, syncpt_max=%d",
163 __entry->name, __entry->syncpt_base, __entry->syncpt_max)
164);
165
166TRACE_EVENT(host1x_channel_submit_complete,
167 TP_PROTO(const char *name, int count, u32 thresh),
168
169 TP_ARGS(name, count, thresh),
170
171 TP_STRUCT__entry(
172 __field(const char *, name)
173 __field(int, count)
174 __field(u32, thresh)
175 ),
176
177 TP_fast_assign(
178 __entry->name = name;
179 __entry->count = count;
180 __entry->thresh = thresh;
181 ),
182
183 TP_printk("name=%s, count=%d, thresh=%d",
184 __entry->name, __entry->count, __entry->thresh)
185);
186
187TRACE_EVENT(host1x_wait_cdma,
188 TP_PROTO(const char *name, u32 eventid),
189
190 TP_ARGS(name, eventid),
191
192 TP_STRUCT__entry(
193 __field(const char *, name)
194 __field(u32, eventid)
195 ),
196
197 TP_fast_assign(
198 __entry->name = name;
199 __entry->eventid = eventid;
200 ),
201
202 TP_printk("name=%s, event=%d", __entry->name, __entry->eventid)
203);
204
205TRACE_EVENT(host1x_syncpt_load_min,
206 TP_PROTO(u32 id, u32 val),
207
208 TP_ARGS(id, val),
209
210 TP_STRUCT__entry(
211 __field(u32, id)
212 __field(u32, val)
213 ),
214
215 TP_fast_assign(
216 __entry->id = id;
217 __entry->val = val;
218 ),
219
220 TP_printk("id=%d, val=%d", __entry->id, __entry->val)
221);
222
223TRACE_EVENT(host1x_syncpt_wait_check,
224 TP_PROTO(void *mem_id, u32 offset, u32 syncpt_id, u32 thresh, u32 min),
225
226 TP_ARGS(mem_id, offset, syncpt_id, thresh, min),
227
228 TP_STRUCT__entry(
229 __field(void *, mem_id)
230 __field(u32, offset)
231 __field(u32, syncpt_id)
232 __field(u32, thresh)
233 __field(u32, min)
234 ),
235
236 TP_fast_assign(
237 __entry->mem_id = mem_id;
238 __entry->offset = offset;
239 __entry->syncpt_id = syncpt_id;
240 __entry->thresh = thresh;
241 __entry->min = min;
242 ),
243
244 TP_printk("mem_id=%p, offset=%05x, id=%d, thresh=%d, current=%d",
245 __entry->mem_id, __entry->offset,
246 __entry->syncpt_id, __entry->thresh,
247 __entry->min)
248);
249
250#endif /* _TRACE_HOST1X_H */
251
252/* This part must be outside protection */
253#include <trace/define_trace.h>
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index 070df49e4a1d..c1d1f3eb242d 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -358,6 +358,27 @@ TRACE_EVENT(jbd2_write_superblock,
358 MINOR(__entry->dev), __entry->write_op) 358 MINOR(__entry->dev), __entry->write_op)
359); 359);
360 360
361TRACE_EVENT(jbd2_lock_buffer_stall,
362
363 TP_PROTO(dev_t dev, unsigned long stall_ms),
364
365 TP_ARGS(dev, stall_ms),
366
367 TP_STRUCT__entry(
368 __field( dev_t, dev )
369 __field(unsigned long, stall_ms )
370 ),
371
372 TP_fast_assign(
373 __entry->dev = dev;
374 __entry->stall_ms = stall_ms;
375 ),
376
377 TP_printk("dev %d,%d stall_ms %lu",
378 MAJOR(__entry->dev), MINOR(__entry->dev),
379 __entry->stall_ms)
380);
381
361#endif /* _TRACE_JBD2_H */ 382#endif /* _TRACE_JBD2_H */
362 383
363/* This part must be outside protection */ 384/* This part must be outside protection */
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 19911dddaeb7..7005d1109ec9 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -37,7 +37,7 @@ TRACE_EVENT(kvm_userspace_exit,
37 __entry->errno < 0 ? -__entry->errno : __entry->reason) 37 __entry->errno < 0 ? -__entry->errno : __entry->reason)
38); 38);
39 39
40#if defined(__KVM_HAVE_IRQ_LINE) 40#if defined(CONFIG_HAVE_KVM_IRQCHIP)
41TRACE_EVENT(kvm_set_irq, 41TRACE_EVENT(kvm_set_irq,
42 TP_PROTO(unsigned int gsi, int level, int irq_source_id), 42 TP_PROTO(unsigned int gsi, int level, int irq_source_id),
43 TP_ARGS(gsi, level, irq_source_id), 43 TP_ARGS(gsi, level, irq_source_id),
@@ -122,6 +122,10 @@ TRACE_EVENT(kvm_msi_set_irq,
122 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \ 122 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \
123 {KVM_IRQCHIP_IOAPIC, "IOAPIC"} 123 {KVM_IRQCHIP_IOAPIC, "IOAPIC"}
124 124
125#endif /* defined(__KVM_HAVE_IOAPIC) */
126
127#if defined(CONFIG_HAVE_KVM_IRQCHIP)
128
125TRACE_EVENT(kvm_ack_irq, 129TRACE_EVENT(kvm_ack_irq,
126 TP_PROTO(unsigned int irqchip, unsigned int pin), 130 TP_PROTO(unsigned int irqchip, unsigned int pin),
127 TP_ARGS(irqchip, pin), 131 TP_ARGS(irqchip, pin),
@@ -136,14 +140,18 @@ TRACE_EVENT(kvm_ack_irq,
136 __entry->pin = pin; 140 __entry->pin = pin;
137 ), 141 ),
138 142
143#ifdef kvm_irqchips
139 TP_printk("irqchip %s pin %u", 144 TP_printk("irqchip %s pin %u",
140 __print_symbolic(__entry->irqchip, kvm_irqchips), 145 __print_symbolic(__entry->irqchip, kvm_irqchips),
141 __entry->pin) 146 __entry->pin)
147#else
148 TP_printk("irqchip %d pin %u", __entry->irqchip, __entry->pin)
149#endif
142); 150);
143 151
152#endif /* defined(CONFIG_HAVE_KVM_IRQCHIP) */
144 153
145 154
146#endif /* defined(__KVM_HAVE_IOAPIC) */
147 155
148#define KVM_TRACE_MMIO_READ_UNSATISFIED 0 156#define KVM_TRACE_MMIO_READ_UNSATISFIED 0
149#define KVM_TRACE_MMIO_READ 1 157#define KVM_TRACE_MMIO_READ 1
diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h
index 94ec79cc011a..c008bc99f9fa 100644
--- a/include/trace/events/printk.h
+++ b/include/trace/events/printk.h
@@ -6,31 +6,18 @@
6 6
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8 8
9TRACE_EVENT_CONDITION(console, 9TRACE_EVENT(console,
10 TP_PROTO(const char *log_buf, unsigned start, unsigned end, 10 TP_PROTO(const char *text, size_t len),
11 unsigned log_buf_len),
12 11
13 TP_ARGS(log_buf, start, end, log_buf_len), 12 TP_ARGS(text, len),
14
15 TP_CONDITION(start != end),
16 13
17 TP_STRUCT__entry( 14 TP_STRUCT__entry(
18 __dynamic_array(char, msg, end - start + 1) 15 __dynamic_array(char, msg, len + 1)
19 ), 16 ),
20 17
21 TP_fast_assign( 18 TP_fast_assign(
22 if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { 19 memcpy(__get_dynamic_array(msg), text, len);
23 memcpy(__get_dynamic_array(msg), 20 ((char *)__get_dynamic_array(msg))[len] = 0;
24 log_buf + (start & (log_buf_len - 1)),
25 log_buf_len - (start & (log_buf_len - 1)));
26 memcpy((char *)__get_dynamic_array(msg) +
27 log_buf_len - (start & (log_buf_len - 1)),
28 log_buf, end & (log_buf_len - 1));
29 } else
30 memcpy(__get_dynamic_array(msg),
31 log_buf + (start & (log_buf_len - 1)),
32 end - start);
33 ((char *)__get_dynamic_array(msg))[end - start] = 0;
34 ), 21 ),
35 22
36 TP_printk("%s", __get_str(msg)) 23 TP_printk("%s", __get_str(msg))
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index 1918e832da4f..59ebcc89f148 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -72,6 +72,58 @@ TRACE_EVENT(rcu_grace_period,
72); 72);
73 73
74/* 74/*
75 * Tracepoint for future grace-period events, including those for no-callbacks
76 * CPUs. The caller should pull the data from the rcu_node structure,
77 * other than rcuname, which comes from the rcu_state structure, and event,
78 * which is one of the following:
79 *
80 * "Startleaf": Request a nocb grace period based on leaf-node data.
81 * "Startedleaf": Leaf-node start proved sufficient.
82 * "Startedleafroot": Leaf-node start proved sufficient after checking root.
83 * "Startedroot": Requested a nocb grace period based on root-node data.
84 * "StartWait": Start waiting for the requested grace period.
85 * "ResumeWait": Resume waiting after signal.
86 * "EndWait": Complete wait.
87 * "Cleanup": Clean up rcu_node structure after previous GP.
88 * "CleanupMore": Clean up, and another no-CB GP is needed.
89 */
90TRACE_EVENT(rcu_future_grace_period,
91
92 TP_PROTO(char *rcuname, unsigned long gpnum, unsigned long completed,
93 unsigned long c, u8 level, int grplo, int grphi,
94 char *gpevent),
95
96 TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent),
97
98 TP_STRUCT__entry(
99 __field(char *, rcuname)
100 __field(unsigned long, gpnum)
101 __field(unsigned long, completed)
102 __field(unsigned long, c)
103 __field(u8, level)
104 __field(int, grplo)
105 __field(int, grphi)
106 __field(char *, gpevent)
107 ),
108
109 TP_fast_assign(
110 __entry->rcuname = rcuname;
111 __entry->gpnum = gpnum;
112 __entry->completed = completed;
113 __entry->c = c;
114 __entry->level = level;
115 __entry->grplo = grplo;
116 __entry->grphi = grphi;
117 __entry->gpevent = gpevent;
118 ),
119
120 TP_printk("%s %lu %lu %lu %u %d %d %s",
121 __entry->rcuname, __entry->gpnum, __entry->completed,
122 __entry->c, __entry->level, __entry->grplo, __entry->grphi,
123 __entry->gpevent)
124);
125
126/*
75 * Tracepoint for grace-period-initialization events. These are 127 * Tracepoint for grace-period-initialization events. These are
76 * distinguished by the type of RCU, the new grace-period number, the 128 * distinguished by the type of RCU, the new grace-period number, the
77 * rcu_node structure level, the starting and ending CPU covered by the 129 * rcu_node structure level, the starting and ending CPU covered by the
@@ -601,6 +653,9 @@ TRACE_EVENT(rcu_barrier,
601#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) 653#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0)
602#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ 654#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \
603 qsmask) do { } while (0) 655 qsmask) do { } while (0)
656#define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \
657 level, grplo, grphi, event) \
658 do { } while (0)
604#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) 659#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0)
605#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) 660#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0)
606#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ 661#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h
index 41a7dbd570e2..a43a2f67bd8e 100644
--- a/include/trace/events/regmap.h
+++ b/include/trace/events/regmap.h
@@ -175,6 +175,54 @@ DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
175 175
176); 176);
177 177
178DECLARE_EVENT_CLASS(regmap_async,
179
180 TP_PROTO(struct device *dev),
181
182 TP_ARGS(dev),
183
184 TP_STRUCT__entry(
185 __string( name, dev_name(dev) )
186 ),
187
188 TP_fast_assign(
189 __assign_str(name, dev_name(dev));
190 ),
191
192 TP_printk("%s", __get_str(name))
193);
194
195DEFINE_EVENT(regmap_block, regmap_async_write_start,
196
197 TP_PROTO(struct device *dev, unsigned int reg, int count),
198
199 TP_ARGS(dev, reg, count)
200);
201
202DEFINE_EVENT(regmap_async, regmap_async_io_complete,
203
204 TP_PROTO(struct device *dev),
205
206 TP_ARGS(dev)
207
208);
209
210DEFINE_EVENT(regmap_async, regmap_async_complete_start,
211
212 TP_PROTO(struct device *dev),
213
214 TP_ARGS(dev)
215
216);
217
218DEFINE_EVENT(regmap_async, regmap_async_complete_done,
219
220 TP_PROTO(struct device *dev),
221
222 TP_ARGS(dev)
223
224);
225
178#endif /* _TRACE_REGMAP_H */ 226#endif /* _TRACE_REGMAP_H */
179 227
180/* This part must be outside protection */ 228/* This part must be outside protection */
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index 425bcfe56c62..68c2c2000f02 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -123,7 +123,7 @@ DEFINE_EVENT(timer_class, timer_cancel,
123 123
124/** 124/**
125 * hrtimer_init - called when the hrtimer is initialized 125 * hrtimer_init - called when the hrtimer is initialized
126 * @timer: pointer to struct hrtimer 126 * @hrtimer: pointer to struct hrtimer
127 * @clockid: the hrtimers clock 127 * @clockid: the hrtimers clock
128 * @mode: the hrtimers mode 128 * @mode: the hrtimers mode
129 */ 129 */
@@ -155,7 +155,7 @@ TRACE_EVENT(hrtimer_init,
155 155
156/** 156/**
157 * hrtimer_start - called when the hrtimer is started 157 * hrtimer_start - called when the hrtimer is started
158 * @timer: pointer to struct hrtimer 158 * @hrtimer: pointer to struct hrtimer
159 */ 159 */
160TRACE_EVENT(hrtimer_start, 160TRACE_EVENT(hrtimer_start,
161 161
@@ -186,8 +186,8 @@ TRACE_EVENT(hrtimer_start,
186); 186);
187 187
188/** 188/**
189 * htimmer_expire_entry - called immediately before the hrtimer callback 189 * hrtimer_expire_entry - called immediately before the hrtimer callback
190 * @timer: pointer to struct hrtimer 190 * @hrtimer: pointer to struct hrtimer
191 * @now: pointer to variable which contains current time of the 191 * @now: pointer to variable which contains current time of the
192 * timers base. 192 * timers base.
193 * 193 *
@@ -234,7 +234,7 @@ DECLARE_EVENT_CLASS(hrtimer_class,
234 234
235/** 235/**
236 * hrtimer_expire_exit - called immediately after the hrtimer callback returns 236 * hrtimer_expire_exit - called immediately after the hrtimer callback returns
237 * @timer: pointer to struct hrtimer 237 * @hrtimer: pointer to struct hrtimer
238 * 238 *
239 * When used in combination with the hrtimer_expire_entry tracepoint we can 239 * When used in combination with the hrtimer_expire_entry tracepoint we can
240 * determine the runtime of the callback function. 240 * determine the runtime of the callback function.
@@ -323,6 +323,27 @@ TRACE_EVENT(itimer_expire,
323 (int) __entry->pid, (unsigned long long)__entry->now) 323 (int) __entry->pid, (unsigned long long)__entry->now)
324); 324);
325 325
326#ifdef CONFIG_NO_HZ_COMMON
327TRACE_EVENT(tick_stop,
328
329 TP_PROTO(int success, char *error_msg),
330
331 TP_ARGS(success, error_msg),
332
333 TP_STRUCT__entry(
334 __field( int , success )
335 __string( msg, error_msg )
336 ),
337
338 TP_fast_assign(
339 __entry->success = success;
340 __assign_str(msg, error_msg);
341 ),
342
343 TP_printk("success=%s msg=%s", __entry->success ? "yes" : "no", __get_str(msg))
344);
345#endif
346
326#endif /* _TRACE_TIMER_H */ 347#endif /* _TRACE_TIMER_H */
327 348
328/* This part must be outside protection */ 349/* This part must be outside protection */
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 6a16fd2e70ed..464ea82e10db 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -183,7 +183,6 @@ DECLARE_EVENT_CLASS(writeback_work_class,
183DEFINE_EVENT(writeback_work_class, name, \ 183DEFINE_EVENT(writeback_work_class, name, \
184 TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \ 184 TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
185 TP_ARGS(bdi, work)) 185 TP_ARGS(bdi, work))
186DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread);
187DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); 186DEFINE_WRITEBACK_WORK_EVENT(writeback_queue);
188DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); 187DEFINE_WRITEBACK_WORK_EVENT(writeback_exec);
189DEFINE_WRITEBACK_WORK_EVENT(writeback_start); 188DEFINE_WRITEBACK_WORK_EVENT(writeback_start);
@@ -222,12 +221,8 @@ DEFINE_EVENT(writeback_class, name, \
222 221
223DEFINE_WRITEBACK_EVENT(writeback_nowork); 222DEFINE_WRITEBACK_EVENT(writeback_nowork);
224DEFINE_WRITEBACK_EVENT(writeback_wake_background); 223DEFINE_WRITEBACK_EVENT(writeback_wake_background);
225DEFINE_WRITEBACK_EVENT(writeback_wake_thread);
226DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread);
227DEFINE_WRITEBACK_EVENT(writeback_bdi_register); 224DEFINE_WRITEBACK_EVENT(writeback_bdi_register);
228DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); 225DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister);
229DEFINE_WRITEBACK_EVENT(writeback_thread_start);
230DEFINE_WRITEBACK_EVENT(writeback_thread_stop);
231 226
232DECLARE_EVENT_CLASS(wbc_class, 227DECLARE_EVENT_CLASS(wbc_class,
233 TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), 228 TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi),