[pypy-svn] pypy default: kill unneeded function parse_log_counts

antocuni commits-noreply at bitbucket.org
Fri Feb 18 13:54:48 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r42158:98d1401a7c2e
Date: 2011-02-18 13:24 +0100
http://bitbucket.org/pypy/pypy/changeset/98d1401a7c2e/

Log:	kill unneeded function parse_log_counts


diff --git a/pypy/tool/jitlogparser/test/test_parser.py b/pypy/tool/jitlogparser/test/test_parser.py
--- a/pypy/tool/jitlogparser/test/test_parser.py
+++ b/pypy/tool/jitlogparser/test/test_parser.py
@@ -2,7 +2,7 @@
 from pypy.jit.metainterp.history import ConstInt, Const
 from pypy.tool.jitlogparser.parser import parse, Bytecode, Function,\
      slice_debug_merge_points,\
-     adjust_bridges, parse_log_counts, cssclass
+     adjust_bridges, cssclass
 from pypy.tool.jitlogparser.storage import LoopStorage
 import py
 
@@ -178,30 +178,6 @@
     chunk = ops.chunks[0]
     assert chunk.bytecode_name == 'StrLiteralSearch'
 
-LINES = '''
-0:3
-1:3
-2:604
-3:396
-4:102
-5:2000
-6:3147
-7:2445
-8:2005
-9:2000
-10:1420
-11:40
-12:0
-'''.split("\n")
-
-def test_parse_log_count():
-    class Loop(object):
-        pass
-    
-    loops = [Loop() for i in range(13)]
-    nums = parse_log_counts(LINES, loops)
-    assert nums[5] == 2000
-    assert loops[9].count == 2000
 
 def test_highlight_var():
     ops = parse('''

diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py
--- a/pypy/tool/jitlogparser/parser.py
+++ b/pypy/tool/jitlogparser/parser.py
@@ -290,22 +290,6 @@
                 print >>out, "  ", source
             chunk.pretty_print(out)
 
-def parse_log_counts(input, loops):
-    if not input:
-        return
-    lines = input[-1].splitlines()
-    nums = []
-    i = 0
-    for line in lines:
-        if line:
-            num, count = line.split(':')
-            assert int(num) == i
-            count = int(count)
-            nums.append(count)
-            loops[i].count = count
-            i += 1
-    return nums
-
 def parse(input):
     return SimpleParser(input, None, {}, 'lltype', None,
                         nonstrict=True).parse()


More information about the Pypy-commit mailing list