diff options
Diffstat (limited to 'tools/perf/scripts/python')
-rw-r--r-- | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/bin/failed-syscalls-by-pid-record | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/bin/sctop-record | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/bin/syscall-counts-by-pid-record | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/bin/syscall-counts-record | 3 | ||||
-rw-r--r-- | tools/perf/scripts/python/check-perf-trace.py | 4 | ||||
-rw-r--r-- | tools/perf/scripts/python/failed-syscalls-by-pid.py | 7 | ||||
-rw-r--r-- | tools/perf/scripts/python/futex-contention.py | 4 | ||||
-rwxr-xr-x | tools/perf/scripts/python/net_dropmonitor.py | 2 | ||||
-rw-r--r-- | tools/perf/scripts/python/netdev-times.py | 26 | ||||
-rw-r--r-- | tools/perf/scripts/python/sched-migration.py | 41 | ||||
-rw-r--r-- | tools/perf/scripts/python/sctop.py | 7 | ||||
-rw-r--r-- | tools/perf/scripts/python/syscall-counts-by-pid.py | 7 | ||||
-rw-r--r-- | tools/perf/scripts/python/syscall-counts.py | 7 |
14 files changed, 72 insertions, 48 deletions
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py index de7211e4fa47..38dfb720fb6f 100644 --- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py +++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | |||
@@ -107,12 +107,13 @@ def taskState(state): | |||
107 | 107 | ||
108 | class EventHeaders: | 108 | class EventHeaders: |
109 | def __init__(self, common_cpu, common_secs, common_nsecs, | 109 | def __init__(self, common_cpu, common_secs, common_nsecs, |
110 | common_pid, common_comm): | 110 | common_pid, common_comm, common_callchain): |
111 | self.cpu = common_cpu | 111 | self.cpu = common_cpu |
112 | self.secs = common_secs | 112 | self.secs = common_secs |
113 | self.nsecs = common_nsecs | 113 | self.nsecs = common_nsecs |
114 | self.pid = common_pid | 114 | self.pid = common_pid |
115 | self.comm = common_comm | 115 | self.comm = common_comm |
116 | self.callchain = common_callchain | ||
116 | 117 | ||
117 | def ts(self): | 118 | def ts(self): |
118 | return (self.secs * (10 ** 9)) + self.nsecs | 119 | return (self.secs * (10 ** 9)) + self.nsecs |
diff --git a/tools/perf/scripts/python/bin/failed-syscalls-by-pid-record b/tools/perf/scripts/python/bin/failed-syscalls-by-pid-record index 8104895a7b67..74685f318379 100644 --- a/tools/perf/scripts/python/bin/failed-syscalls-by-pid-record +++ b/tools/perf/scripts/python/bin/failed-syscalls-by-pid-record | |||
@@ -1,2 +1,3 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | perf record -e raw_syscalls:sys_exit $@ | 2 | (perf record -e raw_syscalls:sys_exit $@ || \ |
3 | perf record -e syscalls:sys_exit $@) 2> /dev/null | ||
diff --git a/tools/perf/scripts/python/bin/sctop-record b/tools/perf/scripts/python/bin/sctop-record index 4efbfaa7f6a5..d6940841e54f 100644 --- a/tools/perf/scripts/python/bin/sctop-record +++ b/tools/perf/scripts/python/bin/sctop-record | |||
@@ -1,2 +1,3 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | perf record -e raw_syscalls:sys_enter $@ | 2 | (perf record -e raw_syscalls:sys_enter $@ || \ |
3 | perf record -e syscalls:sys_enter $@) 2> /dev/null | ||
diff --git a/tools/perf/scripts/python/bin/syscall-counts-by-pid-record b/tools/perf/scripts/python/bin/syscall-counts-by-pid-record index 4efbfaa7f6a5..d6940841e54f 100644 --- a/tools/perf/scripts/python/bin/syscall-counts-by-pid-record +++ b/tools/perf/scripts/python/bin/syscall-counts-by-pid-record | |||
@@ -1,2 +1,3 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | perf record -e raw_syscalls:sys_enter $@ | 2 | (perf record -e raw_syscalls:sys_enter $@ || \ |
3 | perf record -e syscalls:sys_enter $@) 2> /dev/null | ||
diff --git a/tools/perf/scripts/python/bin/syscall-counts-record b/tools/perf/scripts/python/bin/syscall-counts-record index 4efbfaa7f6a5..d6940841e54f 100644 --- a/tools/perf/scripts/python/bin/syscall-counts-record +++ b/tools/perf/scripts/python/bin/syscall-counts-record | |||
@@ -1,2 +1,3 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | perf record -e raw_syscalls:sys_enter $@ | 2 | (perf record -e raw_syscalls:sys_enter $@ || \ |
3 | perf record -e syscalls:sys_enter $@) 2> /dev/null | ||
diff --git a/tools/perf/scripts/python/check-perf-trace.py b/tools/perf/scripts/python/check-perf-trace.py index 4647a7694cf6..334599c6032c 100644 --- a/tools/perf/scripts/python/check-perf-trace.py +++ b/tools/perf/scripts/python/check-perf-trace.py | |||
@@ -27,7 +27,7 @@ def trace_end(): | |||
27 | 27 | ||
28 | def irq__softirq_entry(event_name, context, common_cpu, | 28 | def irq__softirq_entry(event_name, context, common_cpu, |
29 | common_secs, common_nsecs, common_pid, common_comm, | 29 | common_secs, common_nsecs, common_pid, common_comm, |
30 | vec): | 30 | common_callchain, vec): |
31 | print_header(event_name, common_cpu, common_secs, common_nsecs, | 31 | print_header(event_name, common_cpu, common_secs, common_nsecs, |
32 | common_pid, common_comm) | 32 | common_pid, common_comm) |
33 | 33 | ||
@@ -38,7 +38,7 @@ def irq__softirq_entry(event_name, context, common_cpu, | |||
38 | 38 | ||
39 | def kmem__kmalloc(event_name, context, common_cpu, | 39 | def kmem__kmalloc(event_name, context, common_cpu, |
40 | common_secs, common_nsecs, common_pid, common_comm, | 40 | common_secs, common_nsecs, common_pid, common_comm, |
41 | call_site, ptr, bytes_req, bytes_alloc, | 41 | common_callchain, call_site, ptr, bytes_req, bytes_alloc, |
42 | gfp_flags): | 42 | gfp_flags): |
43 | print_header(event_name, common_cpu, common_secs, common_nsecs, | 43 | print_header(event_name, common_cpu, common_secs, common_nsecs, |
44 | common_pid, common_comm) | 44 | common_pid, common_comm) |
diff --git a/tools/perf/scripts/python/failed-syscalls-by-pid.py b/tools/perf/scripts/python/failed-syscalls-by-pid.py index 85805fac4116..cafeff3d74db 100644 --- a/tools/perf/scripts/python/failed-syscalls-by-pid.py +++ b/tools/perf/scripts/python/failed-syscalls-by-pid.py | |||
@@ -39,7 +39,7 @@ def trace_end(): | |||
39 | 39 | ||
40 | def raw_syscalls__sys_exit(event_name, context, common_cpu, | 40 | def raw_syscalls__sys_exit(event_name, context, common_cpu, |
41 | common_secs, common_nsecs, common_pid, common_comm, | 41 | common_secs, common_nsecs, common_pid, common_comm, |
42 | id, ret): | 42 | common_callchain, id, ret): |
43 | if (for_comm and common_comm != for_comm) or \ | 43 | if (for_comm and common_comm != for_comm) or \ |
44 | (for_pid and common_pid != for_pid ): | 44 | (for_pid and common_pid != for_pid ): |
45 | return | 45 | return |
@@ -50,6 +50,11 @@ def raw_syscalls__sys_exit(event_name, context, common_cpu, | |||
50 | except TypeError: | 50 | except TypeError: |
51 | syscalls[common_comm][common_pid][id][ret] = 1 | 51 | syscalls[common_comm][common_pid][id][ret] = 1 |
52 | 52 | ||
53 | def syscalls__sys_exit(event_name, context, common_cpu, | ||
54 | common_secs, common_nsecs, common_pid, common_comm, | ||
55 | id, ret): | ||
56 | raw_syscalls__sys_exit(**locals()) | ||
57 | |||
53 | def print_error_totals(): | 58 | def print_error_totals(): |
54 | if for_comm is not None: | 59 | if for_comm is not None: |
55 | print "\nsyscall errors for %s:\n\n" % (for_comm), | 60 | print "\nsyscall errors for %s:\n\n" % (for_comm), |
diff --git a/tools/perf/scripts/python/futex-contention.py b/tools/perf/scripts/python/futex-contention.py index 11e70a388d41..0f5cf437b602 100644 --- a/tools/perf/scripts/python/futex-contention.py +++ b/tools/perf/scripts/python/futex-contention.py | |||
@@ -21,7 +21,7 @@ thread_blocktime = {} | |||
21 | lock_waits = {} # long-lived stats on (tid,lock) blockage elapsed time | 21 | lock_waits = {} # long-lived stats on (tid,lock) blockage elapsed time |
22 | process_names = {} # long-lived pid-to-execname mapping | 22 | process_names = {} # long-lived pid-to-execname mapping |
23 | 23 | ||
24 | def syscalls__sys_enter_futex(event, ctxt, cpu, s, ns, tid, comm, | 24 | def syscalls__sys_enter_futex(event, ctxt, cpu, s, ns, tid, comm, callchain, |
25 | nr, uaddr, op, val, utime, uaddr2, val3): | 25 | nr, uaddr, op, val, utime, uaddr2, val3): |
26 | cmd = op & FUTEX_CMD_MASK | 26 | cmd = op & FUTEX_CMD_MASK |
27 | if cmd != FUTEX_WAIT: | 27 | if cmd != FUTEX_WAIT: |
@@ -31,7 +31,7 @@ def syscalls__sys_enter_futex(event, ctxt, cpu, s, ns, tid, comm, | |||
31 | thread_thislock[tid] = uaddr | 31 | thread_thislock[tid] = uaddr |
32 | thread_blocktime[tid] = nsecs(s, ns) | 32 | thread_blocktime[tid] = nsecs(s, ns) |
33 | 33 | ||
34 | def syscalls__sys_exit_futex(event, ctxt, cpu, s, ns, tid, comm, | 34 | def syscalls__sys_exit_futex(event, ctxt, cpu, s, ns, tid, comm, callchain, |
35 | nr, ret): | 35 | nr, ret): |
36 | if thread_blocktime.has_key(tid): | 36 | if thread_blocktime.has_key(tid): |
37 | elapsed = nsecs(s, ns) - thread_blocktime[tid] | 37 | elapsed = nsecs(s, ns) - thread_blocktime[tid] |
diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py index b5740599aabd..0b6ce8c253e8 100755 --- a/tools/perf/scripts/python/net_dropmonitor.py +++ b/tools/perf/scripts/python/net_dropmonitor.py | |||
@@ -66,7 +66,7 @@ def trace_end(): | |||
66 | print_drop_table() | 66 | print_drop_table() |
67 | 67 | ||
68 | # called from perf, when it finds a correspoinding event | 68 | # called from perf, when it finds a correspoinding event |
69 | def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, | 69 | def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain, |
70 | skbaddr, location, protocol): | 70 | skbaddr, location, protocol): |
71 | slocation = str(location) | 71 | slocation = str(location) |
72 | try: | 72 | try: |
diff --git a/tools/perf/scripts/python/netdev-times.py b/tools/perf/scripts/python/netdev-times.py index 9aa0a32972e8..4d21ef2d601d 100644 --- a/tools/perf/scripts/python/netdev-times.py +++ b/tools/perf/scripts/python/netdev-times.py | |||
@@ -224,75 +224,75 @@ def trace_end(): | |||
224 | (len(rx_skb_list), of_count_rx_skb_list) | 224 | (len(rx_skb_list), of_count_rx_skb_list) |
225 | 225 | ||
226 | # called from perf, when it finds a correspoinding event | 226 | # called from perf, when it finds a correspoinding event |
227 | def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, vec): | 227 | def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): |
228 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": | 228 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": |
229 | return | 229 | return |
230 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) | 230 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) |
231 | all_event_list.append(event_info) | 231 | all_event_list.append(event_info) |
232 | 232 | ||
233 | def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, vec): | 233 | def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): |
234 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": | 234 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": |
235 | return | 235 | return |
236 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) | 236 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) |
237 | all_event_list.append(event_info) | 237 | all_event_list.append(event_info) |
238 | 238 | ||
239 | def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, vec): | 239 | def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): |
240 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": | 240 | if symbol_str("irq__softirq_entry", "vec", vec) != "NET_RX": |
241 | return | 241 | return |
242 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) | 242 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) |
243 | all_event_list.append(event_info) | 243 | all_event_list.append(event_info) |
244 | 244 | ||
245 | def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, | 245 | def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, |
246 | irq, irq_name): | 246 | callchain, irq, irq_name): |
247 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 247 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
248 | irq, irq_name) | 248 | irq, irq_name) |
249 | all_event_list.append(event_info) | 249 | all_event_list.append(event_info) |
250 | 250 | ||
251 | def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, irq, ret): | 251 | def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, irq, ret): |
252 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, irq, ret) | 252 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, irq, ret) |
253 | all_event_list.append(event_info) | 253 | all_event_list.append(event_info) |
254 | 254 | ||
255 | def napi__napi_poll(name, context, cpu, sec, nsec, pid, comm, napi, dev_name): | 255 | def napi__napi_poll(name, context, cpu, sec, nsec, pid, comm, callchain, napi, dev_name): |
256 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 256 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
257 | napi, dev_name) | 257 | napi, dev_name) |
258 | all_event_list.append(event_info) | 258 | all_event_list.append(event_info) |
259 | 259 | ||
260 | def net__netif_receive_skb(name, context, cpu, sec, nsec, pid, comm, skbaddr, | 260 | def net__netif_receive_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr, |
261 | skblen, dev_name): | 261 | skblen, dev_name): |
262 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 262 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
263 | skbaddr, skblen, dev_name) | 263 | skbaddr, skblen, dev_name) |
264 | all_event_list.append(event_info) | 264 | all_event_list.append(event_info) |
265 | 265 | ||
266 | def net__netif_rx(name, context, cpu, sec, nsec, pid, comm, skbaddr, | 266 | def net__netif_rx(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr, |
267 | skblen, dev_name): | 267 | skblen, dev_name): |
268 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 268 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
269 | skbaddr, skblen, dev_name) | 269 | skbaddr, skblen, dev_name) |
270 | all_event_list.append(event_info) | 270 | all_event_list.append(event_info) |
271 | 271 | ||
272 | def net__net_dev_queue(name, context, cpu, sec, nsec, pid, comm, | 272 | def net__net_dev_queue(name, context, cpu, sec, nsec, pid, comm, callchain, |
273 | skbaddr, skblen, dev_name): | 273 | skbaddr, skblen, dev_name): |
274 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 274 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
275 | skbaddr, skblen, dev_name) | 275 | skbaddr, skblen, dev_name) |
276 | all_event_list.append(event_info) | 276 | all_event_list.append(event_info) |
277 | 277 | ||
278 | def net__net_dev_xmit(name, context, cpu, sec, nsec, pid, comm, | 278 | def net__net_dev_xmit(name, context, cpu, sec, nsec, pid, comm, callchain, |
279 | skbaddr, skblen, rc, dev_name): | 279 | skbaddr, skblen, rc, dev_name): |
280 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 280 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
281 | skbaddr, skblen, rc ,dev_name) | 281 | skbaddr, skblen, rc ,dev_name) |
282 | all_event_list.append(event_info) | 282 | all_event_list.append(event_info) |
283 | 283 | ||
284 | def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, | 284 | def skb__kfree_skb(name, context, cpu, sec, nsec, pid, comm, callchain, |
285 | skbaddr, protocol, location): | 285 | skbaddr, protocol, location): |
286 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 286 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
287 | skbaddr, protocol, location) | 287 | skbaddr, protocol, location) |
288 | all_event_list.append(event_info) | 288 | all_event_list.append(event_info) |
289 | 289 | ||
290 | def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, skbaddr): | 290 | def skb__consume_skb(name, context, cpu, sec, nsec, pid, comm, callchain, skbaddr): |
291 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 291 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
292 | skbaddr) | 292 | skbaddr) |
293 | all_event_list.append(event_info) | 293 | all_event_list.append(event_info) |
294 | 294 | ||
295 | def skb__skb_copy_datagram_iovec(name, context, cpu, sec, nsec, pid, comm, | 295 | def skb__skb_copy_datagram_iovec(name, context, cpu, sec, nsec, pid, comm, callchain, |
296 | skbaddr, skblen): | 296 | skbaddr, skblen): |
297 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, | 297 | event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, |
298 | skbaddr, skblen) | 298 | skbaddr, skblen) |
diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py index 74d55ec08aed..de66cb3b72c9 100644 --- a/tools/perf/scripts/python/sched-migration.py +++ b/tools/perf/scripts/python/sched-migration.py | |||
@@ -369,93 +369,92 @@ def trace_end(): | |||
369 | 369 | ||
370 | def sched__sched_stat_runtime(event_name, context, common_cpu, | 370 | def sched__sched_stat_runtime(event_name, context, common_cpu, |
371 | common_secs, common_nsecs, common_pid, common_comm, | 371 | common_secs, common_nsecs, common_pid, common_comm, |
372 | comm, pid, runtime, vruntime): | 372 | common_callchain, comm, pid, runtime, vruntime): |
373 | pass | 373 | pass |
374 | 374 | ||
375 | def sched__sched_stat_iowait(event_name, context, common_cpu, | 375 | def sched__sched_stat_iowait(event_name, context, common_cpu, |
376 | common_secs, common_nsecs, common_pid, common_comm, | 376 | common_secs, common_nsecs, common_pid, common_comm, |
377 | comm, pid, delay): | 377 | common_callchain, comm, pid, delay): |
378 | pass | 378 | pass |
379 | 379 | ||
380 | def sched__sched_stat_sleep(event_name, context, common_cpu, | 380 | def sched__sched_stat_sleep(event_name, context, common_cpu, |
381 | common_secs, common_nsecs, common_pid, common_comm, | 381 | common_secs, common_nsecs, common_pid, common_comm, |
382 | comm, pid, delay): | 382 | common_callchain, comm, pid, delay): |
383 | pass | 383 | pass |
384 | 384 | ||
385 | def sched__sched_stat_wait(event_name, context, common_cpu, | 385 | def sched__sched_stat_wait(event_name, context, common_cpu, |
386 | common_secs, common_nsecs, common_pid, common_comm, | 386 | common_secs, common_nsecs, common_pid, common_comm, |
387 | comm, pid, delay): | 387 | common_callchain, comm, pid, delay): |
388 | pass | 388 | pass |
389 | 389 | ||
390 | def sched__sched_process_fork(event_name, context, common_cpu, | 390 | def sched__sched_process_fork(event_name, context, common_cpu, |
391 | common_secs, common_nsecs, common_pid, common_comm, | 391 | common_secs, common_nsecs, common_pid, common_comm, |
392 | parent_comm, parent_pid, child_comm, child_pid): | 392 | common_callchain, parent_comm, parent_pid, child_comm, child_pid): |
393 | pass | 393 | pass |
394 | 394 | ||
395 | def sched__sched_process_wait(event_name, context, common_cpu, | 395 | def sched__sched_process_wait(event_name, context, common_cpu, |
396 | common_secs, common_nsecs, common_pid, common_comm, | 396 | common_secs, common_nsecs, common_pid, common_comm, |
397 | comm, pid, prio): | 397 | common_callchain, comm, pid, prio): |
398 | pass | 398 | pass |
399 | 399 | ||
400 | def sched__sched_process_exit(event_name, context, common_cpu, | 400 | def sched__sched_process_exit(event_name, context, common_cpu, |
401 | common_secs, common_nsecs, common_pid, common_comm, | 401 | common_secs, common_nsecs, common_pid, common_comm, |
402 | comm, pid, prio): | 402 | common_callchain, comm, pid, prio): |
403 | pass | 403 | pass |
404 | 404 | ||
405 | def sched__sched_process_free(event_name, context, common_cpu, | 405 | def sched__sched_process_free(event_name, context, common_cpu, |
406 | common_secs, common_nsecs, common_pid, common_comm, | 406 | common_secs, common_nsecs, common_pid, common_comm, |
407 | comm, pid, prio): | 407 | common_callchain, comm, pid, prio): |
408 | pass | 408 | pass |
409 | 409 | ||
410 | def sched__sched_migrate_task(event_name, context, common_cpu, | 410 | def sched__sched_migrate_task(event_name, context, common_cpu, |
411 | common_secs, common_nsecs, common_pid, common_comm, | 411 | common_secs, common_nsecs, common_pid, common_comm, |
412 | comm, pid, prio, orig_cpu, | 412 | common_callchain, comm, pid, prio, orig_cpu, |
413 | dest_cpu): | 413 | dest_cpu): |
414 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, | 414 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, |
415 | common_pid, common_comm) | 415 | common_pid, common_comm, common_callchain) |
416 | parser.migrate(headers, pid, prio, orig_cpu, dest_cpu) | 416 | parser.migrate(headers, pid, prio, orig_cpu, dest_cpu) |
417 | 417 | ||
418 | def sched__sched_switch(event_name, context, common_cpu, | 418 | def sched__sched_switch(event_name, context, common_cpu, |
419 | common_secs, common_nsecs, common_pid, common_comm, | 419 | common_secs, common_nsecs, common_pid, common_comm, common_callchain, |
420 | prev_comm, prev_pid, prev_prio, prev_state, | 420 | prev_comm, prev_pid, prev_prio, prev_state, |
421 | next_comm, next_pid, next_prio): | 421 | next_comm, next_pid, next_prio): |
422 | 422 | ||
423 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, | 423 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, |
424 | common_pid, common_comm) | 424 | common_pid, common_comm, common_callchain) |
425 | parser.sched_switch(headers, prev_comm, prev_pid, prev_prio, prev_state, | 425 | parser.sched_switch(headers, prev_comm, prev_pid, prev_prio, prev_state, |
426 | next_comm, next_pid, next_prio) | 426 | next_comm, next_pid, next_prio) |
427 | 427 | ||
428 | def sched__sched_wakeup_new(event_name, context, common_cpu, | 428 | def sched__sched_wakeup_new(event_name, context, common_cpu, |
429 | common_secs, common_nsecs, common_pid, common_comm, | 429 | common_secs, common_nsecs, common_pid, common_comm, |
430 | comm, pid, prio, success, | 430 | common_callchain, comm, pid, prio, success, |
431 | target_cpu): | 431 | target_cpu): |
432 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, | 432 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, |
433 | common_pid, common_comm) | 433 | common_pid, common_comm, common_callchain) |
434 | parser.wake_up(headers, comm, pid, success, target_cpu, 1) | 434 | parser.wake_up(headers, comm, pid, success, target_cpu, 1) |
435 | 435 | ||
436 | def sched__sched_wakeup(event_name, context, common_cpu, | 436 | def sched__sched_wakeup(event_name, context, common_cpu, |
437 | common_secs, common_nsecs, common_pid, common_comm, | 437 | common_secs, common_nsecs, common_pid, common_comm, |
438 | comm, pid, prio, success, | 438 | common_callchain, comm, pid, prio, success, |
439 | target_cpu): | 439 | target_cpu): |
440 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, | 440 | headers = EventHeaders(common_cpu, common_secs, common_nsecs, |
441 | common_pid, common_comm) | 441 | common_pid, common_comm, common_callchain) |
442 | parser.wake_up(headers, comm, pid, success, target_cpu, 0) | 442 | parser.wake_up(headers, comm, pid, success, target_cpu, 0) |
443 | 443 | ||
444 | def sched__sched_wait_task(event_name, context, common_cpu, | 444 | def sched__sched_wait_task(event_name, context, common_cpu, |
445 | common_secs, common_nsecs, common_pid, common_comm, | 445 | common_secs, common_nsecs, common_pid, common_comm, |
446 | comm, pid, prio): | 446 | common_callchain, comm, pid, prio): |
447 | pass | 447 | pass |
448 | 448 | ||
449 | def sched__sched_kthread_stop_ret(event_name, context, common_cpu, | 449 | def sched__sched_kthread_stop_ret(event_name, context, common_cpu, |
450 | common_secs, common_nsecs, common_pid, common_comm, | 450 | common_secs, common_nsecs, common_pid, common_comm, |
451 | ret): | 451 | common_callchain, ret): |
452 | pass | 452 | pass |
453 | 453 | ||
454 | def sched__sched_kthread_stop(event_name, context, common_cpu, | 454 | def sched__sched_kthread_stop(event_name, context, common_cpu, |
455 | common_secs, common_nsecs, common_pid, common_comm, | 455 | common_secs, common_nsecs, common_pid, common_comm, |
456 | comm, pid): | 456 | common_callchain, comm, pid): |
457 | pass | 457 | pass |
458 | 458 | ||
459 | def trace_unhandled(event_name, context, common_cpu, common_secs, common_nsecs, | 459 | def trace_unhandled(event_name, context, event_fields_dict): |
460 | common_pid, common_comm): | ||
461 | pass | 460 | pass |
diff --git a/tools/perf/scripts/python/sctop.py b/tools/perf/scripts/python/sctop.py index 42c267e292fa..61621b93affb 100644 --- a/tools/perf/scripts/python/sctop.py +++ b/tools/perf/scripts/python/sctop.py | |||
@@ -44,7 +44,7 @@ def trace_begin(): | |||
44 | 44 | ||
45 | def raw_syscalls__sys_enter(event_name, context, common_cpu, | 45 | def raw_syscalls__sys_enter(event_name, context, common_cpu, |
46 | common_secs, common_nsecs, common_pid, common_comm, | 46 | common_secs, common_nsecs, common_pid, common_comm, |
47 | id, args): | 47 | common_callchain, id, args): |
48 | if for_comm is not None: | 48 | if for_comm is not None: |
49 | if common_comm != for_comm: | 49 | if common_comm != for_comm: |
50 | return | 50 | return |
@@ -53,6 +53,11 @@ def raw_syscalls__sys_enter(event_name, context, common_cpu, | |||
53 | except TypeError: | 53 | except TypeError: |
54 | syscalls[id] = 1 | 54 | syscalls[id] = 1 |
55 | 55 | ||
56 | def syscalls__sys_enter(event_name, context, common_cpu, | ||
57 | common_secs, common_nsecs, common_pid, common_comm, | ||
58 | id, args): | ||
59 | raw_syscalls__sys_enter(**locals()) | ||
60 | |||
56 | def print_syscall_totals(interval): | 61 | def print_syscall_totals(interval): |
57 | while 1: | 62 | while 1: |
58 | clear_term() | 63 | clear_term() |
diff --git a/tools/perf/scripts/python/syscall-counts-by-pid.py b/tools/perf/scripts/python/syscall-counts-by-pid.py index c64d1c55d745..daf314cc5dd3 100644 --- a/tools/perf/scripts/python/syscall-counts-by-pid.py +++ b/tools/perf/scripts/python/syscall-counts-by-pid.py | |||
@@ -38,7 +38,7 @@ def trace_end(): | |||
38 | 38 | ||
39 | def raw_syscalls__sys_enter(event_name, context, common_cpu, | 39 | def raw_syscalls__sys_enter(event_name, context, common_cpu, |
40 | common_secs, common_nsecs, common_pid, common_comm, | 40 | common_secs, common_nsecs, common_pid, common_comm, |
41 | id, args): | 41 | common_callchain, id, args): |
42 | 42 | ||
43 | if (for_comm and common_comm != for_comm) or \ | 43 | if (for_comm and common_comm != for_comm) or \ |
44 | (for_pid and common_pid != for_pid ): | 44 | (for_pid and common_pid != for_pid ): |
@@ -48,6 +48,11 @@ def raw_syscalls__sys_enter(event_name, context, common_cpu, | |||
48 | except TypeError: | 48 | except TypeError: |
49 | syscalls[common_comm][common_pid][id] = 1 | 49 | syscalls[common_comm][common_pid][id] = 1 |
50 | 50 | ||
51 | def syscalls__sys_enter(event_name, context, common_cpu, | ||
52 | common_secs, common_nsecs, common_pid, common_comm, | ||
53 | id, args): | ||
54 | raw_syscalls__sys_enter(**locals()) | ||
55 | |||
51 | def print_syscall_totals(): | 56 | def print_syscall_totals(): |
52 | if for_comm is not None: | 57 | if for_comm is not None: |
53 | print "\nsyscall events for %s:\n\n" % (for_comm), | 58 | print "\nsyscall events for %s:\n\n" % (for_comm), |
diff --git a/tools/perf/scripts/python/syscall-counts.py b/tools/perf/scripts/python/syscall-counts.py index b435d3f188e8..e66a7730aeb5 100644 --- a/tools/perf/scripts/python/syscall-counts.py +++ b/tools/perf/scripts/python/syscall-counts.py | |||
@@ -35,7 +35,7 @@ def trace_end(): | |||
35 | 35 | ||
36 | def raw_syscalls__sys_enter(event_name, context, common_cpu, | 36 | def raw_syscalls__sys_enter(event_name, context, common_cpu, |
37 | common_secs, common_nsecs, common_pid, common_comm, | 37 | common_secs, common_nsecs, common_pid, common_comm, |
38 | id, args): | 38 | common_callchain, id, args): |
39 | if for_comm is not None: | 39 | if for_comm is not None: |
40 | if common_comm != for_comm: | 40 | if common_comm != for_comm: |
41 | return | 41 | return |
@@ -44,6 +44,11 @@ def raw_syscalls__sys_enter(event_name, context, common_cpu, | |||
44 | except TypeError: | 44 | except TypeError: |
45 | syscalls[id] = 1 | 45 | syscalls[id] = 1 |
46 | 46 | ||
47 | def syscalls__sys_enter(event_name, context, common_cpu, | ||
48 | common_secs, common_nsecs, common_pid, common_comm, | ||
49 | id, args): | ||
50 | raw_syscalls__sys_enter(**locals()) | ||
51 | |||
47 | def print_syscall_totals(): | 52 | def print_syscall_totals(): |
48 | if for_comm is not None: | 53 | if for_comm is not None: |
49 | print "\nsyscall events for %s:\n\n" % (for_comm), | 54 | print "\nsyscall events for %s:\n\n" % (for_comm), |