mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] perf: net_dropmonitor: Remove progress indicator
Date: Tue, 21 May 2013 01:45:57 +0100	[thread overview]
Message-ID: <1369097157.3469.136.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <1369096976.3469.131.camel@deadeye.wl.decadent.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

We can read /proc/kallsyms in a fraction of a second, so why waste
a further fraction of a second showing progress?

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 tools/perf/scripts/python/net_dropmonitor.py |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tools/perf/scripts/python/net_dropmonitor.py b/tools/perf/scripts/python/net_dropmonitor.py
index 32fcee0..b574059 100755
--- a/tools/perf/scripts/python/net_dropmonitor.py
+++ b/tools/perf/scripts/python/net_dropmonitor.py
@@ -15,28 +15,17 @@ kallsyms = []
 
 def get_kallsyms_table():
 	global kallsyms
+
 	try:
 		f = open("/proc/kallsyms", "r")
-		linecount = 0
-		for line in f:
-			linecount = linecount+1
-		f.seek(0)
 	except:
 		return
 
-
-	j = 0
 	for line in f:
 		loc = int(line.split()[0], 16)
 		name = line.split()[2]
-		j = j +1
-		if ((j % 100) == 0):
-			print "\r" + str(j) + "/" + str(linecount),
 		kallsyms.append((loc, name))
-
-	print "\r" + str(j) + "/" + str(linecount)
 	kallsyms.sort()
-	return
 
 def get_sym(sloc):
 	loc = int(sloc)


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2013-05-21  0:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  0:42 [PATCH 0/5] perf: net_dropmonitor: Make it work and make it fast Ben Hutchings
2013-05-21  0:44 ` [PATCH 1/5] perf: net_dropmonitor: Fix trace parameter order Ben Hutchings
2013-05-21  0:45 ` [PATCH 2/5] perf: net_dropmonitor: Fix symbol-relative addresses Ben Hutchings
2013-05-21  0:45 ` [PATCH 3/5] perf: net_dropmonitor: Do not assume ordering of dictionaries Ben Hutchings
2013-05-21  0:45 ` [PATCH 4/5] perf: net_dropmonitor: Use bisection in symbol lookup Ben Hutchings
2013-05-21  0:45 ` Ben Hutchings [this message]
2013-05-21 13:33 ` [PATCH 0/5] perf: net_dropmonitor: Make it work and make it fast Neil Horman
2013-05-21 13:54   ` Ben Hutchings
2013-05-21 16:06     ` Neil Horman
2013-05-21 16:12     ` Neil Horman
2013-05-22 22:11   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369097157.3469.136.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®