aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/sctop.py
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2019-03-01 20:18:57 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-03-06 16:09:14 -0500
commitb504d7f6876515b74c8e27a44ccdb22372616d97 (patch)
treec0591cd27231c653655fdb5b9849582e286168b9 /tools/perf/scripts/python/sctop.py
parentc1d3e633e16db3eb64f519c7099171bfcef94b20 (diff)
perf script python: Remove mixed indentation
Remove mixed indentation in Python scripts. Revert to either all tabs (most common form) or all spaces (4 or 8) depending on what was the intent of the original commit. This is necessary to complete Python3 support as it will flag an error if it encounters mixed indentation. Signed-off-by: Tony Jones <tonyj@suse.de> Link: http://lkml.kernel.org/r/20190302011903.2416-2-tonyj@suse.de Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
-rw-r--r--tools/perf/scripts/python/sctop.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/perf/scripts/python/sctop.py b/tools/perf/scripts/python/sctop.py
index 987ffae7c8ca..6e0278dcb092 100644
--- a/tools/perf/scripts/python/sctop.py
+++ b/tools/perf/scripts/python/sctop.py
@@ -13,9 +13,9 @@ from __future__ import print_function
13import os, sys, time 13import os, sys, time
14 14
15try: 15try:
16 import thread 16 import thread
17except ImportError: 17except ImportError:
18 import _thread as thread 18 import _thread as thread
19 19
20sys.path.append(os.environ['PERF_EXEC_PATH'] + \ 20sys.path.append(os.environ['PERF_EXEC_PATH'] + \
21 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') 21 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
@@ -75,11 +75,12 @@ def print_syscall_totals(interval):
75 75
76 print("%-40s %10s" % ("event", "count")) 76 print("%-40s %10s" % ("event", "count"))
77 print("%-40s %10s" % 77 print("%-40s %10s" %
78 ("----------------------------------------", 78 ("----------------------------------------",
79 "----------")) 79 "----------"))
80 80
81 for id, val in sorted(syscalls.items(), key = lambda kv: (kv[1], kv[0]), \ 81 for id, val in sorted(syscalls.items(),
82 reverse = True): 82 key = lambda kv: (kv[1], kv[0]),
83 reverse = True):
83 try: 84 try:
84 print("%-40s %10d" % (syscall_name(id), val)) 85 print("%-40s %10d" % (syscall_name(id), val))
85 except TypeError: 86 except TypeError: