[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-2e7d1e3fb8043380a2fc5d759eb357bf05acf935@git.kernel.org>
Date: Tue, 26 Oct 2010 10:22:57 GMT
From: tip-bot for Arnaldo Carvalho de Melo <acme@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, paulus@...ba.org,
acme@...hat.com, hpa@...or.com, mingo@...hat.com,
tzanussi@...il.com, peterz@...radead.org, efault@....de,
davem@...emloft.net, fweisbec@...il.com, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perf/urgent] perf python scripting: print the syscall name on sctop
Commit-ID: 2e7d1e3fb8043380a2fc5d759eb357bf05acf935
Gitweb: http://git.kernel.org/tip/2e7d1e3fb8043380a2fc5d759eb357bf05acf935
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 25 Oct 2010 18:39:20 -0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 25 Oct 2010 18:47:27 -0200
perf python scripting: print the syscall name on sctop
[root@...lia tmp]# perf trace sctop 1
syscall events:
event count
---------------------------------------- ----------
read 215400
futex 4029
write 376
brk 33
rt_sigprocmask 24
select 17
lseek 2
fsync 1
^C[root@...lia tmp]#
Cc: David S. Miller <davem@...emloft.net>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Tom Zanussi <tzanussi@...il.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/scripts/python/sctop.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/perf/scripts/python/sctop.py b/tools/perf/scripts/python/sctop.py
index 6cafad4..547cbe9 100644
--- a/tools/perf/scripts/python/sctop.py
+++ b/tools/perf/scripts/python/sctop.py
@@ -8,10 +8,7 @@
# will be refreshed every [interval] seconds. The default interval is
# 3 seconds.
-import thread
-import time
-import os
-import sys
+import os, sys, thread, time
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
@@ -71,7 +68,7 @@ def print_syscall_totals(interval):
for id, val in sorted(syscalls.iteritems(), key = lambda(k, v): (v, k), \
reverse = True):
try:
- print "%-40d %10d\n" % (id, val),
+ print "%-40s %10d\n" % (syscall_name(id), val),
except TypeError:
pass
syscalls.clear()
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists