diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 6 | ||||
-rw-r--r-- | include/trace/events/kvm.h | 151 | ||||
-rw-r--r-- | include/trace/events/sched.h | 95 | ||||
-rw-r--r-- | include/trace/events/skb.h | 20 |
4 files changed, 268 insertions, 4 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 7d8b5bc74185..8d433c4e3709 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -227,7 +227,6 @@ TRACE_EVENT(ext4_da_writepages, | |||
227 | __field( char, nonblocking ) | 227 | __field( char, nonblocking ) |
228 | __field( char, for_kupdate ) | 228 | __field( char, for_kupdate ) |
229 | __field( char, for_reclaim ) | 229 | __field( char, for_reclaim ) |
230 | __field( char, for_writepages ) | ||
231 | __field( char, range_cyclic ) | 230 | __field( char, range_cyclic ) |
232 | ), | 231 | ), |
233 | 232 | ||
@@ -241,16 +240,15 @@ TRACE_EVENT(ext4_da_writepages, | |||
241 | __entry->nonblocking = wbc->nonblocking; | 240 | __entry->nonblocking = wbc->nonblocking; |
242 | __entry->for_kupdate = wbc->for_kupdate; | 241 | __entry->for_kupdate = wbc->for_kupdate; |
243 | __entry->for_reclaim = wbc->for_reclaim; | 242 | __entry->for_reclaim = wbc->for_reclaim; |
244 | __entry->for_writepages = wbc->for_writepages; | ||
245 | __entry->range_cyclic = wbc->range_cyclic; | 243 | __entry->range_cyclic = wbc->range_cyclic; |
246 | ), | 244 | ), |
247 | 245 | ||
248 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", | 246 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d", |
249 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, | 247 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, |
250 | __entry->pages_skipped, __entry->range_start, | 248 | __entry->pages_skipped, __entry->range_start, |
251 | __entry->range_end, __entry->nonblocking, | 249 | __entry->range_end, __entry->nonblocking, |
252 | __entry->for_kupdate, __entry->for_reclaim, | 250 | __entry->for_kupdate, __entry->for_reclaim, |
253 | __entry->for_writepages, __entry->range_cyclic) | 251 | __entry->range_cyclic) |
254 | ); | 252 | ); |
255 | 253 | ||
256 | TRACE_EVENT(ext4_da_writepages_result, | 254 | TRACE_EVENT(ext4_da_writepages_result, |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h new file mode 100644 index 000000000000..dbe108455275 --- /dev/null +++ b/include/trace/events/kvm.h | |||
@@ -0,0 +1,151 @@ | |||
1 | #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_KVM_MAIN_H | ||
3 | |||
4 | #include <linux/tracepoint.h> | ||
5 | |||
6 | #undef TRACE_SYSTEM | ||
7 | #define TRACE_SYSTEM kvm | ||
8 | #define TRACE_INCLUDE_FILE kvm | ||
9 | |||
10 | #if defined(__KVM_HAVE_IOAPIC) | ||
11 | TRACE_EVENT(kvm_set_irq, | ||
12 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), | ||
13 | TP_ARGS(gsi, level, irq_source_id), | ||
14 | |||
15 | TP_STRUCT__entry( | ||
16 | __field( unsigned int, gsi ) | ||
17 | __field( int, level ) | ||
18 | __field( int, irq_source_id ) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->gsi = gsi; | ||
23 | __entry->level = level; | ||
24 | __entry->irq_source_id = irq_source_id; | ||
25 | ), | ||
26 | |||
27 | TP_printk("gsi %u level %d source %d", | ||
28 | __entry->gsi, __entry->level, __entry->irq_source_id) | ||
29 | ); | ||
30 | |||
31 | #define kvm_deliver_mode \ | ||
32 | {0x0, "Fixed"}, \ | ||
33 | {0x1, "LowPrio"}, \ | ||
34 | {0x2, "SMI"}, \ | ||
35 | {0x3, "Res3"}, \ | ||
36 | {0x4, "NMI"}, \ | ||
37 | {0x5, "INIT"}, \ | ||
38 | {0x6, "SIPI"}, \ | ||
39 | {0x7, "ExtINT"} | ||
40 | |||
41 | TRACE_EVENT(kvm_ioapic_set_irq, | ||
42 | TP_PROTO(__u64 e, int pin, bool coalesced), | ||
43 | TP_ARGS(e, pin, coalesced), | ||
44 | |||
45 | TP_STRUCT__entry( | ||
46 | __field( __u64, e ) | ||
47 | __field( int, pin ) | ||
48 | __field( bool, coalesced ) | ||
49 | ), | ||
50 | |||
51 | TP_fast_assign( | ||
52 | __entry->e = e; | ||
53 | __entry->pin = pin; | ||
54 | __entry->coalesced = coalesced; | ||
55 | ), | ||
56 | |||
57 | TP_printk("pin %u dst %x vec=%u (%s|%s|%s%s)%s", | ||
58 | __entry->pin, (u8)(__entry->e >> 56), (u8)__entry->e, | ||
59 | __print_symbolic((__entry->e >> 8 & 0x7), kvm_deliver_mode), | ||
60 | (__entry->e & (1<<11)) ? "logical" : "physical", | ||
61 | (__entry->e & (1<<15)) ? "level" : "edge", | ||
62 | (__entry->e & (1<<16)) ? "|masked" : "", | ||
63 | __entry->coalesced ? " (coalesced)" : "") | ||
64 | ); | ||
65 | |||
66 | TRACE_EVENT(kvm_msi_set_irq, | ||
67 | TP_PROTO(__u64 address, __u64 data), | ||
68 | TP_ARGS(address, data), | ||
69 | |||
70 | TP_STRUCT__entry( | ||
71 | __field( __u64, address ) | ||
72 | __field( __u64, data ) | ||
73 | ), | ||
74 | |||
75 | TP_fast_assign( | ||
76 | __entry->address = address; | ||
77 | __entry->data = data; | ||
78 | ), | ||
79 | |||
80 | TP_printk("dst %u vec %x (%s|%s|%s%s)", | ||
81 | (u8)(__entry->address >> 12), (u8)__entry->data, | ||
82 | __print_symbolic((__entry->data >> 8 & 0x7), kvm_deliver_mode), | ||
83 | (__entry->address & (1<<2)) ? "logical" : "physical", | ||
84 | (__entry->data & (1<<15)) ? "level" : "edge", | ||
85 | (__entry->address & (1<<3)) ? "|rh" : "") | ||
86 | ); | ||
87 | |||
88 | #define kvm_irqchips \ | ||
89 | {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \ | ||
90 | {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \ | ||
91 | {KVM_IRQCHIP_IOAPIC, "IOAPIC"} | ||
92 | |||
93 | TRACE_EVENT(kvm_ack_irq, | ||
94 | TP_PROTO(unsigned int irqchip, unsigned int pin), | ||
95 | TP_ARGS(irqchip, pin), | ||
96 | |||
97 | TP_STRUCT__entry( | ||
98 | __field( unsigned int, irqchip ) | ||
99 | __field( unsigned int, pin ) | ||
100 | ), | ||
101 | |||
102 | TP_fast_assign( | ||
103 | __entry->irqchip = irqchip; | ||
104 | __entry->pin = pin; | ||
105 | ), | ||
106 | |||
107 | TP_printk("irqchip %s pin %u", | ||
108 | __print_symbolic(__entry->irqchip, kvm_irqchips), | ||
109 | __entry->pin) | ||
110 | ); | ||
111 | |||
112 | |||
113 | |||
114 | #endif /* defined(__KVM_HAVE_IOAPIC) */ | ||
115 | |||
116 | #define KVM_TRACE_MMIO_READ_UNSATISFIED 0 | ||
117 | #define KVM_TRACE_MMIO_READ 1 | ||
118 | #define KVM_TRACE_MMIO_WRITE 2 | ||
119 | |||
120 | #define kvm_trace_symbol_mmio \ | ||
121 | { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \ | ||
122 | { KVM_TRACE_MMIO_READ, "read" }, \ | ||
123 | { KVM_TRACE_MMIO_WRITE, "write" } | ||
124 | |||
125 | TRACE_EVENT(kvm_mmio, | ||
126 | TP_PROTO(int type, int len, u64 gpa, u64 val), | ||
127 | TP_ARGS(type, len, gpa, val), | ||
128 | |||
129 | TP_STRUCT__entry( | ||
130 | __field( u32, type ) | ||
131 | __field( u32, len ) | ||
132 | __field( u64, gpa ) | ||
133 | __field( u64, val ) | ||
134 | ), | ||
135 | |||
136 | TP_fast_assign( | ||
137 | __entry->type = type; | ||
138 | __entry->len = len; | ||
139 | __entry->gpa = gpa; | ||
140 | __entry->val = val; | ||
141 | ), | ||
142 | |||
143 | TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", | ||
144 | __print_symbolic(__entry->type, kvm_trace_symbol_mmio), | ||
145 | __entry->len, __entry->gpa, __entry->val) | ||
146 | ); | ||
147 | |||
148 | #endif /* _TRACE_KVM_MAIN_H */ | ||
149 | |||
150 | /* This part must be outside protection */ | ||
151 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index a581ef211ff5..b48f1ad7c946 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -344,6 +344,101 @@ TRACE_EVENT(sched_signal_send, | |||
344 | __entry->sig, __entry->comm, __entry->pid) | 344 | __entry->sig, __entry->comm, __entry->pid) |
345 | ); | 345 | ); |
346 | 346 | ||
347 | /* | ||
348 | * 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. | ||
350 | */ | ||
351 | |||
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 | |||
358 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
359 | |||
360 | TP_ARGS(tsk, delay), | ||
361 | |||
362 | TP_STRUCT__entry( | ||
363 | __array( char, comm, TASK_COMM_LEN ) | ||
364 | __field( pid_t, pid ) | ||
365 | __field( u64, delay ) | ||
366 | ), | ||
367 | |||
368 | TP_fast_assign( | ||
369 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
370 | __entry->pid = tsk->pid; | ||
371 | __entry->delay = delay; | ||
372 | ) | ||
373 | TP_perf_assign( | ||
374 | __perf_count(delay); | ||
375 | ), | ||
376 | |||
377 | TP_printk("task: %s:%d wait: %Lu [ns]", | ||
378 | __entry->comm, __entry->pid, | ||
379 | (unsigned long long)__entry->delay) | ||
380 | ); | ||
381 | |||
382 | /* | ||
383 | * Tracepoint for accounting sleep time (time the task is not runnable, | ||
384 | * including iowait, see below). | ||
385 | */ | ||
386 | TRACE_EVENT(sched_stat_sleep, | ||
387 | |||
388 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
389 | |||
390 | TP_ARGS(tsk, delay), | ||
391 | |||
392 | TP_STRUCT__entry( | ||
393 | __array( char, comm, TASK_COMM_LEN ) | ||
394 | __field( pid_t, pid ) | ||
395 | __field( u64, delay ) | ||
396 | ), | ||
397 | |||
398 | TP_fast_assign( | ||
399 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
400 | __entry->pid = tsk->pid; | ||
401 | __entry->delay = delay; | ||
402 | ) | ||
403 | TP_perf_assign( | ||
404 | __perf_count(delay); | ||
405 | ), | ||
406 | |||
407 | TP_printk("task: %s:%d sleep: %Lu [ns]", | ||
408 | __entry->comm, __entry->pid, | ||
409 | (unsigned long long)__entry->delay) | ||
410 | ); | ||
411 | |||
412 | /* | ||
413 | * Tracepoint for accounting iowait time (time the task is not runnable | ||
414 | * due to waiting on IO to complete). | ||
415 | */ | ||
416 | TRACE_EVENT(sched_stat_iowait, | ||
417 | |||
418 | TP_PROTO(struct task_struct *tsk, u64 delay), | ||
419 | |||
420 | TP_ARGS(tsk, delay), | ||
421 | |||
422 | TP_STRUCT__entry( | ||
423 | __array( char, comm, TASK_COMM_LEN ) | ||
424 | __field( pid_t, pid ) | ||
425 | __field( u64, delay ) | ||
426 | ), | ||
427 | |||
428 | TP_fast_assign( | ||
429 | memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); | ||
430 | __entry->pid = tsk->pid; | ||
431 | __entry->delay = delay; | ||
432 | ) | ||
433 | TP_perf_assign( | ||
434 | __perf_count(delay); | ||
435 | ), | ||
436 | |||
437 | TP_printk("task: %s:%d iowait: %Lu [ns]", | ||
438 | __entry->comm, __entry->pid, | ||
439 | (unsigned long long)__entry->delay) | ||
440 | ); | ||
441 | |||
347 | #endif /* _TRACE_SCHED_H */ | 442 | #endif /* _TRACE_SCHED_H */ |
348 | 443 | ||
349 | /* This part must be outside protection */ | 444 | /* This part must be outside protection */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index e499863b9669..4b2be6dc76f0 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
6 | 6 | ||
7 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
8 | #include <linux/netdevice.h> | ||
8 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -34,6 +35,25 @@ TRACE_EVENT(kfree_skb, | |||
34 | __entry->skbaddr, __entry->protocol, __entry->location) | 35 | __entry->skbaddr, __entry->protocol, __entry->location) |
35 | ); | 36 | ); |
36 | 37 | ||
38 | TRACE_EVENT(skb_copy_datagram_iovec, | ||
39 | |||
40 | TP_PROTO(const struct sk_buff *skb, int len), | ||
41 | |||
42 | TP_ARGS(skb, len), | ||
43 | |||
44 | TP_STRUCT__entry( | ||
45 | __field( const void *, skbaddr ) | ||
46 | __field( int, len ) | ||
47 | ), | ||
48 | |||
49 | TP_fast_assign( | ||
50 | __entry->skbaddr = skb; | ||
51 | __entry->len = len; | ||
52 | ), | ||
53 | |||
54 | TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len) | ||
55 | ); | ||
56 | |||
37 | #endif /* _TRACE_SKB_H */ | 57 | #endif /* _TRACE_SKB_H */ |
38 | 58 | ||
39 | /* This part must be outside protection */ | 59 | /* This part must be outside protection */ |