diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:32:57 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-07-02 02:32:57 -0400 |
commit | d0e3d0238d83b05d7846c7281524e0f814633dbd (patch) | |
tree | 9b3750123faf4975bde744bb9da9219fb697e374 /include | |
parent | 5f0e5afa0de4522abb3ea7d1369039b94e740ec5 (diff) | |
parent | 8e51e414a3c6d92ef2cc41720c67342a8e2c0bf7 (diff) |
Merge branch 'bcache-for-3.11' of git://evilpiepirate.org/~kent/linux-bcache into for-3.11/drivers
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/bcache.h | 381 |
1 files changed, 272 insertions, 109 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index 3cc5a0b278c3..5ebda976ea93 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h | |||
@@ -9,9 +9,7 @@ | |||
9 | struct search; | 9 | struct search; |
10 | 10 | ||
11 | DECLARE_EVENT_CLASS(bcache_request, | 11 | DECLARE_EVENT_CLASS(bcache_request, |
12 | |||
13 | TP_PROTO(struct search *s, struct bio *bio), | 12 | TP_PROTO(struct search *s, struct bio *bio), |
14 | |||
15 | TP_ARGS(s, bio), | 13 | TP_ARGS(s, bio), |
16 | 14 | ||
17 | TP_STRUCT__entry( | 15 | TP_STRUCT__entry( |
@@ -22,7 +20,6 @@ DECLARE_EVENT_CLASS(bcache_request, | |||
22 | __field(dev_t, orig_sector ) | 20 | __field(dev_t, orig_sector ) |
23 | __field(unsigned int, nr_sector ) | 21 | __field(unsigned int, nr_sector ) |
24 | __array(char, rwbs, 6 ) | 22 | __array(char, rwbs, 6 ) |
25 | __array(char, comm, TASK_COMM_LEN ) | ||
26 | ), | 23 | ), |
27 | 24 | ||
28 | TP_fast_assign( | 25 | TP_fast_assign( |
@@ -33,36 +30,66 @@ DECLARE_EVENT_CLASS(bcache_request, | |||
33 | __entry->orig_sector = bio->bi_sector - 16; | 30 | __entry->orig_sector = bio->bi_sector - 16; |
34 | __entry->nr_sector = bio->bi_size >> 9; | 31 | __entry->nr_sector = bio->bi_size >> 9; |
35 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | 32 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); |
36 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
37 | ), | 33 | ), |
38 | 34 | ||
39 | TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d @ %llu)", | 35 | TP_printk("%d,%d %s %llu + %u (from %d,%d @ %llu)", |
40 | MAJOR(__entry->dev), MINOR(__entry->dev), | 36 | MAJOR(__entry->dev), MINOR(__entry->dev), |
41 | __entry->rwbs, | 37 | __entry->rwbs, (unsigned long long)__entry->sector, |
42 | (unsigned long long)__entry->sector, | 38 | __entry->nr_sector, __entry->orig_major, __entry->orig_minor, |
43 | __entry->nr_sector, __entry->comm, | ||
44 | __entry->orig_major, __entry->orig_minor, | ||
45 | (unsigned long long)__entry->orig_sector) | 39 | (unsigned long long)__entry->orig_sector) |
46 | ); | 40 | ); |
47 | 41 | ||
48 | DEFINE_EVENT(bcache_request, bcache_request_start, | 42 | DECLARE_EVENT_CLASS(bkey, |
43 | TP_PROTO(struct bkey *k), | ||
44 | TP_ARGS(k), | ||
49 | 45 | ||
50 | TP_PROTO(struct search *s, struct bio *bio), | 46 | TP_STRUCT__entry( |
47 | __field(u32, size ) | ||
48 | __field(u32, inode ) | ||
49 | __field(u64, offset ) | ||
50 | __field(bool, dirty ) | ||
51 | ), | ||
51 | 52 | ||
52 | TP_ARGS(s, bio) | 53 | TP_fast_assign( |
54 | __entry->inode = KEY_INODE(k); | ||
55 | __entry->offset = KEY_OFFSET(k); | ||
56 | __entry->size = KEY_SIZE(k); | ||
57 | __entry->dirty = KEY_DIRTY(k); | ||
58 | ), | ||
59 | |||
60 | TP_printk("%u:%llu len %u dirty %u", __entry->inode, | ||
61 | __entry->offset, __entry->size, __entry->dirty) | ||
53 | ); | 62 | ); |
54 | 63 | ||
55 | DEFINE_EVENT(bcache_request, bcache_request_end, | 64 | DECLARE_EVENT_CLASS(btree_node, |
65 | TP_PROTO(struct btree *b), | ||
66 | TP_ARGS(b), | ||
67 | |||
68 | TP_STRUCT__entry( | ||
69 | __field(size_t, bucket ) | ||
70 | ), | ||
56 | 71 | ||
72 | TP_fast_assign( | ||
73 | __entry->bucket = PTR_BUCKET_NR(b->c, &b->key, 0); | ||
74 | ), | ||
75 | |||
76 | TP_printk("bucket %zu", __entry->bucket) | ||
77 | ); | ||
78 | |||
79 | /* request.c */ | ||
80 | |||
81 | DEFINE_EVENT(bcache_request, bcache_request_start, | ||
57 | TP_PROTO(struct search *s, struct bio *bio), | 82 | TP_PROTO(struct search *s, struct bio *bio), |
83 | TP_ARGS(s, bio) | ||
84 | ); | ||
58 | 85 | ||
86 | DEFINE_EVENT(bcache_request, bcache_request_end, | ||
87 | TP_PROTO(struct search *s, struct bio *bio), | ||
59 | TP_ARGS(s, bio) | 88 | TP_ARGS(s, bio) |
60 | ); | 89 | ); |
61 | 90 | ||
62 | DECLARE_EVENT_CLASS(bcache_bio, | 91 | DECLARE_EVENT_CLASS(bcache_bio, |
63 | |||
64 | TP_PROTO(struct bio *bio), | 92 | TP_PROTO(struct bio *bio), |
65 | |||
66 | TP_ARGS(bio), | 93 | TP_ARGS(bio), |
67 | 94 | ||
68 | TP_STRUCT__entry( | 95 | TP_STRUCT__entry( |
@@ -70,7 +97,6 @@ DECLARE_EVENT_CLASS(bcache_bio, | |||
70 | __field(sector_t, sector ) | 97 | __field(sector_t, sector ) |
71 | __field(unsigned int, nr_sector ) | 98 | __field(unsigned int, nr_sector ) |
72 | __array(char, rwbs, 6 ) | 99 | __array(char, rwbs, 6 ) |
73 | __array(char, comm, TASK_COMM_LEN ) | ||
74 | ), | 100 | ), |
75 | 101 | ||
76 | TP_fast_assign( | 102 | TP_fast_assign( |
@@ -78,191 +104,328 @@ DECLARE_EVENT_CLASS(bcache_bio, | |||
78 | __entry->sector = bio->bi_sector; | 104 | __entry->sector = bio->bi_sector; |
79 | __entry->nr_sector = bio->bi_size >> 9; | 105 | __entry->nr_sector = bio->bi_size >> 9; |
80 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | 106 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); |
81 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
82 | ), | 107 | ), |
83 | 108 | ||
84 | TP_printk("%d,%d %s %llu + %u [%s]", | 109 | TP_printk("%d,%d %s %llu + %u", |
85 | MAJOR(__entry->dev), MINOR(__entry->dev), | 110 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, |
86 | __entry->rwbs, | 111 | (unsigned long long)__entry->sector, __entry->nr_sector) |
87 | (unsigned long long)__entry->sector, | ||
88 | __entry->nr_sector, __entry->comm) | ||
89 | ); | 112 | ); |
90 | 113 | ||
91 | 114 | DEFINE_EVENT(bcache_bio, bcache_bypass_sequential, | |
92 | DEFINE_EVENT(bcache_bio, bcache_passthrough, | ||
93 | |||
94 | TP_PROTO(struct bio *bio), | 115 | TP_PROTO(struct bio *bio), |
116 | TP_ARGS(bio) | ||
117 | ); | ||
95 | 118 | ||
119 | DEFINE_EVENT(bcache_bio, bcache_bypass_congested, | ||
120 | TP_PROTO(struct bio *bio), | ||
96 | TP_ARGS(bio) | 121 | TP_ARGS(bio) |
97 | ); | 122 | ); |
98 | 123 | ||
99 | DEFINE_EVENT(bcache_bio, bcache_cache_hit, | 124 | TRACE_EVENT(bcache_read, |
125 | TP_PROTO(struct bio *bio, bool hit, bool bypass), | ||
126 | TP_ARGS(bio, hit, bypass), | ||
100 | 127 | ||
101 | TP_PROTO(struct bio *bio), | 128 | TP_STRUCT__entry( |
129 | __field(dev_t, dev ) | ||
130 | __field(sector_t, sector ) | ||
131 | __field(unsigned int, nr_sector ) | ||
132 | __array(char, rwbs, 6 ) | ||
133 | __field(bool, cache_hit ) | ||
134 | __field(bool, bypass ) | ||
135 | ), | ||
102 | 136 | ||
103 | TP_ARGS(bio) | 137 | TP_fast_assign( |
138 | __entry->dev = bio->bi_bdev->bd_dev; | ||
139 | __entry->sector = bio->bi_sector; | ||
140 | __entry->nr_sector = bio->bi_size >> 9; | ||
141 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
142 | __entry->cache_hit = hit; | ||
143 | __entry->bypass = bypass; | ||
144 | ), | ||
145 | |||
146 | TP_printk("%d,%d %s %llu + %u hit %u bypass %u", | ||
147 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
148 | __entry->rwbs, (unsigned long long)__entry->sector, | ||
149 | __entry->nr_sector, __entry->cache_hit, __entry->bypass) | ||
104 | ); | 150 | ); |
105 | 151 | ||
106 | DEFINE_EVENT(bcache_bio, bcache_cache_miss, | 152 | TRACE_EVENT(bcache_write, |
153 | TP_PROTO(struct bio *bio, bool writeback, bool bypass), | ||
154 | TP_ARGS(bio, writeback, bypass), | ||
107 | 155 | ||
108 | TP_PROTO(struct bio *bio), | 156 | TP_STRUCT__entry( |
157 | __field(dev_t, dev ) | ||
158 | __field(sector_t, sector ) | ||
159 | __field(unsigned int, nr_sector ) | ||
160 | __array(char, rwbs, 6 ) | ||
161 | __field(bool, writeback ) | ||
162 | __field(bool, bypass ) | ||
163 | ), | ||
109 | 164 | ||
110 | TP_ARGS(bio) | 165 | TP_fast_assign( |
166 | __entry->dev = bio->bi_bdev->bd_dev; | ||
167 | __entry->sector = bio->bi_sector; | ||
168 | __entry->nr_sector = bio->bi_size >> 9; | ||
169 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
170 | __entry->writeback = writeback; | ||
171 | __entry->bypass = bypass; | ||
172 | ), | ||
173 | |||
174 | TP_printk("%d,%d %s %llu + %u hit %u bypass %u", | ||
175 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
176 | __entry->rwbs, (unsigned long long)__entry->sector, | ||
177 | __entry->nr_sector, __entry->writeback, __entry->bypass) | ||
111 | ); | 178 | ); |
112 | 179 | ||
113 | DEFINE_EVENT(bcache_bio, bcache_read_retry, | 180 | DEFINE_EVENT(bcache_bio, bcache_read_retry, |
114 | |||
115 | TP_PROTO(struct bio *bio), | 181 | TP_PROTO(struct bio *bio), |
116 | |||
117 | TP_ARGS(bio) | 182 | TP_ARGS(bio) |
118 | ); | 183 | ); |
119 | 184 | ||
120 | DEFINE_EVENT(bcache_bio, bcache_writethrough, | 185 | DEFINE_EVENT(bkey, bcache_cache_insert, |
186 | TP_PROTO(struct bkey *k), | ||
187 | TP_ARGS(k) | ||
188 | ); | ||
121 | 189 | ||
122 | TP_PROTO(struct bio *bio), | 190 | /* Journal */ |
123 | 191 | ||
124 | TP_ARGS(bio) | 192 | DECLARE_EVENT_CLASS(cache_set, |
125 | ); | 193 | TP_PROTO(struct cache_set *c), |
194 | TP_ARGS(c), | ||
126 | 195 | ||
127 | DEFINE_EVENT(bcache_bio, bcache_writeback, | 196 | TP_STRUCT__entry( |
197 | __array(char, uuid, 16 ) | ||
198 | ), | ||
128 | 199 | ||
129 | TP_PROTO(struct bio *bio), | 200 | TP_fast_assign( |
201 | memcpy(__entry->uuid, c->sb.set_uuid, 16); | ||
202 | ), | ||
130 | 203 | ||
131 | TP_ARGS(bio) | 204 | TP_printk("%pU", __entry->uuid) |
132 | ); | 205 | ); |
133 | 206 | ||
134 | DEFINE_EVENT(bcache_bio, bcache_write_skip, | 207 | DEFINE_EVENT(bkey, bcache_journal_replay_key, |
135 | 208 | TP_PROTO(struct bkey *k), | |
136 | TP_PROTO(struct bio *bio), | 209 | TP_ARGS(k) |
210 | ); | ||
137 | 211 | ||
138 | TP_ARGS(bio) | 212 | DEFINE_EVENT(cache_set, bcache_journal_full, |
213 | TP_PROTO(struct cache_set *c), | ||
214 | TP_ARGS(c) | ||
139 | ); | 215 | ); |
140 | 216 | ||
141 | DEFINE_EVENT(bcache_bio, bcache_btree_read, | 217 | DEFINE_EVENT(cache_set, bcache_journal_entry_full, |
218 | TP_PROTO(struct cache_set *c), | ||
219 | TP_ARGS(c) | ||
220 | ); | ||
142 | 221 | ||
222 | DEFINE_EVENT(bcache_bio, bcache_journal_write, | ||
143 | TP_PROTO(struct bio *bio), | 223 | TP_PROTO(struct bio *bio), |
144 | |||
145 | TP_ARGS(bio) | 224 | TP_ARGS(bio) |
146 | ); | 225 | ); |
147 | 226 | ||
148 | DEFINE_EVENT(bcache_bio, bcache_btree_write, | 227 | /* Btree */ |
149 | 228 | ||
150 | TP_PROTO(struct bio *bio), | 229 | DEFINE_EVENT(cache_set, bcache_btree_cache_cannibalize, |
230 | TP_PROTO(struct cache_set *c), | ||
231 | TP_ARGS(c) | ||
232 | ); | ||
151 | 233 | ||
152 | TP_ARGS(bio) | 234 | DEFINE_EVENT(btree_node, bcache_btree_read, |
235 | TP_PROTO(struct btree *b), | ||
236 | TP_ARGS(b) | ||
153 | ); | 237 | ); |
154 | 238 | ||
155 | DEFINE_EVENT(bcache_bio, bcache_write_dirty, | 239 | TRACE_EVENT(bcache_btree_write, |
240 | TP_PROTO(struct btree *b), | ||
241 | TP_ARGS(b), | ||
156 | 242 | ||
157 | TP_PROTO(struct bio *bio), | 243 | TP_STRUCT__entry( |
244 | __field(size_t, bucket ) | ||
245 | __field(unsigned, block ) | ||
246 | __field(unsigned, keys ) | ||
247 | ), | ||
158 | 248 | ||
159 | TP_ARGS(bio) | 249 | TP_fast_assign( |
250 | __entry->bucket = PTR_BUCKET_NR(b->c, &b->key, 0); | ||
251 | __entry->block = b->written; | ||
252 | __entry->keys = b->sets[b->nsets].data->keys; | ||
253 | ), | ||
254 | |||
255 | TP_printk("bucket %zu", __entry->bucket) | ||
160 | ); | 256 | ); |
161 | 257 | ||
162 | DEFINE_EVENT(bcache_bio, bcache_read_dirty, | 258 | DEFINE_EVENT(btree_node, bcache_btree_node_alloc, |
259 | TP_PROTO(struct btree *b), | ||
260 | TP_ARGS(b) | ||
261 | ); | ||
163 | 262 | ||
164 | TP_PROTO(struct bio *bio), | 263 | DEFINE_EVENT(btree_node, bcache_btree_node_alloc_fail, |
264 | TP_PROTO(struct btree *b), | ||
265 | TP_ARGS(b) | ||
266 | ); | ||
165 | 267 | ||
166 | TP_ARGS(bio) | 268 | DEFINE_EVENT(btree_node, bcache_btree_node_free, |
269 | TP_PROTO(struct btree *b), | ||
270 | TP_ARGS(b) | ||
167 | ); | 271 | ); |
168 | 272 | ||
169 | DEFINE_EVENT(bcache_bio, bcache_write_moving, | 273 | TRACE_EVENT(bcache_btree_gc_coalesce, |
274 | TP_PROTO(unsigned nodes), | ||
275 | TP_ARGS(nodes), | ||
170 | 276 | ||
171 | TP_PROTO(struct bio *bio), | 277 | TP_STRUCT__entry( |
278 | __field(unsigned, nodes ) | ||
279 | ), | ||
172 | 280 | ||
173 | TP_ARGS(bio) | 281 | TP_fast_assign( |
282 | __entry->nodes = nodes; | ||
283 | ), | ||
284 | |||
285 | TP_printk("coalesced %u nodes", __entry->nodes) | ||
174 | ); | 286 | ); |
175 | 287 | ||
176 | DEFINE_EVENT(bcache_bio, bcache_read_moving, | 288 | DEFINE_EVENT(cache_set, bcache_gc_start, |
289 | TP_PROTO(struct cache_set *c), | ||
290 | TP_ARGS(c) | ||
291 | ); | ||
177 | 292 | ||
178 | TP_PROTO(struct bio *bio), | 293 | DEFINE_EVENT(cache_set, bcache_gc_end, |
294 | TP_PROTO(struct cache_set *c), | ||
295 | TP_ARGS(c) | ||
296 | ); | ||
179 | 297 | ||
180 | TP_ARGS(bio) | 298 | DEFINE_EVENT(bkey, bcache_gc_copy, |
299 | TP_PROTO(struct bkey *k), | ||
300 | TP_ARGS(k) | ||
181 | ); | 301 | ); |
182 | 302 | ||
183 | DEFINE_EVENT(bcache_bio, bcache_journal_write, | 303 | DEFINE_EVENT(bkey, bcache_gc_copy_collision, |
304 | TP_PROTO(struct bkey *k), | ||
305 | TP_ARGS(k) | ||
306 | ); | ||
184 | 307 | ||
185 | TP_PROTO(struct bio *bio), | 308 | TRACE_EVENT(bcache_btree_insert_key, |
309 | TP_PROTO(struct btree *b, struct bkey *k, unsigned op, unsigned status), | ||
310 | TP_ARGS(b, k, op, status), | ||
186 | 311 | ||
187 | TP_ARGS(bio) | 312 | TP_STRUCT__entry( |
188 | ); | 313 | __field(u64, btree_node ) |
314 | __field(u32, btree_level ) | ||
315 | __field(u32, inode ) | ||
316 | __field(u64, offset ) | ||
317 | __field(u32, size ) | ||
318 | __field(u8, dirty ) | ||
319 | __field(u8, op ) | ||
320 | __field(u8, status ) | ||
321 | ), | ||
189 | 322 | ||
190 | DECLARE_EVENT_CLASS(bcache_cache_bio, | 323 | TP_fast_assign( |
324 | __entry->btree_node = PTR_BUCKET_NR(b->c, &b->key, 0); | ||
325 | __entry->btree_level = b->level; | ||
326 | __entry->inode = KEY_INODE(k); | ||
327 | __entry->offset = KEY_OFFSET(k); | ||
328 | __entry->size = KEY_SIZE(k); | ||
329 | __entry->dirty = KEY_DIRTY(k); | ||
330 | __entry->op = op; | ||
331 | __entry->status = status; | ||
332 | ), | ||
191 | 333 | ||
192 | TP_PROTO(struct bio *bio, | 334 | TP_printk("%u for %u at %llu(%u): %u:%llu len %u dirty %u", |
193 | sector_t orig_sector, | 335 | __entry->status, __entry->op, |
194 | struct block_device* orig_bdev), | 336 | __entry->btree_node, __entry->btree_level, |
337 | __entry->inode, __entry->offset, | ||
338 | __entry->size, __entry->dirty) | ||
339 | ); | ||
195 | 340 | ||
196 | TP_ARGS(bio, orig_sector, orig_bdev), | 341 | DECLARE_EVENT_CLASS(btree_split, |
342 | TP_PROTO(struct btree *b, unsigned keys), | ||
343 | TP_ARGS(b, keys), | ||
197 | 344 | ||
198 | TP_STRUCT__entry( | 345 | TP_STRUCT__entry( |
199 | __field(dev_t, dev ) | 346 | __field(size_t, bucket ) |
200 | __field(dev_t, orig_dev ) | 347 | __field(unsigned, keys ) |
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 | ), | 348 | ), |
207 | 349 | ||
208 | TP_fast_assign( | 350 | TP_fast_assign( |
209 | __entry->dev = bio->bi_bdev->bd_dev; | 351 | __entry->bucket = PTR_BUCKET_NR(b->c, &b->key, 0); |
210 | __entry->orig_dev = orig_bdev->bd_dev; | 352 | __entry->keys = keys; |
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 | ), | 353 | ), |
217 | 354 | ||
218 | TP_printk("%d,%d %s %llu + %u [%s] (from %d,%d %llu)", | 355 | TP_printk("bucket %zu keys %u", __entry->bucket, __entry->keys) |
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 | ); | 356 | ); |
226 | 357 | ||
227 | DEFINE_EVENT(bcache_cache_bio, bcache_cache_insert, | 358 | DEFINE_EVENT(btree_split, bcache_btree_node_split, |
228 | 359 | TP_PROTO(struct btree *b, unsigned keys), | |
229 | TP_PROTO(struct bio *bio, | 360 | TP_ARGS(b, keys) |
230 | sector_t orig_sector, | 361 | ); |
231 | struct block_device *orig_bdev), | ||
232 | 362 | ||
233 | TP_ARGS(bio, orig_sector, orig_bdev) | 363 | DEFINE_EVENT(btree_split, bcache_btree_node_compact, |
364 | TP_PROTO(struct btree *b, unsigned keys), | ||
365 | TP_ARGS(b, keys) | ||
234 | ); | 366 | ); |
235 | 367 | ||
236 | DECLARE_EVENT_CLASS(bcache_gc, | 368 | DEFINE_EVENT(btree_node, bcache_btree_set_root, |
369 | TP_PROTO(struct btree *b), | ||
370 | TP_ARGS(b) | ||
371 | ); | ||
237 | 372 | ||
238 | TP_PROTO(uint8_t *uuid), | 373 | /* Allocator */ |
239 | 374 | ||
240 | TP_ARGS(uuid), | 375 | TRACE_EVENT(bcache_alloc_invalidate, |
376 | TP_PROTO(struct cache *ca), | ||
377 | TP_ARGS(ca), | ||
241 | 378 | ||
242 | TP_STRUCT__entry( | 379 | TP_STRUCT__entry( |
243 | __field(uint8_t *, uuid) | 380 | __field(unsigned, free ) |
381 | __field(unsigned, free_inc ) | ||
382 | __field(unsigned, free_inc_size ) | ||
383 | __field(unsigned, unused ) | ||
244 | ), | 384 | ), |
245 | 385 | ||
246 | TP_fast_assign( | 386 | TP_fast_assign( |
247 | __entry->uuid = uuid; | 387 | __entry->free = fifo_used(&ca->free); |
388 | __entry->free_inc = fifo_used(&ca->free_inc); | ||
389 | __entry->free_inc_size = ca->free_inc.size; | ||
390 | __entry->unused = fifo_used(&ca->unused); | ||
248 | ), | 391 | ), |
249 | 392 | ||
250 | TP_printk("%pU", __entry->uuid) | 393 | TP_printk("free %u free_inc %u/%u unused %u", __entry->free, |
394 | __entry->free_inc, __entry->free_inc_size, __entry->unused) | ||
251 | ); | 395 | ); |
252 | 396 | ||
397 | TRACE_EVENT(bcache_alloc_fail, | ||
398 | TP_PROTO(struct cache *ca), | ||
399 | TP_ARGS(ca), | ||
253 | 400 | ||
254 | DEFINE_EVENT(bcache_gc, bcache_gc_start, | 401 | TP_STRUCT__entry( |
402 | __field(unsigned, free ) | ||
403 | __field(unsigned, free_inc ) | ||
404 | __field(unsigned, unused ) | ||
405 | __field(unsigned, blocked ) | ||
406 | ), | ||
255 | 407 | ||
256 | TP_PROTO(uint8_t *uuid), | 408 | TP_fast_assign( |
409 | __entry->free = fifo_used(&ca->free); | ||
410 | __entry->free_inc = fifo_used(&ca->free_inc); | ||
411 | __entry->unused = fifo_used(&ca->unused); | ||
412 | __entry->blocked = atomic_read(&ca->set->prio_blocked); | ||
413 | ), | ||
257 | 414 | ||
258 | TP_ARGS(uuid) | 415 | TP_printk("free %u free_inc %u unused %u blocked %u", __entry->free, |
416 | __entry->free_inc, __entry->unused, __entry->blocked) | ||
259 | ); | 417 | ); |
260 | 418 | ||
261 | DEFINE_EVENT(bcache_gc, bcache_gc_end, | 419 | /* Background writeback */ |
262 | 420 | ||
263 | TP_PROTO(uint8_t *uuid), | 421 | DEFINE_EVENT(bkey, bcache_writeback, |
422 | TP_PROTO(struct bkey *k), | ||
423 | TP_ARGS(k) | ||
424 | ); | ||
264 | 425 | ||
265 | TP_ARGS(uuid) | 426 | DEFINE_EVENT(bkey, bcache_writeback_collision, |
427 | TP_PROTO(struct bkey *k), | ||
428 | TP_ARGS(k) | ||
266 | ); | 429 | ); |
267 | 430 | ||
268 | #endif /* _TRACE_BCACHE_H */ | 431 | #endif /* _TRACE_BCACHE_H */ |