[pypy-commit] pypy default: Remove dead code.

Manuel Jacob noreply at buildbot.pypy.org
Tue Jan 21 14:38:48 CET 2014


Author: Manuel Jacob
Branch: 
Changeset: r68807:89c0969caec9
Date: 2014-01-21 14:35 +0100
http://bitbucket.org/pypy/pypy/changeset/89c0969caec9/

Log:	Remove dead code.

diff --git a/rpython/translator/driver.py b/rpython/translator/driver.py
--- a/rpython/translator/driver.py
+++ b/rpython/translator/driver.py
@@ -33,9 +33,6 @@
 # TODO:
 # sanity-checks using states
 
-# set of translation steps to profile
-PROFILE = set([])
-
 class Instrument(Exception):
     pass
 
@@ -248,15 +245,6 @@
     def info(self, msg):
         log.info(msg)
 
-    def _profile(self, goal, func):
-        from cProfile import Profile
-        from rpython.tool.lsprofcalltree import KCacheGrind
-        d = {'func':func}
-        prof = Profile()
-        prof.runctx("res = func()", globals(), d)
-        KCacheGrind(prof).output(open(goal + ".out", "w"))
-        return d['res']
-
     def _do(self, goal, func, *args, **kwds):
         title = func.task_title
         if goal in self.done:
@@ -270,10 +258,7 @@
         try:
             instrument = False
             try:
-                if goal in PROFILE:
-                    res = self._profile(goal, func)
-                else:
-                    res = func()
+                res = func()
             except Instrument:
                 instrument = True
             if not func.task_idempotent:


More information about the pypy-commit mailing list