diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
| commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
| tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /include/trace/events | |
| parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
| parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) | |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'include/trace/events')
| -rw-r--r-- | include/trace/events/bkl.h | 61 | ||||
| -rw-r--r-- | include/trace/events/block.h | 202 | ||||
| -rw-r--r-- | include/trace/events/ext4.h | 129 | ||||
| -rw-r--r-- | include/trace/events/irq.h | 52 | ||||
| -rw-r--r-- | include/trace/events/jbd2.h | 63 | ||||
| -rw-r--r-- | include/trace/events/kmem.h | 130 | ||||
| -rw-r--r-- | include/trace/events/lock.h (renamed from include/trace/events/lockdep.h) | 8 | ||||
| -rw-r--r-- | include/trace/events/mce.h | 69 | ||||
| -rw-r--r-- | include/trace/events/module.h | 22 | ||||
| -rw-r--r-- | include/trace/events/power.h | 38 | ||||
| -rw-r--r-- | include/trace/events/sched.h | 217 | ||||
| -rw-r--r-- | include/trace/events/signal.h | 173 | ||||
| -rw-r--r-- | include/trace/events/syscalls.h | 3 | ||||
| -rw-r--r-- | include/trace/events/timer.h | 79 | ||||
| -rw-r--r-- | include/trace/events/workqueue.h | 22 |
15 files changed, 589 insertions, 679 deletions
diff --git a/include/trace/events/bkl.h b/include/trace/events/bkl.h new file mode 100644 index 000000000000..1af72dc24278 --- /dev/null +++ b/include/trace/events/bkl.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM bkl | ||
| 3 | |||
| 4 | #if !defined(_TRACE_BKL_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_BKL_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | |||
| 9 | TRACE_EVENT(lock_kernel, | ||
| 10 | |||
| 11 | TP_PROTO(const char *func, const char *file, int line), | ||
| 12 | |||
| 13 | TP_ARGS(func, file, line), | ||
| 14 | |||
| 15 | TP_STRUCT__entry( | ||
| 16 | __field( int, depth ) | ||
| 17 | __field_ext( const char *, func, FILTER_PTR_STRING ) | ||
| 18 | __field_ext( const char *, file, FILTER_PTR_STRING ) | ||
| 19 | __field( int, line ) | ||
| 20 | ), | ||
| 21 | |||
| 22 | TP_fast_assign( | ||
| 23 | /* We want to record the lock_depth after lock is acquired */ | ||
| 24 | __entry->depth = current->lock_depth + 1; | ||
| 25 | __entry->func = func; | ||
| 26 | __entry->file = file; | ||
| 27 | __entry->line = line; | ||
| 28 | ), | ||
| 29 | |||
| 30 | TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth, | ||
| 31 | __entry->file, __entry->line, __entry->func) | ||
| 32 | ); | ||
| 33 | |||
| 34 | TRACE_EVENT(unlock_kernel, | ||
| 35 | |||
| 36 | TP_PROTO(const char *func, const char *file, int line), | ||
| 37 | |||
| 38 | TP_ARGS(func, file, line), | ||
| 39 | |||
| 40 | TP_STRUCT__entry( | ||
| 41 | __field(int, depth ) | ||
| 42 | __field(const char *, func ) | ||
| 43 | __field(const char *, file ) | ||
| 44 | __field(int, line ) | ||
| 45 | ), | ||
| 46 | |||
| 47 | TP_fast_assign( | ||
| 48 | __entry->depth = current->lock_depth; | ||
| 49 | __entry->func = func; | ||
| 50 | __entry->file = file; | ||
| 51 | __entry->line = line; | ||
| 52 | ), | ||
| 53 | |||
| 54 | TP_printk("depth=%d file:line=%s:%d func=%s()", __entry->depth, | ||
| 55 | __entry->file, __entry->line, __entry->func) | ||
| 56 | ); | ||
| 57 | |||
| 58 | #endif /* _TRACE_BKL_H */ | ||
| 59 | |||
| 60 | /* This part must be outside protection */ | ||
| 61 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 00405b5f624a..5fb72733331e 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
| 9 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
| 10 | 10 | ||
| 11 | TRACE_EVENT(block_rq_abort, | 11 | DECLARE_EVENT_CLASS(block_rq_with_error, |
| 12 | 12 | ||
| 13 | TP_PROTO(struct request_queue *q, struct request *rq), | 13 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 14 | 14 | ||
| @@ -40,41 +40,28 @@ TRACE_EVENT(block_rq_abort, | |||
| 40 | __entry->nr_sector, __entry->errors) | 40 | __entry->nr_sector, __entry->errors) |
| 41 | ); | 41 | ); |
| 42 | 42 | ||
| 43 | TRACE_EVENT(block_rq_insert, | 43 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, |
| 44 | 44 | ||
| 45 | TP_PROTO(struct request_queue *q, struct request *rq), | 45 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 46 | 46 | ||
| 47 | TP_ARGS(q, rq), | 47 | TP_ARGS(q, rq) |
| 48 | ); | ||
| 48 | 49 | ||
| 49 | TP_STRUCT__entry( | 50 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, |
| 50 | __field( dev_t, dev ) | ||
| 51 | __field( sector_t, sector ) | ||
| 52 | __field( unsigned int, nr_sector ) | ||
| 53 | __field( unsigned int, bytes ) | ||
| 54 | __array( char, rwbs, 6 ) | ||
| 55 | __array( char, comm, TASK_COMM_LEN ) | ||
| 56 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) | ||
| 57 | ), | ||
| 58 | 51 | ||
| 59 | TP_fast_assign( | 52 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 60 | __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; | ||
| 61 | __entry->sector = blk_pc_request(rq) ? 0 : blk_rq_pos(rq); | ||
| 62 | __entry->nr_sector = blk_pc_request(rq) ? 0 : blk_rq_sectors(rq); | ||
| 63 | __entry->bytes = blk_pc_request(rq) ? blk_rq_bytes(rq) : 0; | ||
| 64 | 53 | ||
| 65 | blk_fill_rwbs_rq(__entry->rwbs, rq); | 54 | TP_ARGS(q, rq) |
| 66 | blk_dump_cmd(__get_str(cmd), rq); | 55 | ); |
| 67 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 68 | ), | ||
| 69 | 56 | ||
| 70 | TP_printk("%d,%d %s %u (%s) %llu + %u [%s]", | 57 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, |
| 71 | MAJOR(__entry->dev), MINOR(__entry->dev), | 58 | |
| 72 | __entry->rwbs, __entry->bytes, __get_str(cmd), | 59 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 73 | (unsigned long long)__entry->sector, | 60 | |
| 74 | __entry->nr_sector, __entry->comm) | 61 | TP_ARGS(q, rq) |
| 75 | ); | 62 | ); |
| 76 | 63 | ||
| 77 | TRACE_EVENT(block_rq_issue, | 64 | DECLARE_EVENT_CLASS(block_rq, |
| 78 | 65 | ||
| 79 | TP_PROTO(struct request_queue *q, struct request *rq), | 66 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 80 | 67 | ||
| @@ -86,7 +73,7 @@ TRACE_EVENT(block_rq_issue, | |||
| 86 | __field( unsigned int, nr_sector ) | 73 | __field( unsigned int, nr_sector ) |
| 87 | __field( unsigned int, bytes ) | 74 | __field( unsigned int, bytes ) |
| 88 | __array( char, rwbs, 6 ) | 75 | __array( char, rwbs, 6 ) |
| 89 | __array( char, comm, TASK_COMM_LEN ) | 76 | __array( char, comm, TASK_COMM_LEN ) |
| 90 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) | 77 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) |
| 91 | ), | 78 | ), |
| 92 | 79 | ||
| @@ -108,68 +95,18 @@ TRACE_EVENT(block_rq_issue, | |||
| 108 | __entry->nr_sector, __entry->comm) | 95 | __entry->nr_sector, __entry->comm) |
| 109 | ); | 96 | ); |
| 110 | 97 | ||
| 111 | TRACE_EVENT(block_rq_requeue, | 98 | DEFINE_EVENT(block_rq, block_rq_insert, |
| 112 | 99 | ||
| 113 | TP_PROTO(struct request_queue *q, struct request *rq), | 100 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 114 | 101 | ||
| 115 | TP_ARGS(q, rq), | 102 | TP_ARGS(q, rq) |
| 116 | |||
| 117 | TP_STRUCT__entry( | ||
| 118 | __field( dev_t, dev ) | ||
| 119 | __field( sector_t, sector ) | ||
| 120 | __field( unsigned int, nr_sector ) | ||
| 121 | __field( int, errors ) | ||
| 122 | __array( char, rwbs, 6 ) | ||
| 123 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) | ||
| 124 | ), | ||
| 125 | |||
| 126 | TP_fast_assign( | ||
| 127 | __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; | ||
| 128 | __entry->sector = blk_pc_request(rq) ? 0 : blk_rq_pos(rq); | ||
| 129 | __entry->nr_sector = blk_pc_request(rq) ? 0 : blk_rq_sectors(rq); | ||
| 130 | __entry->errors = rq->errors; | ||
| 131 | |||
| 132 | blk_fill_rwbs_rq(__entry->rwbs, rq); | ||
| 133 | blk_dump_cmd(__get_str(cmd), rq); | ||
| 134 | ), | ||
| 135 | |||
| 136 | TP_printk("%d,%d %s (%s) %llu + %u [%d]", | ||
| 137 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 138 | __entry->rwbs, __get_str(cmd), | ||
| 139 | (unsigned long long)__entry->sector, | ||
| 140 | __entry->nr_sector, __entry->errors) | ||
| 141 | ); | 103 | ); |
| 142 | 104 | ||
| 143 | TRACE_EVENT(block_rq_complete, | 105 | DEFINE_EVENT(block_rq, block_rq_issue, |
| 144 | 106 | ||
| 145 | TP_PROTO(struct request_queue *q, struct request *rq), | 107 | TP_PROTO(struct request_queue *q, struct request *rq), |
| 146 | 108 | ||
| 147 | TP_ARGS(q, rq), | 109 | TP_ARGS(q, rq) |
| 148 | |||
| 149 | TP_STRUCT__entry( | ||
| 150 | __field( dev_t, dev ) | ||
| 151 | __field( sector_t, sector ) | ||
| 152 | __field( unsigned int, nr_sector ) | ||
| 153 | __field( int, errors ) | ||
| 154 | __array( char, rwbs, 6 ) | ||
| 155 | __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) | ||
| 156 | ), | ||
| 157 | |||
| 158 | TP_fast_assign( | ||
| 159 | __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; | ||
| 160 | __entry->sector = blk_pc_request(rq) ? 0 : blk_rq_pos(rq); | ||
| 161 | __entry->nr_sector = blk_pc_request(rq) ? 0 : blk_rq_sectors(rq); | ||
| 162 | __entry->errors = rq->errors; | ||
| 163 | |||
| 164 | blk_fill_rwbs_rq(__entry->rwbs, rq); | ||
| 165 | blk_dump_cmd(__get_str(cmd), rq); | ||
| 166 | ), | ||
| 167 | |||
| 168 | TP_printk("%d,%d %s (%s) %llu + %u [%d]", | ||
| 169 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
| 170 | __entry->rwbs, __get_str(cmd), | ||
| 171 | (unsigned long long)__entry->sector, | ||
| 172 | __entry->nr_sector, __entry->errors) | ||
| 173 | ); | 110 | ); |
| 174 | 111 | ||
| 175 | TRACE_EVENT(block_bio_bounce, | 112 | TRACE_EVENT(block_bio_bounce, |
| @@ -228,7 +165,7 @@ TRACE_EVENT(block_bio_complete, | |||
| 228 | __entry->nr_sector, __entry->error) | 165 | __entry->nr_sector, __entry->error) |
| 229 | ); | 166 | ); |
| 230 | 167 | ||
| 231 | TRACE_EVENT(block_bio_backmerge, | 168 | DECLARE_EVENT_CLASS(block_bio, |
| 232 | 169 | ||
| 233 | TP_PROTO(struct request_queue *q, struct bio *bio), | 170 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| 234 | 171 | ||
| @@ -256,63 +193,28 @@ TRACE_EVENT(block_bio_backmerge, | |||
| 256 | __entry->nr_sector, __entry->comm) | 193 | __entry->nr_sector, __entry->comm) |
| 257 | ); | 194 | ); |
| 258 | 195 | ||
| 259 | TRACE_EVENT(block_bio_frontmerge, | 196 | DEFINE_EVENT(block_bio, block_bio_backmerge, |
| 260 | 197 | ||
| 261 | TP_PROTO(struct request_queue *q, struct bio *bio), | 198 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| 262 | 199 | ||
| 263 | TP_ARGS(q, bio), | 200 | TP_ARGS(q, bio) |
| 264 | |||
| 265 | TP_STRUCT__entry( | ||
| 266 | __field( dev_t, dev ) | ||
| 267 | __field( sector_t, sector ) | ||
| 268 | __field( unsigned, nr_sector ) | ||
| 269 | __array( char, rwbs, 6 ) | ||
| 270 | __array( char, comm, TASK_COMM_LEN ) | ||
| 271 | ), | ||
| 272 | |||
| 273 | TP_fast_assign( | ||
| 274 | __entry->dev = bio->bi_bdev->bd_dev; | ||
| 275 | __entry->sector = bio->bi_sector; | ||
| 276 | __entry->nr_sector = bio->bi_size >> 9; | ||
| 277 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
| 278 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 279 | ), | ||
| 280 | |||
| 281 | TP_printk("%d,%d %s %llu + %u [%s]", | ||
| 282 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
| 283 | (unsigned long long)__entry->sector, | ||
| 284 | __entry->nr_sector, __entry->comm) | ||
| 285 | ); | 201 | ); |
| 286 | 202 | ||
| 287 | TRACE_EVENT(block_bio_queue, | 203 | DEFINE_EVENT(block_bio, block_bio_frontmerge, |
| 288 | 204 | ||
| 289 | TP_PROTO(struct request_queue *q, struct bio *bio), | 205 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| 290 | 206 | ||
| 291 | TP_ARGS(q, bio), | 207 | TP_ARGS(q, bio) |
| 208 | ); | ||
| 292 | 209 | ||
| 293 | TP_STRUCT__entry( | 210 | DEFINE_EVENT(block_bio, block_bio_queue, |
| 294 | __field( dev_t, dev ) | ||
| 295 | __field( sector_t, sector ) | ||
| 296 | __field( unsigned int, nr_sector ) | ||
| 297 | __array( char, rwbs, 6 ) | ||
| 298 | __array( char, comm, TASK_COMM_LEN ) | ||
| 299 | ), | ||
| 300 | 211 | ||
| 301 | TP_fast_assign( | 212 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| 302 | __entry->dev = bio->bi_bdev->bd_dev; | ||
| 303 | __entry->sector = bio->bi_sector; | ||
| 304 | __entry->nr_sector = bio->bi_size >> 9; | ||
| 305 | blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); | ||
| 306 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 307 | ), | ||
| 308 | 213 | ||
| 309 | TP_printk("%d,%d %s %llu + %u [%s]", | 214 | TP_ARGS(q, bio) |
| 310 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
| 311 | (unsigned long long)__entry->sector, | ||
| 312 | __entry->nr_sector, __entry->comm) | ||
| 313 | ); | 215 | ); |
| 314 | 216 | ||
| 315 | TRACE_EVENT(block_getrq, | 217 | DECLARE_EVENT_CLASS(block_get_rq, |
| 316 | 218 | ||
| 317 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 219 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
| 318 | 220 | ||
| @@ -341,33 +243,18 @@ TRACE_EVENT(block_getrq, | |||
| 341 | __entry->nr_sector, __entry->comm) | 243 | __entry->nr_sector, __entry->comm) |
| 342 | ); | 244 | ); |
| 343 | 245 | ||
| 344 | TRACE_EVENT(block_sleeprq, | 246 | DEFINE_EVENT(block_get_rq, block_getrq, |
| 345 | 247 | ||
| 346 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 248 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
| 347 | 249 | ||
| 348 | TP_ARGS(q, bio, rw), | 250 | TP_ARGS(q, bio, rw) |
| 251 | ); | ||
| 349 | 252 | ||
| 350 | TP_STRUCT__entry( | 253 | DEFINE_EVENT(block_get_rq, block_sleeprq, |
| 351 | __field( dev_t, dev ) | ||
| 352 | __field( sector_t, sector ) | ||
| 353 | __field( unsigned int, nr_sector ) | ||
| 354 | __array( char, rwbs, 6 ) | ||
| 355 | __array( char, comm, TASK_COMM_LEN ) | ||
| 356 | ), | ||
| 357 | 254 | ||
| 358 | TP_fast_assign( | 255 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
| 359 | __entry->dev = bio ? bio->bi_bdev->bd_dev : 0; | ||
| 360 | __entry->sector = bio ? bio->bi_sector : 0; | ||
| 361 | __entry->nr_sector = bio ? bio->bi_size >> 9 : 0; | ||
| 362 | blk_fill_rwbs(__entry->rwbs, | ||
| 363 | bio ? bio->bi_rw : 0, __entry->nr_sector); | ||
| 364 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 365 | ), | ||
| 366 | 256 | ||
| 367 | TP_printk("%d,%d %s %llu + %u [%s]", | 257 | TP_ARGS(q, bio, rw) |
| 368 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, | ||
| 369 | (unsigned long long)__entry->sector, | ||
| 370 | __entry->nr_sector, __entry->comm) | ||
| 371 | ); | 258 | ); |
| 372 | 259 | ||
| 373 | TRACE_EVENT(block_plug, | 260 | TRACE_EVENT(block_plug, |
| @@ -387,7 +274,7 @@ TRACE_EVENT(block_plug, | |||
| 387 | TP_printk("[%s]", __entry->comm) | 274 | TP_printk("[%s]", __entry->comm) |
| 388 | ); | 275 | ); |
| 389 | 276 | ||
| 390 | TRACE_EVENT(block_unplug_timer, | 277 | DECLARE_EVENT_CLASS(block_unplug, |
| 391 | 278 | ||
| 392 | TP_PROTO(struct request_queue *q), | 279 | TP_PROTO(struct request_queue *q), |
| 393 | 280 | ||
| @@ -406,23 +293,18 @@ TRACE_EVENT(block_unplug_timer, | |||
| 406 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) | 293 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) |
| 407 | ); | 294 | ); |
| 408 | 295 | ||
| 409 | TRACE_EVENT(block_unplug_io, | 296 | DEFINE_EVENT(block_unplug, block_unplug_timer, |
| 410 | 297 | ||
| 411 | TP_PROTO(struct request_queue *q), | 298 | TP_PROTO(struct request_queue *q), |
| 412 | 299 | ||
| 413 | TP_ARGS(q), | 300 | TP_ARGS(q) |
| 301 | ); | ||
| 414 | 302 | ||
| 415 | TP_STRUCT__entry( | 303 | DEFINE_EVENT(block_unplug, block_unplug_io, |
| 416 | __field( int, nr_rq ) | ||
| 417 | __array( char, comm, TASK_COMM_LEN ) | ||
| 418 | ), | ||
| 419 | 304 | ||
| 420 | TP_fast_assign( | 305 | TP_PROTO(struct request_queue *q), |
| 421 | __entry->nr_rq = q->rq.count[READ] + q->rq.count[WRITE]; | ||
| 422 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | ||
| 423 | ), | ||
| 424 | 306 | ||
| 425 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) | 307 | TP_ARGS(q) |
| 426 | ); | 308 | ); |
| 427 | 309 | ||
| 428 | TRACE_EVENT(block_split, | 310 | TRACE_EVENT(block_split, |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d09550bf3f95..318f76535bd4 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
| @@ -90,7 +90,7 @@ TRACE_EVENT(ext4_allocate_inode, | |||
| 90 | (unsigned long) __entry->dir, __entry->mode) | 90 | (unsigned long) __entry->dir, __entry->mode) |
| 91 | ); | 91 | ); |
| 92 | 92 | ||
| 93 | TRACE_EVENT(ext4_write_begin, | 93 | DECLARE_EVENT_CLASS(ext4__write_begin, |
| 94 | 94 | ||
| 95 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 95 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 96 | unsigned int flags), | 96 | unsigned int flags), |
| @@ -118,7 +118,23 @@ TRACE_EVENT(ext4_write_begin, | |||
| 118 | __entry->pos, __entry->len, __entry->flags) | 118 | __entry->pos, __entry->len, __entry->flags) |
| 119 | ); | 119 | ); |
| 120 | 120 | ||
| 121 | TRACE_EVENT(ext4_ordered_write_end, | 121 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 122 | |||
| 123 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
| 124 | unsigned int flags), | ||
| 125 | |||
| 126 | TP_ARGS(inode, pos, len, flags) | ||
| 127 | ); | ||
| 128 | |||
| 129 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, | ||
| 130 | |||
| 131 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
| 132 | unsigned int flags), | ||
| 133 | |||
| 134 | TP_ARGS(inode, pos, len, flags) | ||
| 135 | ); | ||
| 136 | |||
| 137 | DECLARE_EVENT_CLASS(ext4__write_end, | ||
| 122 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 138 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 123 | unsigned int copied), | 139 | unsigned int copied), |
| 124 | 140 | ||
| @@ -145,57 +161,36 @@ TRACE_EVENT(ext4_ordered_write_end, | |||
| 145 | __entry->pos, __entry->len, __entry->copied) | 161 | __entry->pos, __entry->len, __entry->copied) |
| 146 | ); | 162 | ); |
| 147 | 163 | ||
| 148 | TRACE_EVENT(ext4_writeback_write_end, | 164 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
| 165 | |||
| 149 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 166 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 150 | unsigned int copied), | 167 | unsigned int copied), |
| 151 | 168 | ||
| 152 | TP_ARGS(inode, pos, len, copied), | 169 | TP_ARGS(inode, pos, len, copied) |
| 170 | ); | ||
| 153 | 171 | ||
| 154 | TP_STRUCT__entry( | 172 | DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, |
| 155 | __field( dev_t, dev ) | ||
| 156 | __field( ino_t, ino ) | ||
| 157 | __field( loff_t, pos ) | ||
| 158 | __field( unsigned int, len ) | ||
| 159 | __field( unsigned int, copied ) | ||
| 160 | ), | ||
| 161 | 173 | ||
| 162 | TP_fast_assign( | 174 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 163 | __entry->dev = inode->i_sb->s_dev; | 175 | unsigned int copied), |
| 164 | __entry->ino = inode->i_ino; | ||
| 165 | __entry->pos = pos; | ||
| 166 | __entry->len = len; | ||
| 167 | __entry->copied = copied; | ||
| 168 | ), | ||
| 169 | 176 | ||
| 170 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 177 | TP_ARGS(inode, pos, len, copied) |
| 171 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 172 | __entry->pos, __entry->len, __entry->copied) | ||
| 173 | ); | 178 | ); |
| 174 | 179 | ||
| 175 | TRACE_EVENT(ext4_journalled_write_end, | 180 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
| 181 | |||
| 176 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 182 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 177 | unsigned int copied), | 183 | unsigned int copied), |
| 178 | TP_ARGS(inode, pos, len, copied), | ||
| 179 | 184 | ||
| 180 | TP_STRUCT__entry( | 185 | TP_ARGS(inode, pos, len, copied) |
| 181 | __field( dev_t, dev ) | 186 | ); |
| 182 | __field( ino_t, ino ) | ||
| 183 | __field( loff_t, pos ) | ||
| 184 | __field( unsigned int, len ) | ||
| 185 | __field( unsigned int, copied ) | ||
| 186 | ), | ||
| 187 | 187 | ||
| 188 | TP_fast_assign( | 188 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 189 | __entry->dev = inode->i_sb->s_dev; | ||
| 190 | __entry->ino = inode->i_ino; | ||
| 191 | __entry->pos = pos; | ||
| 192 | __entry->len = len; | ||
| 193 | __entry->copied = copied; | ||
| 194 | ), | ||
| 195 | 189 | ||
| 196 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | 190 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 197 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | 191 | unsigned int copied), |
| 198 | __entry->pos, __entry->len, __entry->copied) | 192 | |
| 193 | TP_ARGS(inode, pos, len, copied) | ||
| 199 | ); | 194 | ); |
| 200 | 195 | ||
| 201 | TRACE_EVENT(ext4_writepage, | 196 | TRACE_EVENT(ext4_writepage, |
| @@ -337,60 +332,6 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
| 337 | (unsigned long) __entry->writeback_index) | 332 | (unsigned long) __entry->writeback_index) |
| 338 | ); | 333 | ); |
| 339 | 334 | ||
| 340 | TRACE_EVENT(ext4_da_write_begin, | ||
| 341 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
| 342 | unsigned int flags), | ||
| 343 | |||
| 344 | TP_ARGS(inode, pos, len, flags), | ||
| 345 | |||
| 346 | TP_STRUCT__entry( | ||
| 347 | __field( dev_t, dev ) | ||
| 348 | __field( ino_t, ino ) | ||
| 349 | __field( loff_t, pos ) | ||
| 350 | __field( unsigned int, len ) | ||
| 351 | __field( unsigned int, flags ) | ||
| 352 | ), | ||
| 353 | |||
| 354 | TP_fast_assign( | ||
| 355 | __entry->dev = inode->i_sb->s_dev; | ||
| 356 | __entry->ino = inode->i_ino; | ||
| 357 | __entry->pos = pos; | ||
| 358 | __entry->len = len; | ||
| 359 | __entry->flags = flags; | ||
| 360 | ), | ||
| 361 | |||
| 362 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
| 363 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 364 | __entry->pos, __entry->len, __entry->flags) | ||
| 365 | ); | ||
| 366 | |||
| 367 | TRACE_EVENT(ext4_da_write_end, | ||
| 368 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
| 369 | unsigned int copied), | ||
| 370 | |||
| 371 | TP_ARGS(inode, pos, len, copied), | ||
| 372 | |||
| 373 | TP_STRUCT__entry( | ||
| 374 | __field( dev_t, dev ) | ||
| 375 | __field( ino_t, ino ) | ||
| 376 | __field( loff_t, pos ) | ||
| 377 | __field( unsigned int, len ) | ||
| 378 | __field( unsigned int, copied ) | ||
| 379 | ), | ||
| 380 | |||
| 381 | TP_fast_assign( | ||
| 382 | __entry->dev = inode->i_sb->s_dev; | ||
| 383 | __entry->ino = inode->i_ino; | ||
| 384 | __entry->pos = pos; | ||
| 385 | __entry->len = len; | ||
| 386 | __entry->copied = copied; | ||
| 387 | ), | ||
| 388 | |||
| 389 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
| 390 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 391 | __entry->pos, __entry->len, __entry->copied) | ||
| 392 | ); | ||
| 393 | |||
| 394 | TRACE_EVENT(ext4_discard_blocks, | 335 | TRACE_EVENT(ext4_discard_blocks, |
| 395 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 336 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 396 | unsigned long long count), | 337 | unsigned long long count), |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b89f9db4a404..0e4cfb694fe7 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
| @@ -48,7 +48,7 @@ TRACE_EVENT(irq_handler_entry, | |||
| 48 | __assign_str(name, action->name); | 48 | __assign_str(name, action->name); |
| 49 | ), | 49 | ), |
| 50 | 50 | ||
| 51 | TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name)) | 51 | TP_printk("irq=%d name=%s", __entry->irq, __get_str(name)) |
| 52 | ); | 52 | ); |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| @@ -78,22 +78,11 @@ TRACE_EVENT(irq_handler_exit, | |||
| 78 | __entry->ret = ret; | 78 | __entry->ret = ret; |
| 79 | ), | 79 | ), |
| 80 | 80 | ||
| 81 | TP_printk("irq=%d return=%s", | 81 | TP_printk("irq=%d ret=%s", |
| 82 | __entry->irq, __entry->ret ? "handled" : "unhandled") | 82 | __entry->irq, __entry->ret ? "handled" : "unhandled") |
| 83 | ); | 83 | ); |
| 84 | 84 | ||
| 85 | /** | 85 | DECLARE_EVENT_CLASS(softirq, |
| 86 | * softirq_entry - called immediately before the softirq handler | ||
| 87 | * @h: pointer to struct softirq_action | ||
| 88 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
| 89 | * | ||
| 90 | * The @h parameter, contains a pointer to the struct softirq_action | ||
| 91 | * which has a pointer to the action handler that is called. By subtracting | ||
| 92 | * the @vec pointer from the @h pointer, we can determine the softirq | ||
| 93 | * number. Also, when used in combination with the softirq_exit tracepoint | ||
| 94 | * we can determine the softirq latency. | ||
| 95 | */ | ||
| 96 | TRACE_EVENT(softirq_entry, | ||
| 97 | 86 | ||
| 98 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 87 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), |
| 99 | 88 | ||
| @@ -107,11 +96,29 @@ TRACE_EVENT(softirq_entry, | |||
| 107 | __entry->vec = (int)(h - vec); | 96 | __entry->vec = (int)(h - vec); |
| 108 | ), | 97 | ), |
| 109 | 98 | ||
| 110 | TP_printk("softirq=%d action=%s", __entry->vec, | 99 | TP_printk("vec=%d [action=%s]", __entry->vec, |
| 111 | show_softirq_name(__entry->vec)) | 100 | show_softirq_name(__entry->vec)) |
| 112 | ); | 101 | ); |
| 113 | 102 | ||
| 114 | /** | 103 | /** |
| 104 | * softirq_entry - called immediately before the softirq handler | ||
| 105 | * @h: pointer to struct softirq_action | ||
| 106 | * @vec: pointer to first struct softirq_action in softirq_vec array | ||
| 107 | * | ||
| 108 | * The @h parameter, contains a pointer to the struct softirq_action | ||
| 109 | * which has a pointer to the action handler that is called. By subtracting | ||
| 110 | * the @vec pointer from the @h pointer, we can determine the softirq | ||
| 111 | * number. Also, when used in combination with the softirq_exit tracepoint | ||
| 112 | * we can determine the softirq latency. | ||
| 113 | */ | ||
| 114 | DEFINE_EVENT(softirq, softirq_entry, | ||
| 115 | |||
| 116 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | ||
| 117 | |||
| 118 | TP_ARGS(h, vec) | ||
| 119 | ); | ||
| 120 | |||
| 121 | /** | ||
| 115 | * softirq_exit - called immediately after the softirq handler returns | 122 | * softirq_exit - called immediately after the softirq handler returns |
| 116 | * @h: pointer to struct softirq_action | 123 | * @h: pointer to struct softirq_action |
| 117 | * @vec: pointer to first struct softirq_action in softirq_vec array | 124 | * @vec: pointer to first struct softirq_action in softirq_vec array |
| @@ -122,22 +129,11 @@ TRACE_EVENT(softirq_entry, | |||
| 122 | * combination with the softirq_entry tracepoint we can determine the softirq | 129 | * combination with the softirq_entry tracepoint we can determine the softirq |
| 123 | * latency. | 130 | * latency. |
| 124 | */ | 131 | */ |
| 125 | TRACE_EVENT(softirq_exit, | 132 | DEFINE_EVENT(softirq, softirq_exit, |
| 126 | 133 | ||
| 127 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), | 134 | TP_PROTO(struct softirq_action *h, struct softirq_action *vec), |
| 128 | 135 | ||
| 129 | TP_ARGS(h, vec), | 136 | TP_ARGS(h, vec) |
| 130 | |||
| 131 | TP_STRUCT__entry( | ||
| 132 | __field( int, vec ) | ||
| 133 | ), | ||
| 134 | |||
| 135 | TP_fast_assign( | ||
| 136 | __entry->vec = (int)(h - vec); | ||
| 137 | ), | ||
| 138 | |||
| 139 | TP_printk("softirq=%d action=%s", __entry->vec, | ||
| 140 | show_softirq_name(__entry->vec)) | ||
| 141 | ); | 137 | ); |
| 142 | 138 | ||
| 143 | #endif /* _TRACE_IRQ_H */ | 139 | #endif /* _TRACE_IRQ_H */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 3c60b75adb9e..96b370a050de 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
| @@ -30,7 +30,7 @@ TRACE_EVENT(jbd2_checkpoint, | |||
| 30 | jbd2_dev_to_name(__entry->dev), __entry->result) | 30 | jbd2_dev_to_name(__entry->dev), __entry->result) |
| 31 | ); | 31 | ); |
| 32 | 32 | ||
| 33 | TRACE_EVENT(jbd2_start_commit, | 33 | DECLARE_EVENT_CLASS(jbd2_commit, |
| 34 | 34 | ||
| 35 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | 35 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 36 | 36 | ||
| @@ -53,73 +53,32 @@ TRACE_EVENT(jbd2_start_commit, | |||
| 53 | __entry->sync_commit) | 53 | __entry->sync_commit) |
| 54 | ); | 54 | ); |
| 55 | 55 | ||
| 56 | TRACE_EVENT(jbd2_commit_locking, | 56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, |
| 57 | 57 | ||
| 58 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | 58 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 59 | 59 | ||
| 60 | TP_ARGS(journal, commit_transaction), | 60 | TP_ARGS(journal, commit_transaction) |
| 61 | |||
| 62 | TP_STRUCT__entry( | ||
| 63 | __field( dev_t, dev ) | ||
| 64 | __field( char, sync_commit ) | ||
| 65 | __field( int, transaction ) | ||
| 66 | ), | ||
| 67 | |||
| 68 | TP_fast_assign( | ||
| 69 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
| 70 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 71 | __entry->transaction = commit_transaction->t_tid; | ||
| 72 | ), | ||
| 73 | |||
| 74 | TP_printk("dev %s transaction %d sync %d", | ||
| 75 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
| 76 | __entry->sync_commit) | ||
| 77 | ); | 61 | ); |
| 78 | 62 | ||
| 79 | TRACE_EVENT(jbd2_commit_flushing, | 63 | DEFINE_EVENT(jbd2_commit, jbd2_commit_locking, |
| 80 | 64 | ||
| 81 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | 65 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 82 | 66 | ||
| 83 | TP_ARGS(journal, commit_transaction), | 67 | TP_ARGS(journal, commit_transaction) |
| 84 | |||
| 85 | TP_STRUCT__entry( | ||
| 86 | __field( dev_t, dev ) | ||
| 87 | __field( char, sync_commit ) | ||
| 88 | __field( int, transaction ) | ||
| 89 | ), | ||
| 90 | |||
| 91 | TP_fast_assign( | ||
| 92 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
| 93 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 94 | __entry->transaction = commit_transaction->t_tid; | ||
| 95 | ), | ||
| 96 | |||
| 97 | TP_printk("dev %s transaction %d sync %d", | ||
| 98 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
| 99 | __entry->sync_commit) | ||
| 100 | ); | 68 | ); |
| 101 | 69 | ||
| 102 | TRACE_EVENT(jbd2_commit_logging, | 70 | DEFINE_EVENT(jbd2_commit, jbd2_commit_flushing, |
| 103 | 71 | ||
| 104 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | 72 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 105 | 73 | ||
| 106 | TP_ARGS(journal, commit_transaction), | 74 | TP_ARGS(journal, commit_transaction) |
| 75 | ); | ||
| 107 | 76 | ||
| 108 | TP_STRUCT__entry( | 77 | DEFINE_EVENT(jbd2_commit, jbd2_commit_logging, |
| 109 | __field( dev_t, dev ) | ||
| 110 | __field( char, sync_commit ) | ||
| 111 | __field( int, transaction ) | ||
| 112 | ), | ||
| 113 | 78 | ||
| 114 | TP_fast_assign( | 79 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), |
| 115 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
| 116 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
| 117 | __entry->transaction = commit_transaction->t_tid; | ||
| 118 | ), | ||
| 119 | 80 | ||
| 120 | TP_printk("dev %s transaction %d sync %d", | 81 | TP_ARGS(journal, commit_transaction) |
| 121 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
| 122 | __entry->sync_commit) | ||
| 123 | ); | 82 | ); |
| 124 | 83 | ||
| 125 | TRACE_EVENT(jbd2_end_commit, | 84 | TRACE_EVENT(jbd2_end_commit, |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index eaf46bdd18a5..3adca0ca9dbe 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"} \ | 44 | {(unsigned long)__GFP_MOVABLE, "GFP_MOVABLE"} \ |
| 45 | ) : "GFP_NOWAIT" | 45 | ) : "GFP_NOWAIT" |
| 46 | 46 | ||
| 47 | TRACE_EVENT(kmalloc, | 47 | DECLARE_EVENT_CLASS(kmem_alloc, |
| 48 | 48 | ||
| 49 | TP_PROTO(unsigned long call_site, | 49 | TP_PROTO(unsigned long call_site, |
| 50 | const void *ptr, | 50 | const void *ptr, |
| @@ -78,41 +78,23 @@ TRACE_EVENT(kmalloc, | |||
| 78 | show_gfp_flags(__entry->gfp_flags)) | 78 | show_gfp_flags(__entry->gfp_flags)) |
| 79 | ); | 79 | ); |
| 80 | 80 | ||
| 81 | TRACE_EVENT(kmem_cache_alloc, | 81 | DEFINE_EVENT(kmem_alloc, kmalloc, |
| 82 | 82 | ||
| 83 | TP_PROTO(unsigned long call_site, | 83 | TP_PROTO(unsigned long call_site, const void *ptr, |
| 84 | const void *ptr, | 84 | size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), |
| 85 | size_t bytes_req, | ||
| 86 | size_t bytes_alloc, | ||
| 87 | gfp_t gfp_flags), | ||
| 88 | 85 | ||
| 89 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags), | 86 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags) |
| 87 | ); | ||
| 90 | 88 | ||
| 91 | TP_STRUCT__entry( | 89 | DEFINE_EVENT(kmem_alloc, kmem_cache_alloc, |
| 92 | __field( unsigned long, call_site ) | ||
| 93 | __field( const void *, ptr ) | ||
| 94 | __field( size_t, bytes_req ) | ||
| 95 | __field( size_t, bytes_alloc ) | ||
| 96 | __field( gfp_t, gfp_flags ) | ||
| 97 | ), | ||
| 98 | 90 | ||
| 99 | TP_fast_assign( | 91 | TP_PROTO(unsigned long call_site, const void *ptr, |
| 100 | __entry->call_site = call_site; | 92 | size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), |
| 101 | __entry->ptr = ptr; | ||
| 102 | __entry->bytes_req = bytes_req; | ||
| 103 | __entry->bytes_alloc = bytes_alloc; | ||
| 104 | __entry->gfp_flags = gfp_flags; | ||
| 105 | ), | ||
| 106 | 93 | ||
| 107 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s", | 94 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags) |
| 108 | __entry->call_site, | ||
| 109 | __entry->ptr, | ||
| 110 | __entry->bytes_req, | ||
| 111 | __entry->bytes_alloc, | ||
| 112 | show_gfp_flags(__entry->gfp_flags)) | ||
| 113 | ); | 95 | ); |
| 114 | 96 | ||
| 115 | TRACE_EVENT(kmalloc_node, | 97 | DECLARE_EVENT_CLASS(kmem_alloc_node, |
| 116 | 98 | ||
| 117 | TP_PROTO(unsigned long call_site, | 99 | TP_PROTO(unsigned long call_site, |
| 118 | const void *ptr, | 100 | const void *ptr, |
| @@ -150,45 +132,25 @@ TRACE_EVENT(kmalloc_node, | |||
| 150 | __entry->node) | 132 | __entry->node) |
| 151 | ); | 133 | ); |
| 152 | 134 | ||
| 153 | TRACE_EVENT(kmem_cache_alloc_node, | 135 | DEFINE_EVENT(kmem_alloc_node, kmalloc_node, |
| 154 | 136 | ||
| 155 | TP_PROTO(unsigned long call_site, | 137 | TP_PROTO(unsigned long call_site, const void *ptr, |
| 156 | const void *ptr, | 138 | size_t bytes_req, size_t bytes_alloc, |
| 157 | size_t bytes_req, | 139 | gfp_t gfp_flags, int node), |
| 158 | size_t bytes_alloc, | ||
| 159 | gfp_t gfp_flags, | ||
| 160 | int node), | ||
| 161 | 140 | ||
| 162 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), | 141 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) |
| 142 | ); | ||
| 163 | 143 | ||
| 164 | TP_STRUCT__entry( | 144 | DEFINE_EVENT(kmem_alloc_node, kmem_cache_alloc_node, |
| 165 | __field( unsigned long, call_site ) | ||
| 166 | __field( const void *, ptr ) | ||
| 167 | __field( size_t, bytes_req ) | ||
| 168 | __field( size_t, bytes_alloc ) | ||
| 169 | __field( gfp_t, gfp_flags ) | ||
| 170 | __field( int, node ) | ||
| 171 | ), | ||
| 172 | 145 | ||
| 173 | TP_fast_assign( | 146 | TP_PROTO(unsigned long call_site, const void *ptr, |
| 174 | __entry->call_site = call_site; | 147 | size_t bytes_req, size_t bytes_alloc, |
| 175 | __entry->ptr = ptr; | 148 | gfp_t gfp_flags, int node), |
| 176 | __entry->bytes_req = bytes_req; | ||
| 177 | __entry->bytes_alloc = bytes_alloc; | ||
| 178 | __entry->gfp_flags = gfp_flags; | ||
| 179 | __entry->node = node; | ||
| 180 | ), | ||
| 181 | 149 | ||
| 182 | TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d", | 150 | TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) |
| 183 | __entry->call_site, | ||
| 184 | __entry->ptr, | ||
| 185 | __entry->bytes_req, | ||
| 186 | __entry->bytes_alloc, | ||
| 187 | show_gfp_flags(__entry->gfp_flags), | ||
| 188 | __entry->node) | ||
| 189 | ); | 151 | ); |
| 190 | 152 | ||
| 191 | TRACE_EVENT(kfree, | 153 | DECLARE_EVENT_CLASS(kmem_free, |
| 192 | 154 | ||
| 193 | TP_PROTO(unsigned long call_site, const void *ptr), | 155 | TP_PROTO(unsigned long call_site, const void *ptr), |
| 194 | 156 | ||
| @@ -207,23 +169,18 @@ TRACE_EVENT(kfree, | |||
| 207 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) | 169 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) |
| 208 | ); | 170 | ); |
| 209 | 171 | ||
| 210 | TRACE_EVENT(kmem_cache_free, | 172 | DEFINE_EVENT(kmem_free, kfree, |
| 211 | 173 | ||
| 212 | TP_PROTO(unsigned long call_site, const void *ptr), | 174 | TP_PROTO(unsigned long call_site, const void *ptr), |
| 213 | 175 | ||
| 214 | TP_ARGS(call_site, ptr), | 176 | TP_ARGS(call_site, ptr) |
| 177 | ); | ||
| 215 | 178 | ||
| 216 | TP_STRUCT__entry( | 179 | DEFINE_EVENT(kmem_free, kmem_cache_free, |
| 217 | __field( unsigned long, call_site ) | ||
| 218 | __field( const void *, ptr ) | ||
| 219 | ), | ||
| 220 | 180 | ||
| 221 | TP_fast_assign( | 181 | TP_PROTO(unsigned long call_site, const void *ptr), |
| 222 | __entry->call_site = call_site; | ||
| 223 | __entry->ptr = ptr; | ||
| 224 | ), | ||
| 225 | 182 | ||
| 226 | TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr) | 183 | TP_ARGS(call_site, ptr) |
| 227 | ); | 184 | ); |
| 228 | 185 | ||
| 229 | TRACE_EVENT(mm_page_free_direct, | 186 | TRACE_EVENT(mm_page_free_direct, |
| @@ -299,7 +256,7 @@ TRACE_EVENT(mm_page_alloc, | |||
| 299 | show_gfp_flags(__entry->gfp_flags)) | 256 | show_gfp_flags(__entry->gfp_flags)) |
| 300 | ); | 257 | ); |
| 301 | 258 | ||
| 302 | TRACE_EVENT(mm_page_alloc_zone_locked, | 259 | DECLARE_EVENT_CLASS(mm_page, |
| 303 | 260 | ||
| 304 | TP_PROTO(struct page *page, unsigned int order, int migratetype), | 261 | TP_PROTO(struct page *page, unsigned int order, int migratetype), |
| 305 | 262 | ||
| @@ -325,29 +282,22 @@ TRACE_EVENT(mm_page_alloc_zone_locked, | |||
| 325 | __entry->order == 0) | 282 | __entry->order == 0) |
| 326 | ); | 283 | ); |
| 327 | 284 | ||
| 328 | TRACE_EVENT(mm_page_pcpu_drain, | 285 | DEFINE_EVENT(mm_page, mm_page_alloc_zone_locked, |
| 329 | 286 | ||
| 330 | TP_PROTO(struct page *page, int order, int migratetype), | 287 | TP_PROTO(struct page *page, unsigned int order, int migratetype), |
| 331 | 288 | ||
| 332 | TP_ARGS(page, order, migratetype), | 289 | TP_ARGS(page, order, migratetype) |
| 290 | ); | ||
| 333 | 291 | ||
| 334 | TP_STRUCT__entry( | 292 | DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain, |
| 335 | __field( struct page *, page ) | ||
| 336 | __field( int, order ) | ||
| 337 | __field( int, migratetype ) | ||
| 338 | ), | ||
| 339 | 293 | ||
| 340 | TP_fast_assign( | 294 | TP_PROTO(struct page *page, unsigned int order, int migratetype), |
| 341 | __entry->page = page; | 295 | |
| 342 | __entry->order = order; | 296 | TP_ARGS(page, order, migratetype), |
| 343 | __entry->migratetype = migratetype; | ||
| 344 | ), | ||
| 345 | 297 | ||
| 346 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d", | 298 | TP_printk("page=%p pfn=%lu order=%d migratetype=%d", |
| 347 | __entry->page, | 299 | __entry->page, page_to_pfn(__entry->page), |
| 348 | page_to_pfn(__entry->page), | 300 | __entry->order, __entry->migratetype) |
| 349 | __entry->order, | ||
| 350 | __entry->migratetype) | ||
| 351 | ); | 301 | ); |
| 352 | 302 | ||
| 353 | TRACE_EVENT(mm_page_alloc_extfrag, | 303 | TRACE_EVENT(mm_page_alloc_extfrag, |
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lock.h index bcf1d209a00d..a870ba125aa8 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lock.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM lockdep | 2 | #define TRACE_SYSTEM lock |
| 3 | 3 | ||
| 4 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_LOCKDEP_H | 5 | #define _TRACE_LOCK_H |
| 6 | 6 | ||
| 7 | #include <linux/lockdep.h> | 7 | #include <linux/lockdep.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| @@ -90,7 +90,7 @@ TRACE_EVENT(lock_acquired, | |||
| 90 | #endif | 90 | #endif |
| 91 | #endif | 91 | #endif |
| 92 | 92 | ||
| 93 | #endif /* _TRACE_LOCKDEP_H */ | 93 | #endif /* _TRACE_LOCK_H */ |
| 94 | 94 | ||
| 95 | /* This part must be outside protection */ | 95 | /* This part must be outside protection */ |
| 96 | #include <trace/define_trace.h> | 96 | #include <trace/define_trace.h> |
diff --git a/include/trace/events/mce.h b/include/trace/events/mce.h new file mode 100644 index 000000000000..7eee77895cb3 --- /dev/null +++ b/include/trace/events/mce.h | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM mce | ||
| 3 | |||
| 4 | #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_MCE_H | ||
| 6 | |||
| 7 | #include <linux/ktime.h> | ||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | #include <asm/mce.h> | ||
| 10 | |||
| 11 | TRACE_EVENT(mce_record, | ||
| 12 | |||
| 13 | TP_PROTO(struct mce *m), | ||
| 14 | |||
| 15 | TP_ARGS(m), | ||
| 16 | |||
| 17 | TP_STRUCT__entry( | ||
| 18 | __field( u64, mcgcap ) | ||
| 19 | __field( u64, mcgstatus ) | ||
| 20 | __field( u8, bank ) | ||
| 21 | __field( u64, status ) | ||
| 22 | __field( u64, addr ) | ||
| 23 | __field( u64, misc ) | ||
| 24 | __field( u64, ip ) | ||
| 25 | __field( u8, cs ) | ||
| 26 | __field( u64, tsc ) | ||
| 27 | __field( u64, walltime ) | ||
| 28 | __field( u32, cpu ) | ||
| 29 | __field( u32, cpuid ) | ||
| 30 | __field( u32, apicid ) | ||
| 31 | __field( u32, socketid ) | ||
| 32 | __field( u8, cpuvendor ) | ||
| 33 | ), | ||
| 34 | |||
| 35 | TP_fast_assign( | ||
| 36 | __entry->mcgcap = m->mcgcap; | ||
| 37 | __entry->mcgstatus = m->mcgstatus; | ||
| 38 | __entry->bank = m->bank; | ||
| 39 | __entry->status = m->status; | ||
| 40 | __entry->addr = m->addr; | ||
| 41 | __entry->misc = m->misc; | ||
| 42 | __entry->ip = m->ip; | ||
| 43 | __entry->cs = m->cs; | ||
| 44 | __entry->tsc = m->tsc; | ||
| 45 | __entry->walltime = m->time; | ||
| 46 | __entry->cpu = m->extcpu; | ||
| 47 | __entry->cpuid = m->cpuid; | ||
| 48 | __entry->apicid = m->apicid; | ||
| 49 | __entry->socketid = m->socketid; | ||
| 50 | __entry->cpuvendor = m->cpuvendor; | ||
| 51 | ), | ||
| 52 | |||
| 53 | TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, ADDR/MISC: %016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x", | ||
| 54 | __entry->cpu, | ||
| 55 | __entry->mcgcap, __entry->mcgstatus, | ||
| 56 | __entry->bank, __entry->status, | ||
| 57 | __entry->addr, __entry->misc, | ||
| 58 | __entry->cs, __entry->ip, | ||
| 59 | __entry->tsc, | ||
| 60 | __entry->cpuvendor, __entry->cpuid, | ||
| 61 | __entry->walltime, | ||
| 62 | __entry->socketid, | ||
| 63 | __entry->apicid) | ||
| 64 | ); | ||
| 65 | |||
| 66 | #endif /* _TRACE_MCE_H */ | ||
| 67 | |||
| 68 | /* This part must be outside protection */ | ||
| 69 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index 84160fb18478..4b0f48ba16a6 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h | |||
| @@ -51,7 +51,7 @@ TRACE_EVENT(module_free, | |||
| 51 | TP_printk("%s", __get_str(name)) | 51 | TP_printk("%s", __get_str(name)) |
| 52 | ); | 52 | ); |
| 53 | 53 | ||
| 54 | TRACE_EVENT(module_get, | 54 | DECLARE_EVENT_CLASS(module_refcnt, |
| 55 | 55 | ||
| 56 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | 56 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
| 57 | 57 | ||
| @@ -73,26 +73,18 @@ TRACE_EVENT(module_get, | |||
| 73 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | 73 | __get_str(name), (void *)__entry->ip, __entry->refcnt) |
| 74 | ); | 74 | ); |
| 75 | 75 | ||
| 76 | TRACE_EVENT(module_put, | 76 | DEFINE_EVENT(module_refcnt, module_get, |
| 77 | 77 | ||
| 78 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), | 78 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
| 79 | 79 | ||
| 80 | TP_ARGS(mod, ip, refcnt), | 80 | TP_ARGS(mod, ip, refcnt) |
| 81 | ); | ||
| 81 | 82 | ||
| 82 | TP_STRUCT__entry( | 83 | DEFINE_EVENT(module_refcnt, module_put, |
| 83 | __field( unsigned long, ip ) | ||
| 84 | __field( int, refcnt ) | ||
| 85 | __string( name, mod->name ) | ||
| 86 | ), | ||
| 87 | 84 | ||
| 88 | TP_fast_assign( | 85 | TP_PROTO(struct module *mod, unsigned long ip, int refcnt), |
| 89 | __entry->ip = ip; | ||
| 90 | __entry->refcnt = refcnt; | ||
| 91 | __assign_str(name, mod->name); | ||
| 92 | ), | ||
| 93 | 86 | ||
| 94 | TP_printk("%s call_site=%pf refcnt=%d", | 87 | TP_ARGS(mod, ip, refcnt) |
| 95 | __get_str(name), (void *)__entry->ip, __entry->refcnt) | ||
| 96 | ); | 88 | ); |
| 97 | 89 | ||
| 98 | TRACE_EVENT(module_request, | 90 | TRACE_EVENT(module_request, |
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index ea6d579261ad..c4efe9b8280d 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
| @@ -16,9 +16,7 @@ enum { | |||
| 16 | }; | 16 | }; |
| 17 | #endif | 17 | #endif |
| 18 | 18 | ||
| 19 | 19 | DECLARE_EVENT_CLASS(power, | |
| 20 | |||
| 21 | TRACE_EVENT(power_start, | ||
| 22 | 20 | ||
| 23 | TP_PROTO(unsigned int type, unsigned int state), | 21 | TP_PROTO(unsigned int type, unsigned int state), |
| 24 | 22 | ||
| @@ -37,42 +35,36 @@ TRACE_EVENT(power_start, | |||
| 37 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) | 35 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) |
| 38 | ); | 36 | ); |
| 39 | 37 | ||
| 40 | TRACE_EVENT(power_end, | 38 | DEFINE_EVENT(power, power_start, |
| 41 | |||
| 42 | TP_PROTO(int dummy), | ||
| 43 | 39 | ||
| 44 | TP_ARGS(dummy), | 40 | TP_PROTO(unsigned int type, unsigned int state), |
| 45 | 41 | ||
| 46 | TP_STRUCT__entry( | 42 | TP_ARGS(type, state) |
| 47 | __field( u64, dummy ) | 43 | ); |
| 48 | ), | ||
| 49 | 44 | ||
| 50 | TP_fast_assign( | 45 | DEFINE_EVENT(power, power_frequency, |
| 51 | __entry->dummy = 0xffff; | ||
| 52 | ), | ||
| 53 | 46 | ||
| 54 | TP_printk("dummy=%lu", (unsigned long)__entry->dummy) | 47 | TP_PROTO(unsigned int type, unsigned int state), |
| 55 | 48 | ||
| 49 | TP_ARGS(type, state) | ||
| 56 | ); | 50 | ); |
| 57 | 51 | ||
| 52 | TRACE_EVENT(power_end, | ||
| 58 | 53 | ||
| 59 | TRACE_EVENT(power_frequency, | 54 | TP_PROTO(int dummy), |
| 60 | |||
| 61 | TP_PROTO(unsigned int type, unsigned int state), | ||
| 62 | 55 | ||
| 63 | TP_ARGS(type, state), | 56 | TP_ARGS(dummy), |
| 64 | 57 | ||
| 65 | TP_STRUCT__entry( | 58 | TP_STRUCT__entry( |
| 66 | __field( u64, type ) | 59 | __field( u64, dummy ) |
| 67 | __field( u64, state ) | ||
| 68 | ), | 60 | ), |
| 69 | 61 | ||
| 70 | TP_fast_assign( | 62 | TP_fast_assign( |
| 71 | __entry->type = type; | 63 | __entry->dummy = 0xffff; |
| 72 | __entry->state = state; | ||
| 73 | ), | 64 | ), |
| 74 | 65 | ||
| 75 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long) __entry->state) | 66 | TP_printk("dummy=%lu", (unsigned long)__entry->dummy) |
| 67 | |||
| 76 | ); | 68 | ); |
| 77 | 69 | ||
| 78 | #endif /* _TRACE_POWER_H */ | 70 | #endif /* _TRACE_POWER_H */ |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 4069c43f4187..cfceb0b73e20 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
| @@ -26,7 +26,7 @@ TRACE_EVENT(sched_kthread_stop, | |||
| 26 | __entry->pid = t->pid; | 26 | __entry->pid = t->pid; |
| 27 | ), | 27 | ), |
| 28 | 28 | ||
| 29 | TP_printk("task %s:%d", __entry->comm, __entry->pid) | 29 | TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) |
| 30 | ); | 30 | ); |
| 31 | 31 | ||
| 32 | /* | 32 | /* |
| @@ -46,7 +46,7 @@ TRACE_EVENT(sched_kthread_stop_ret, | |||
| 46 | __entry->ret = ret; | 46 | __entry->ret = ret; |
| 47 | ), | 47 | ), |
| 48 | 48 | ||
| 49 | TP_printk("ret %d", __entry->ret) | 49 | TP_printk("ret=%d", __entry->ret) |
| 50 | ); | 50 | ); |
| 51 | 51 | ||
| 52 | /* | 52 | /* |
| @@ -73,7 +73,7 @@ TRACE_EVENT(sched_wait_task, | |||
| 73 | __entry->prio = p->prio; | 73 | __entry->prio = p->prio; |
| 74 | ), | 74 | ), |
| 75 | 75 | ||
| 76 | TP_printk("task %s:%d [%d]", | 76 | TP_printk("comm=%s pid=%d prio=%d", |
| 77 | __entry->comm, __entry->pid, __entry->prio) | 77 | __entry->comm, __entry->pid, __entry->prio) |
| 78 | ); | 78 | ); |
| 79 | 79 | ||
| @@ -83,7 +83,7 @@ TRACE_EVENT(sched_wait_task, | |||
| 83 | * (NOTE: the 'rq' argument is not used by generic trace events, | 83 | * (NOTE: the 'rq' argument is not used by generic trace events, |
| 84 | * but used by the latency tracer plugin. ) | 84 | * but used by the latency tracer plugin. ) |
| 85 | */ | 85 | */ |
| 86 | TRACE_EVENT(sched_wakeup, | 86 | DECLARE_EVENT_CLASS(sched_wakeup_template, |
| 87 | 87 | ||
| 88 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | 88 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), |
| 89 | 89 | ||
| @@ -94,7 +94,7 @@ TRACE_EVENT(sched_wakeup, | |||
| 94 | __field( pid_t, pid ) | 94 | __field( pid_t, pid ) |
| 95 | __field( int, prio ) | 95 | __field( int, prio ) |
| 96 | __field( int, success ) | 96 | __field( int, success ) |
| 97 | __field( int, cpu ) | 97 | __field( int, target_cpu ) |
| 98 | ), | 98 | ), |
| 99 | 99 | ||
| 100 | TP_fast_assign( | 100 | TP_fast_assign( |
| @@ -102,46 +102,27 @@ TRACE_EVENT(sched_wakeup, | |||
| 102 | __entry->pid = p->pid; | 102 | __entry->pid = p->pid; |
| 103 | __entry->prio = p->prio; | 103 | __entry->prio = p->prio; |
| 104 | __entry->success = success; | 104 | __entry->success = success; |
| 105 | __entry->cpu = task_cpu(p); | 105 | __entry->target_cpu = task_cpu(p); |
| 106 | ), | 106 | ), |
| 107 | 107 | ||
| 108 | TP_printk("task %s:%d [%d] success=%d [%03d]", | 108 | TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", |
| 109 | __entry->comm, __entry->pid, __entry->prio, | 109 | __entry->comm, __entry->pid, __entry->prio, |
| 110 | __entry->success, __entry->cpu) | 110 | __entry->success, __entry->target_cpu) |
| 111 | ); | 111 | ); |
| 112 | 112 | ||
| 113 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup, | ||
| 114 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | ||
| 115 | TP_ARGS(rq, p, success)); | ||
| 116 | |||
| 113 | /* | 117 | /* |
| 114 | * Tracepoint for waking up a new task: | 118 | * Tracepoint for waking up a new task: |
| 115 | * | 119 | * |
| 116 | * (NOTE: the 'rq' argument is not used by generic trace events, | 120 | * (NOTE: the 'rq' argument is not used by generic trace events, |
| 117 | * but used by the latency tracer plugin. ) | 121 | * but used by the latency tracer plugin. ) |
| 118 | */ | 122 | */ |
| 119 | TRACE_EVENT(sched_wakeup_new, | 123 | DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new, |
| 120 | 124 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | |
| 121 | TP_PROTO(struct rq *rq, struct task_struct *p, int success), | 125 | TP_ARGS(rq, p, success)); |
| 122 | |||
| 123 | TP_ARGS(rq, p, success), | ||
| 124 | |||
| 125 | TP_STRUCT__entry( | ||
| 126 | __array( char, comm, TASK_COMM_LEN ) | ||
| 127 | __field( pid_t, pid ) | ||
| 128 | __field( int, prio ) | ||
| 129 | __field( int, success ) | ||
| 130 | __field( int, cpu ) | ||
| 131 | ), | ||
| 132 | |||
| 133 | TP_fast_assign( | ||
| 134 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); | ||
| 135 | __entry->pid = p->pid; | ||
| 136 | __entry->prio = p->prio; | ||
| 137 | __entry->success = success; | ||
| 138 | __entry->cpu = task_cpu(p); | ||
| 139 | ), | ||
| 140 | |||
| 141 | TP_printk("task %s:%d [%d] success=%d [%03d]", | ||
| 142 | __entry->comm, __entry->pid, __entry->prio, | ||
| 143 | __entry->success, __entry->cpu) | ||
| 144 | ); | ||
| 145 | 126 | ||
| 146 | /* | 127 | /* |
| 147 | * Tracepoint for task switches, performed by the scheduler: | 128 | * Tracepoint for task switches, performed by the scheduler: |
| @@ -176,7 +157,7 @@ TRACE_EVENT(sched_switch, | |||
| 176 | __entry->next_prio = next->prio; | 157 | __entry->next_prio = next->prio; |
| 177 | ), | 158 | ), |
| 178 | 159 | ||
| 179 | TP_printk("task %s:%d [%d] (%s) ==> %s:%d [%d]", | 160 | TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d", |
| 180 | __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, | 161 | __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, |
| 181 | __entry->prev_state ? | 162 | __entry->prev_state ? |
| 182 | __print_flags(__entry->prev_state, "|", | 163 | __print_flags(__entry->prev_state, "|", |
| @@ -211,15 +192,12 @@ TRACE_EVENT(sched_migrate_task, | |||
| 211 | __entry->dest_cpu = dest_cpu; | 192 | __entry->dest_cpu = dest_cpu; |
| 212 | ), | 193 | ), |
| 213 | 194 | ||
| 214 | TP_printk("task %s:%d [%d] from: %d to: %d", | 195 | TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d", |
| 215 | __entry->comm, __entry->pid, __entry->prio, | 196 | __entry->comm, __entry->pid, __entry->prio, |
| 216 | __entry->orig_cpu, __entry->dest_cpu) | 197 | __entry->orig_cpu, __entry->dest_cpu) |
| 217 | ); | 198 | ); |
| 218 | 199 | ||
| 219 | /* | 200 | DECLARE_EVENT_CLASS(sched_process_template, |
| 220 | * Tracepoint for freeing a task: | ||
| 221 | */ | ||
| 222 | TRACE_EVENT(sched_process_free, | ||
| 223 | 201 | ||
| 224 | TP_PROTO(struct task_struct *p), | 202 | TP_PROTO(struct task_struct *p), |
| 225 | 203 | ||
| @@ -237,34 +215,24 @@ TRACE_EVENT(sched_process_free, | |||
| 237 | __entry->prio = p->prio; | 215 | __entry->prio = p->prio; |
| 238 | ), | 216 | ), |
| 239 | 217 | ||
| 240 | TP_printk("task %s:%d [%d]", | 218 | TP_printk("comm=%s pid=%d prio=%d", |
| 241 | __entry->comm, __entry->pid, __entry->prio) | 219 | __entry->comm, __entry->pid, __entry->prio) |
| 242 | ); | 220 | ); |
| 243 | 221 | ||
| 244 | /* | 222 | /* |
| 245 | * Tracepoint for a task exiting: | 223 | * Tracepoint for freeing a task: |
| 246 | */ | 224 | */ |
| 247 | TRACE_EVENT(sched_process_exit, | 225 | DEFINE_EVENT(sched_process_template, sched_process_free, |
| 226 | TP_PROTO(struct task_struct *p), | ||
| 227 | TP_ARGS(p)); | ||
| 228 | |||
| 248 | 229 | ||
| 249 | TP_PROTO(struct task_struct *p), | 230 | /* |
| 250 | 231 | * Tracepoint for a task exiting: | |
| 251 | TP_ARGS(p), | 232 | */ |
| 252 | 233 | DEFINE_EVENT(sched_process_template, sched_process_exit, | |
| 253 | TP_STRUCT__entry( | 234 | TP_PROTO(struct task_struct *p), |
| 254 | __array( char, comm, TASK_COMM_LEN ) | 235 | TP_ARGS(p)); |
| 255 | __field( pid_t, pid ) | ||
| 256 | __field( int, prio ) | ||
| 257 | ), | ||
| 258 | |||
| 259 | TP_fast_assign( | ||
| 260 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); | ||
| 261 | __entry->pid = p->pid; | ||
| 262 | __entry->prio = p->prio; | ||
| 263 | ), | ||
| 264 | |||
| 265 | TP_printk("task %s:%d [%d]", | ||
| 266 | __entry->comm, __entry->pid, __entry->prio) | ||
| 267 | ); | ||
| 268 | 236 | ||
| 269 | /* | 237 | /* |
| 270 | * Tracepoint for a waiting task: | 238 | * Tracepoint for a waiting task: |
| @@ -287,7 +255,7 @@ TRACE_EVENT(sched_process_wait, | |||
| 287 | __entry->prio = current->prio; | 255 | __entry->prio = current->prio; |
| 288 | ), | 256 | ), |
| 289 | 257 | ||
| 290 | TP_printk("task %s:%d [%d]", | 258 | TP_printk("comm=%s pid=%d prio=%d", |
| 291 | __entry->comm, __entry->pid, __entry->prio) | 259 | __entry->comm, __entry->pid, __entry->prio) |
| 292 | ); | 260 | ); |
| 293 | 261 | ||
| @@ -314,46 +282,16 @@ TRACE_EVENT(sched_process_fork, | |||
| 314 | __entry->child_pid = child->pid; | 282 | __entry->child_pid = child->pid; |
| 315 | ), | 283 | ), |
| 316 | 284 | ||
| 317 | TP_printk("parent %s:%d child %s:%d", | 285 | TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d", |
| 318 | __entry->parent_comm, __entry->parent_pid, | 286 | __entry->parent_comm, __entry->parent_pid, |
| 319 | __entry->child_comm, __entry->child_pid) | 287 | __entry->child_comm, __entry->child_pid) |
| 320 | ); | 288 | ); |
| 321 | 289 | ||
| 322 | /* | 290 | /* |
| 323 | * Tracepoint for sending a signal: | ||
| 324 | */ | ||
| 325 | TRACE_EVENT(sched_signal_send, | ||
| 326 | |||
| 327 | TP_PROTO(int sig, struct task_struct *p), | ||
| 328 | |||
| 329 | TP_ARGS(sig, p), | ||
| 330 | |||
| 331 | TP_STRUCT__entry( | ||
| 332 | __field( int, sig ) | ||
| 333 | __array( char, comm, TASK_COMM_LEN ) | ||
| 334 | __field( pid_t, pid ) | ||
| 335 | ), | ||
| 336 | |||
| 337 | TP_fast_assign( | ||
| 338 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); | ||
| 339 | __entry->pid = p->pid; | ||
| 340 | __entry->sig = sig; | ||
| 341 | ), | ||
| 342 | |||
| 343 | TP_printk("sig: %d task %s:%d", | ||
| 344 | __entry->sig, __entry->comm, __entry->pid) | ||
| 345 | ); | ||
| 346 | |||
| 347 | /* | ||
| 348 | * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE | 291 | * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE |
| 349 | * adding sched_stat support to SCHED_FIFO/RR would be welcome. | 292 | * adding sched_stat support to SCHED_FIFO/RR would be welcome. |
| 350 | */ | 293 | */ |
| 351 | 294 | DECLARE_EVENT_CLASS(sched_stat_template, | |
| 352 | /* | ||
| 353 | * Tracepoint for accounting wait time (time the task is runnable | ||
| 354 | * but not actually running due to scheduler contention). | ||
| 355 | */ | ||
| 356 | TRACE_EVENT(sched_stat_wait, | ||
| 357 | 295 | ||
| 358 | TP_PROTO(struct task_struct *tsk, u64 delay), | 296 | TP_PROTO(struct task_struct *tsk, u64 delay), |
| 359 | 297 | ||
| @@ -374,11 +312,36 @@ TRACE_EVENT(sched_stat_wait, | |||
| 374 | __perf_count(delay); | 312 | __perf_count(delay); |
| 375 | ), | 313 | ), |
| 376 | 314 | ||
| 377 | TP_printk("task: %s:%d wait: %Lu [ns]", | 315 | TP_printk("comm=%s pid=%d delay=%Lu [ns]", |
| 378 | __entry->comm, __entry->pid, | 316 | __entry->comm, __entry->pid, |
| 379 | (unsigned long long)__entry->delay) | 317 | (unsigned long long)__entry->delay) |
| 380 | ); | 318 | ); |
| 381 | 319 | ||
| 320 | |||
| 321 | /* | ||
| 322 | * Tracepoint for accounting wait time (time the task is runnable | ||
| 323 | * but not actually running due to scheduler contention). | ||
| 324 | */ | ||
| 325 | DEFINE_EVENT(sched_stat_template, sched_stat_wait, | ||
| 326 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 327 | TP_ARGS(tsk, delay)); | ||
| 328 | |||
| 329 | /* | ||
| 330 | * Tracepoint for accounting sleep time (time the task is not runnable, | ||
| 331 | * including iowait, see below). | ||
| 332 | */ | ||
| 333 | DEFINE_EVENT(sched_stat_template, sched_stat_sleep, | ||
| 334 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 335 | TP_ARGS(tsk, delay)); | ||
| 336 | |||
| 337 | /* | ||
| 338 | * Tracepoint for accounting iowait time (time the task is not runnable | ||
| 339 | * due to waiting on IO to complete). | ||
| 340 | */ | ||
| 341 | DEFINE_EVENT(sched_stat_template, sched_stat_iowait, | ||
| 342 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 343 | TP_ARGS(tsk, delay)); | ||
| 344 | |||
| 382 | /* | 345 | /* |
| 383 | * Tracepoint for accounting runtime (time the task is executing | 346 | * Tracepoint for accounting runtime (time the task is executing |
| 384 | * on a CPU). | 347 | * on a CPU). |
| @@ -406,72 +369,12 @@ TRACE_EVENT(sched_stat_runtime, | |||
| 406 | __perf_count(runtime); | 369 | __perf_count(runtime); |
| 407 | ), | 370 | ), |
| 408 | 371 | ||
| 409 | TP_printk("task: %s:%d runtime: %Lu [ns], vruntime: %Lu [ns]", | 372 | TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]", |
| 410 | __entry->comm, __entry->pid, | 373 | __entry->comm, __entry->pid, |
| 411 | (unsigned long long)__entry->runtime, | 374 | (unsigned long long)__entry->runtime, |
| 412 | (unsigned long long)__entry->vruntime) | 375 | (unsigned long long)__entry->vruntime) |
| 413 | ); | 376 | ); |
| 414 | 377 | ||
| 415 | /* | ||
| 416 | * Tracepoint for accounting sleep time (time the task is not runnable, | ||
| 417 | * including iowait, see below). | ||
| 418 | */ | ||
| 419 | TRACE_EVENT(sched_stat_sleep, | ||
| 420 | |||
| 421 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 422 | |||
| 423 | TP_ARGS(tsk, delay), | ||
| 424 | |||
| 425 | TP_STRUCT__entry( | ||
| 426 | __array( char, comm, TASK_COMM_LEN ) | ||
| 427 | __field( pid_t, pid ) | ||
| 428 | __field( u64, delay ) | ||
| 429 | ), | ||
| 430 | |||
| 431 | TP_fast_assign( | ||
| 432 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
| 433 | __entry->pid = tsk->pid; | ||
| 434 | __entry->delay = delay; | ||
| 435 | ) | ||
| 436 | TP_perf_assign( | ||
| 437 | __perf_count(delay); | ||
| 438 | ), | ||
| 439 | |||
| 440 | TP_printk("task: %s:%d sleep: %Lu [ns]", | ||
| 441 | __entry->comm, __entry->pid, | ||
| 442 | (unsigned long long)__entry->delay) | ||
| 443 | ); | ||
| 444 | |||
| 445 | /* | ||
| 446 | * Tracepoint for accounting iowait time (time the task is not runnable | ||
| 447 | * due to waiting on IO to complete). | ||
| 448 | */ | ||
| 449 | TRACE_EVENT(sched_stat_iowait, | ||
| 450 | |||
| 451 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
| 452 | |||
| 453 | TP_ARGS(tsk, delay), | ||
| 454 | |||
| 455 | TP_STRUCT__entry( | ||
| 456 | __array( char, comm, TASK_COMM_LEN ) | ||
| 457 | __field( pid_t, pid ) | ||
| 458 | __field( u64, delay ) | ||
| 459 | ), | ||
| 460 | |||
| 461 | TP_fast_assign( | ||
| 462 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
| 463 | __entry->pid = tsk->pid; | ||
| 464 | __entry->delay = delay; | ||
| 465 | ) | ||
| 466 | TP_perf_assign( | ||
| 467 | __perf_count(delay); | ||
| 468 | ), | ||
| 469 | |||
| 470 | TP_printk("task: %s:%d iowait: %Lu [ns]", | ||
| 471 | __entry->comm, __entry->pid, | ||
| 472 | (unsigned long long)__entry->delay) | ||
| 473 | ); | ||
| 474 | |||
| 475 | #endif /* _TRACE_SCHED_H */ | 378 | #endif /* _TRACE_SCHED_H */ |
| 476 | 379 | ||
| 477 | /* This part must be outside protection */ | 380 | /* This part must be outside protection */ |
diff --git a/include/trace/events/signal.h b/include/trace/events/signal.h new file mode 100644 index 000000000000..a510b75ac304 --- /dev/null +++ b/include/trace/events/signal.h | |||
| @@ -0,0 +1,173 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM signal | ||
| 3 | |||
| 4 | #if !defined(_TRACE_SIGNAL_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_SIGNAL_H | ||
| 6 | |||
| 7 | #include <linux/signal.h> | ||
| 8 | #include <linux/sched.h> | ||
| 9 | #include <linux/tracepoint.h> | ||
| 10 | |||
| 11 | #define TP_STORE_SIGINFO(__entry, info) \ | ||
| 12 | do { \ | ||
| 13 | if (info == SEND_SIG_NOINFO) { \ | ||
| 14 | __entry->errno = 0; \ | ||
| 15 | __entry->code = SI_USER; \ | ||
| 16 | } else if (info == SEND_SIG_PRIV) { \ | ||
| 17 | __entry->errno = 0; \ | ||
| 18 | __entry->code = SI_KERNEL; \ | ||
| 19 | } else { \ | ||
| 20 | __entry->errno = info->si_errno; \ | ||
| 21 | __entry->code = info->si_code; \ | ||
| 22 | } \ | ||
| 23 | } while (0) | ||
| 24 | |||
| 25 | /** | ||
| 26 | * signal_generate - called when a signal is generated | ||
| 27 | * @sig: signal number | ||
| 28 | * @info: pointer to struct siginfo | ||
| 29 | * @task: pointer to struct task_struct | ||
| 30 | * | ||
| 31 | * Current process sends a 'sig' signal to 'task' process with | ||
| 32 | * 'info' siginfo. If 'info' is SEND_SIG_NOINFO or SEND_SIG_PRIV, | ||
| 33 | * 'info' is not a pointer and you can't access its field. Instead, | ||
| 34 | * SEND_SIG_NOINFO means that si_code is SI_USER, and SEND_SIG_PRIV | ||
| 35 | * means that si_code is SI_KERNEL. | ||
| 36 | */ | ||
| 37 | TRACE_EVENT(signal_generate, | ||
| 38 | |||
| 39 | TP_PROTO(int sig, struct siginfo *info, struct task_struct *task), | ||
| 40 | |||
| 41 | TP_ARGS(sig, info, task), | ||
| 42 | |||
| 43 | TP_STRUCT__entry( | ||
| 44 | __field( int, sig ) | ||
| 45 | __field( int, errno ) | ||
| 46 | __field( int, code ) | ||
| 47 | __array( char, comm, TASK_COMM_LEN ) | ||
| 48 | __field( pid_t, pid ) | ||
| 49 | ), | ||
| 50 | |||
| 51 | TP_fast_assign( | ||
| 52 | __entry->sig = sig; | ||
| 53 | TP_STORE_SIGINFO(__entry, info); | ||
| 54 | memcpy(__entry->comm, task->comm, TASK_COMM_LEN); | ||
| 55 | __entry->pid = task->pid; | ||
| 56 | ), | ||
| 57 | |||
| 58 | TP_printk("sig=%d errno=%d code=%d comm=%s pid=%d", | ||
| 59 | __entry->sig, __entry->errno, __entry->code, | ||
| 60 | __entry->comm, __entry->pid) | ||
| 61 | ); | ||
| 62 | |||
| 63 | /** | ||
| 64 | * signal_deliver - called when a signal is delivered | ||
| 65 | * @sig: signal number | ||
| 66 | * @info: pointer to struct siginfo | ||
| 67 | * @ka: pointer to struct k_sigaction | ||
| 68 | * | ||
| 69 | * A 'sig' signal is delivered to current process with 'info' siginfo, | ||
| 70 | * and it will be handled by 'ka'. ka->sa.sa_handler can be SIG_IGN or | ||
| 71 | * SIG_DFL. | ||
| 72 | * Note that some signals reported by signal_generate tracepoint can be | ||
| 73 | * lost, ignored or modified (by debugger) before hitting this tracepoint. | ||
| 74 | * This means, this can show which signals are actually delivered, but | ||
| 75 | * matching generated signals and delivered signals may not be correct. | ||
| 76 | */ | ||
| 77 | TRACE_EVENT(signal_deliver, | ||
| 78 | |||
| 79 | TP_PROTO(int sig, struct siginfo *info, struct k_sigaction *ka), | ||
| 80 | |||
| 81 | TP_ARGS(sig, info, ka), | ||
| 82 | |||
| 83 | TP_STRUCT__entry( | ||
| 84 | __field( int, sig ) | ||
| 85 | __field( int, errno ) | ||
| 86 | __field( int, code ) | ||
| 87 | __field( unsigned long, sa_handler ) | ||
| 88 | __field( unsigned long, sa_flags ) | ||
| 89 | ), | ||
| 90 | |||
| 91 | TP_fast_assign( | ||
| 92 | __entry->sig = sig; | ||
| 93 | TP_STORE_SIGINFO(__entry, info); | ||
| 94 | __entry->sa_handler = (unsigned long)ka->sa.sa_handler; | ||
| 95 | __entry->sa_flags = ka->sa.sa_flags; | ||
| 96 | ), | ||
| 97 | |||
| 98 | TP_printk("sig=%d errno=%d code=%d sa_handler=%lx sa_flags=%lx", | ||
| 99 | __entry->sig, __entry->errno, __entry->code, | ||
| 100 | __entry->sa_handler, __entry->sa_flags) | ||
| 101 | ); | ||
| 102 | |||
| 103 | /** | ||
| 104 | * signal_overflow_fail - called when signal queue is overflow | ||
| 105 | * @sig: signal number | ||
| 106 | * @group: signal to process group or not (bool) | ||
| 107 | * @info: pointer to struct siginfo | ||
| 108 | * | ||
| 109 | * Kernel fails to generate 'sig' signal with 'info' siginfo, because | ||
| 110 | * siginfo queue is overflow, and the signal is dropped. | ||
| 111 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 112 | * 'sig' is always one of RT signals. | ||
| 113 | */ | ||
| 114 | TRACE_EVENT(signal_overflow_fail, | ||
| 115 | |||
| 116 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 117 | |||
| 118 | TP_ARGS(sig, group, info), | ||
| 119 | |||
| 120 | TP_STRUCT__entry( | ||
| 121 | __field( int, sig ) | ||
| 122 | __field( int, group ) | ||
| 123 | __field( int, errno ) | ||
| 124 | __field( int, code ) | ||
| 125 | ), | ||
| 126 | |||
| 127 | TP_fast_assign( | ||
| 128 | __entry->sig = sig; | ||
| 129 | __entry->group = group; | ||
| 130 | TP_STORE_SIGINFO(__entry, info); | ||
| 131 | ), | ||
| 132 | |||
| 133 | TP_printk("sig=%d group=%d errno=%d code=%d", | ||
| 134 | __entry->sig, __entry->group, __entry->errno, __entry->code) | ||
| 135 | ); | ||
| 136 | |||
| 137 | /** | ||
| 138 | * signal_lose_info - called when siginfo is lost | ||
| 139 | * @sig: signal number | ||
| 140 | * @group: signal to process group or not (bool) | ||
| 141 | * @info: pointer to struct siginfo | ||
| 142 | * | ||
| 143 | * Kernel generates 'sig' signal but loses 'info' siginfo, because siginfo | ||
| 144 | * queue is overflow. | ||
| 145 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 146 | * 'sig' is always one of non-RT signals. | ||
| 147 | */ | ||
| 148 | TRACE_EVENT(signal_lose_info, | ||
| 149 | |||
| 150 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 151 | |||
| 152 | TP_ARGS(sig, group, info), | ||
| 153 | |||
| 154 | TP_STRUCT__entry( | ||
| 155 | __field( int, sig ) | ||
| 156 | __field( int, group ) | ||
| 157 | __field( int, errno ) | ||
| 158 | __field( int, code ) | ||
| 159 | ), | ||
| 160 | |||
| 161 | TP_fast_assign( | ||
| 162 | __entry->sig = sig; | ||
| 163 | __entry->group = group; | ||
| 164 | TP_STORE_SIGINFO(__entry, info); | ||
| 165 | ), | ||
| 166 | |||
| 167 | TP_printk("sig=%d group=%d errno=%d code=%d", | ||
| 168 | __entry->sig, __entry->group, __entry->errno, __entry->code) | ||
| 169 | ); | ||
| 170 | #endif /* _TRACE_SIGNAL_H */ | ||
| 171 | |||
| 172 | /* This part must be outside protection */ | ||
| 173 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h index 397dff2dbd5a..fb726ac7caee 100644 --- a/include/trace/events/syscalls.h +++ b/include/trace/events/syscalls.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM syscalls | 2 | #define TRACE_SYSTEM raw_syscalls |
| 3 | #define TRACE_INCLUDE_FILE syscalls | ||
| 3 | 4 | ||
| 4 | #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ) | 5 | #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_EVENTS_SYSCALLS_H | 6 | #define _TRACE_EVENTS_SYSCALLS_H |
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 1844c48d640e..e5ce87a0498d 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h | |||
| @@ -26,7 +26,7 @@ TRACE_EVENT(timer_init, | |||
| 26 | __entry->timer = timer; | 26 | __entry->timer = timer; |
| 27 | ), | 27 | ), |
| 28 | 28 | ||
| 29 | TP_printk("timer %p", __entry->timer) | 29 | TP_printk("timer=%p", __entry->timer) |
| 30 | ); | 30 | ); |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| @@ -54,7 +54,7 @@ TRACE_EVENT(timer_start, | |||
| 54 | __entry->now = jiffies; | 54 | __entry->now = jiffies; |
| 55 | ), | 55 | ), |
| 56 | 56 | ||
| 57 | TP_printk("timer %p: func %pf, expires %lu, timeout %ld", | 57 | TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld]", |
| 58 | __entry->timer, __entry->function, __entry->expires, | 58 | __entry->timer, __entry->function, __entry->expires, |
| 59 | (long)__entry->expires - __entry->now) | 59 | (long)__entry->expires - __entry->now) |
| 60 | ); | 60 | ); |
| @@ -81,7 +81,7 @@ TRACE_EVENT(timer_expire_entry, | |||
| 81 | __entry->now = jiffies; | 81 | __entry->now = jiffies; |
| 82 | ), | 82 | ), |
| 83 | 83 | ||
| 84 | TP_printk("timer %p: now %lu", __entry->timer, __entry->now) | 84 | TP_printk("timer=%p now=%lu", __entry->timer, __entry->now) |
| 85 | ); | 85 | ); |
| 86 | 86 | ||
| 87 | /** | 87 | /** |
| @@ -108,7 +108,7 @@ TRACE_EVENT(timer_expire_exit, | |||
| 108 | __entry->timer = timer; | 108 | __entry->timer = timer; |
| 109 | ), | 109 | ), |
| 110 | 110 | ||
| 111 | TP_printk("timer %p", __entry->timer) | 111 | TP_printk("timer=%p", __entry->timer) |
| 112 | ); | 112 | ); |
| 113 | 113 | ||
| 114 | /** | 114 | /** |
| @@ -129,7 +129,7 @@ TRACE_EVENT(timer_cancel, | |||
| 129 | __entry->timer = timer; | 129 | __entry->timer = timer; |
| 130 | ), | 130 | ), |
| 131 | 131 | ||
| 132 | TP_printk("timer %p", __entry->timer) | 132 | TP_printk("timer=%p", __entry->timer) |
| 133 | ); | 133 | ); |
| 134 | 134 | ||
| 135 | /** | 135 | /** |
| @@ -140,24 +140,24 @@ TRACE_EVENT(timer_cancel, | |||
| 140 | */ | 140 | */ |
| 141 | TRACE_EVENT(hrtimer_init, | 141 | TRACE_EVENT(hrtimer_init, |
| 142 | 142 | ||
| 143 | TP_PROTO(struct hrtimer *timer, clockid_t clockid, | 143 | TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid, |
| 144 | enum hrtimer_mode mode), | 144 | enum hrtimer_mode mode), |
| 145 | 145 | ||
| 146 | TP_ARGS(timer, clockid, mode), | 146 | TP_ARGS(hrtimer, clockid, mode), |
| 147 | 147 | ||
| 148 | TP_STRUCT__entry( | 148 | TP_STRUCT__entry( |
| 149 | __field( void *, timer ) | 149 | __field( void *, hrtimer ) |
| 150 | __field( clockid_t, clockid ) | 150 | __field( clockid_t, clockid ) |
| 151 | __field( enum hrtimer_mode, mode ) | 151 | __field( enum hrtimer_mode, mode ) |
| 152 | ), | 152 | ), |
| 153 | 153 | ||
| 154 | TP_fast_assign( | 154 | TP_fast_assign( |
| 155 | __entry->timer = timer; | 155 | __entry->hrtimer = hrtimer; |
| 156 | __entry->clockid = clockid; | 156 | __entry->clockid = clockid; |
| 157 | __entry->mode = mode; | 157 | __entry->mode = mode; |
| 158 | ), | 158 | ), |
| 159 | 159 | ||
| 160 | TP_printk("hrtimer %p, clockid %s, mode %s", __entry->timer, | 160 | TP_printk("hrtimer=%p clockid=%s mode=%s", __entry->hrtimer, |
| 161 | __entry->clockid == CLOCK_REALTIME ? | 161 | __entry->clockid == CLOCK_REALTIME ? |
| 162 | "CLOCK_REALTIME" : "CLOCK_MONOTONIC", | 162 | "CLOCK_REALTIME" : "CLOCK_MONOTONIC", |
| 163 | __entry->mode == HRTIMER_MODE_ABS ? | 163 | __entry->mode == HRTIMER_MODE_ABS ? |
| @@ -170,26 +170,26 @@ TRACE_EVENT(hrtimer_init, | |||
| 170 | */ | 170 | */ |
| 171 | TRACE_EVENT(hrtimer_start, | 171 | TRACE_EVENT(hrtimer_start, |
| 172 | 172 | ||
| 173 | TP_PROTO(struct hrtimer *timer), | 173 | TP_PROTO(struct hrtimer *hrtimer), |
| 174 | 174 | ||
| 175 | TP_ARGS(timer), | 175 | TP_ARGS(hrtimer), |
| 176 | 176 | ||
| 177 | TP_STRUCT__entry( | 177 | TP_STRUCT__entry( |
| 178 | __field( void *, timer ) | 178 | __field( void *, hrtimer ) |
| 179 | __field( void *, function ) | 179 | __field( void *, function ) |
| 180 | __field( s64, expires ) | 180 | __field( s64, expires ) |
| 181 | __field( s64, softexpires ) | 181 | __field( s64, softexpires ) |
| 182 | ), | 182 | ), |
| 183 | 183 | ||
| 184 | TP_fast_assign( | 184 | TP_fast_assign( |
| 185 | __entry->timer = timer; | 185 | __entry->hrtimer = hrtimer; |
| 186 | __entry->function = timer->function; | 186 | __entry->function = hrtimer->function; |
| 187 | __entry->expires = hrtimer_get_expires(timer).tv64; | 187 | __entry->expires = hrtimer_get_expires(hrtimer).tv64; |
| 188 | __entry->softexpires = hrtimer_get_softexpires(timer).tv64; | 188 | __entry->softexpires = hrtimer_get_softexpires(hrtimer).tv64; |
| 189 | ), | 189 | ), |
| 190 | 190 | ||
| 191 | TP_printk("hrtimer %p, func %pf, expires %llu, softexpires %llu", | 191 | TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu", |
| 192 | __entry->timer, __entry->function, | 192 | __entry->hrtimer, __entry->function, |
| 193 | (unsigned long long)ktime_to_ns((ktime_t) { | 193 | (unsigned long long)ktime_to_ns((ktime_t) { |
| 194 | .tv64 = __entry->expires }), | 194 | .tv64 = __entry->expires }), |
| 195 | (unsigned long long)ktime_to_ns((ktime_t) { | 195 | (unsigned long long)ktime_to_ns((ktime_t) { |
| @@ -206,23 +206,22 @@ TRACE_EVENT(hrtimer_start, | |||
| 206 | */ | 206 | */ |
| 207 | TRACE_EVENT(hrtimer_expire_entry, | 207 | TRACE_EVENT(hrtimer_expire_entry, |
| 208 | 208 | ||
| 209 | TP_PROTO(struct hrtimer *timer, ktime_t *now), | 209 | TP_PROTO(struct hrtimer *hrtimer, ktime_t *now), |
| 210 | 210 | ||
| 211 | TP_ARGS(timer, now), | 211 | TP_ARGS(hrtimer, now), |
| 212 | 212 | ||
| 213 | TP_STRUCT__entry( | 213 | TP_STRUCT__entry( |
| 214 | __field( void *, timer ) | 214 | __field( void *, hrtimer ) |
| 215 | __field( s64, now ) | 215 | __field( s64, now ) |
| 216 | ), | 216 | ), |
| 217 | 217 | ||
| 218 | TP_fast_assign( | 218 | TP_fast_assign( |
| 219 | __entry->timer = timer; | 219 | __entry->hrtimer = hrtimer; |
| 220 | __entry->now = now->tv64; | 220 | __entry->now = now->tv64; |
| 221 | ), | 221 | ), |
| 222 | 222 | ||
| 223 | TP_printk("hrtimer %p, now %llu", __entry->timer, | 223 | TP_printk("hrtimer=%p now=%llu", __entry->hrtimer, |
| 224 | (unsigned long long)ktime_to_ns((ktime_t) { | 224 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) |
| 225 | .tv64 = __entry->now })) | ||
| 226 | ); | 225 | ); |
| 227 | 226 | ||
| 228 | /** | 227 | /** |
| @@ -234,40 +233,40 @@ TRACE_EVENT(hrtimer_expire_entry, | |||
| 234 | */ | 233 | */ |
| 235 | TRACE_EVENT(hrtimer_expire_exit, | 234 | TRACE_EVENT(hrtimer_expire_exit, |
| 236 | 235 | ||
| 237 | TP_PROTO(struct hrtimer *timer), | 236 | TP_PROTO(struct hrtimer *hrtimer), |
| 238 | 237 | ||
| 239 | TP_ARGS(timer), | 238 | TP_ARGS(hrtimer), |
| 240 | 239 | ||
| 241 | TP_STRUCT__entry( | 240 | TP_STRUCT__entry( |
| 242 | __field( void *, timer ) | 241 | __field( void *, hrtimer ) |
| 243 | ), | 242 | ), |
| 244 | 243 | ||
| 245 | TP_fast_assign( | 244 | TP_fast_assign( |
| 246 | __entry->timer = timer; | 245 | __entry->hrtimer = hrtimer; |
| 247 | ), | 246 | ), |
| 248 | 247 | ||
| 249 | TP_printk("hrtimer %p", __entry->timer) | 248 | TP_printk("hrtimer=%p", __entry->hrtimer) |
| 250 | ); | 249 | ); |
| 251 | 250 | ||
| 252 | /** | 251 | /** |
| 253 | * hrtimer_cancel - called when the hrtimer is canceled | 252 | * hrtimer_cancel - called when the hrtimer is canceled |
| 254 | * @timer: pointer to struct hrtimer | 253 | * @hrtimer: pointer to struct hrtimer |
| 255 | */ | 254 | */ |
| 256 | TRACE_EVENT(hrtimer_cancel, | 255 | TRACE_EVENT(hrtimer_cancel, |
| 257 | 256 | ||
| 258 | TP_PROTO(struct hrtimer *timer), | 257 | TP_PROTO(struct hrtimer *hrtimer), |
| 259 | 258 | ||
| 260 | TP_ARGS(timer), | 259 | TP_ARGS(hrtimer), |
| 261 | 260 | ||
| 262 | TP_STRUCT__entry( | 261 | TP_STRUCT__entry( |
| 263 | __field( void *, timer ) | 262 | __field( void *, hrtimer ) |
| 264 | ), | 263 | ), |
| 265 | 264 | ||
| 266 | TP_fast_assign( | 265 | TP_fast_assign( |
| 267 | __entry->timer = timer; | 266 | __entry->hrtimer = hrtimer; |
| 268 | ), | 267 | ), |
| 269 | 268 | ||
| 270 | TP_printk("hrtimer %p", __entry->timer) | 269 | TP_printk("hrtimer=%p", __entry->hrtimer) |
| 271 | ); | 270 | ); |
| 272 | 271 | ||
| 273 | /** | 272 | /** |
| @@ -302,7 +301,7 @@ TRACE_EVENT(itimer_state, | |||
| 302 | __entry->interval_usec = value->it_interval.tv_usec; | 301 | __entry->interval_usec = value->it_interval.tv_usec; |
| 303 | ), | 302 | ), |
| 304 | 303 | ||
| 305 | TP_printk("which %d, expires %lu, it_value %lu.%lu, it_interval %lu.%lu", | 304 | TP_printk("which=%d expires=%lu it_value=%lu.%lu it_interval=%lu.%lu", |
| 306 | __entry->which, __entry->expires, | 305 | __entry->which, __entry->expires, |
| 307 | __entry->value_sec, __entry->value_usec, | 306 | __entry->value_sec, __entry->value_usec, |
| 308 | __entry->interval_sec, __entry->interval_usec) | 307 | __entry->interval_sec, __entry->interval_usec) |
| @@ -332,7 +331,7 @@ TRACE_EVENT(itimer_expire, | |||
| 332 | __entry->pid = pid_nr(pid); | 331 | __entry->pid = pid_nr(pid); |
| 333 | ), | 332 | ), |
| 334 | 333 | ||
| 335 | TP_printk("which %d, pid %d, now %lu", __entry->which, | 334 | TP_printk("which=%d pid=%d now=%lu", __entry->which, |
| 336 | (int) __entry->pid, __entry->now) | 335 | (int) __entry->pid, __entry->now) |
| 337 | ); | 336 | ); |
| 338 | 337 | ||
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index e4612dbd7ba6..d6c974474e70 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
| 10 | 10 | ||
| 11 | TRACE_EVENT(workqueue_insertion, | 11 | DECLARE_EVENT_CLASS(workqueue, |
| 12 | 12 | ||
| 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
| 14 | 14 | ||
| @@ -30,26 +30,18 @@ TRACE_EVENT(workqueue_insertion, | |||
| 30 | __entry->thread_pid, __entry->func) | 30 | __entry->thread_pid, __entry->func) |
| 31 | ); | 31 | ); |
| 32 | 32 | ||
| 33 | TRACE_EVENT(workqueue_execution, | 33 | DEFINE_EVENT(workqueue, workqueue_insertion, |
| 34 | 34 | ||
| 35 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 35 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
| 36 | 36 | ||
| 37 | TP_ARGS(wq_thread, work), | 37 | TP_ARGS(wq_thread, work) |
| 38 | ); | ||
| 38 | 39 | ||
| 39 | TP_STRUCT__entry( | 40 | DEFINE_EVENT(workqueue, workqueue_execution, |
| 40 | __array(char, thread_comm, TASK_COMM_LEN) | ||
| 41 | __field(pid_t, thread_pid) | ||
| 42 | __field(work_func_t, func) | ||
| 43 | ), | ||
| 44 | 41 | ||
| 45 | TP_fast_assign( | 42 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
| 46 | memcpy(__entry->thread_comm, wq_thread->comm, TASK_COMM_LEN); | ||
| 47 | __entry->thread_pid = wq_thread->pid; | ||
| 48 | __entry->func = work->func; | ||
| 49 | ), | ||
| 50 | 43 | ||
| 51 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, | 44 | TP_ARGS(wq_thread, work) |
| 52 | __entry->thread_pid, __entry->func) | ||
| 53 | ); | 45 | ); |
| 54 | 46 | ||
| 55 | /* Trace the creation of one workqueue thread on a cpu */ | 47 | /* Trace the creation of one workqueue thread on a cpu */ |
