diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /tools/perf/scripts/python/sctop.py | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
-rw-r--r-- | tools/perf/scripts/python/sctop.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/scripts/python/sctop.py b/tools/perf/scripts/python/sctop.py index 6cafad40c296..42c267e292fa 100644 --- a/tools/perf/scripts/python/sctop.py +++ b/tools/perf/scripts/python/sctop.py | |||
@@ -8,10 +8,7 @@ | |||
8 | # will be refreshed every [interval] seconds. The default interval is | 8 | # will be refreshed every [interval] seconds. The default interval is |
9 | # 3 seconds. | 9 | # 3 seconds. |
10 | 10 | ||
11 | import thread | 11 | import os, sys, thread, time |
12 | import time | ||
13 | import os | ||
14 | import sys | ||
15 | 12 | ||
16 | sys.path.append(os.environ['PERF_EXEC_PATH'] + \ | 13 | sys.path.append(os.environ['PERF_EXEC_PATH'] + \ |
17 | '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') | 14 | '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') |
@@ -20,7 +17,7 @@ from perf_trace_context import * | |||
20 | from Core import * | 17 | from Core import * |
21 | from Util import * | 18 | from Util import * |
22 | 19 | ||
23 | usage = "perf trace -s syscall-counts.py [comm] [interval]\n"; | 20 | usage = "perf script -s sctop.py [comm] [interval]\n"; |
24 | 21 | ||
25 | for_comm = None | 22 | for_comm = None |
26 | default_interval = 3 | 23 | default_interval = 3 |
@@ -71,7 +68,7 @@ def print_syscall_totals(interval): | |||
71 | for id, val in sorted(syscalls.iteritems(), key = lambda(k, v): (v, k), \ | 68 | for id, val in sorted(syscalls.iteritems(), key = lambda(k, v): (v, k), \ |
72 | reverse = True): | 69 | reverse = True): |
73 | try: | 70 | try: |
74 | print "%-40d %10d\n" % (id, val), | 71 | print "%-40s %10d\n" % (syscall_name(id), val), |
75 | except TypeError: | 72 | except TypeError: |
76 | pass | 73 | pass |
77 | syscalls.clear() | 74 | syscalls.clear() |