Commits

Alex Gaynor committed 31a65ad

remove long-unused space.timing option

  • Participants
  • Parent commits 610189b

Comments (0)

Files changed (6)

File pypy/config/pypyoption.py

                "make sure that all calls go through space.call_args",
                default=False),
 
-    BoolOption("timing",
-               "timing of various parts of the interpreter (simple profiling)",
-               default=False),
-
     OptionDescription("std", "Standard Object Space Options", [
         BoolOption("withtproxy", "support transparent proxies",
                    default=True),

File pypy/doc/config/objspace.timing.txt

-timing of various parts of the interpreter (simple profiling)

File pypy/interpreter/baseobjspace.py

-import pypy
 from pypy.interpreter.executioncontext import ExecutionContext, ActionFlag
 from pypy.interpreter.executioncontext import UserDelAction, FrameTraceAction
 from pypy.interpreter.error import OperationError, operationerrfmt
 from pypy.rlib.objectmodel import we_are_translated, newlist_hint,\
      compute_unique_id
 from pypy.rlib.debug import make_sure_not_resized
-from pypy.rlib.timer import DummyTimer, Timer
 from pypy.rlib.rarithmetic import r_uint
 from pypy.rlib import jit
-from pypy.tool.sourcetools import func_with_new_name
 import os, sys
 
 __all__ = ['ObjSpace', 'OperationError', 'Wrappable', 'W_Root']
             self.bytecodecounts = [0] * 256
             self.bytecodetransitioncount = {}
 
-        if self.config.objspace.timing:
-            self.timer = Timer()
-        else:
-            self.timer = DummyTimer()
-
         self.initialize()
 
     def startup(self):
             modname = self.str_w(w_modname)
             mod = self.interpclass_w(w_mod)
             if isinstance(mod, Module) and not mod.startup_called:
-                self.timer.start("startup " + modname)
                 mod.init(self)
-                self.timer.stop("startup " + modname)
 
     def finish(self):
         self.wait_for_thread_shutdown()
             from pypy.interpreter.module import Module
             mod = self.interpclass_w(w_mod)
             if isinstance(mod, Module):
-                self.timer.start("startup " + name)
                 mod.init(self)
-                self.timer.stop("startup " + name)
             return w_mod
 
     def get_builtinmodule_to_install(self):

File pypy/module/imp/importing.py

 def importhook(space, name, w_globals=None,
                w_locals=None, w_fromlist=None, level=-1):
     modulename = name
-    space.timer.start_name("importhook", modulename)
     if not modulename and level < 0:
         raise OperationError(
             space.w_ValueError,
                 w_mod = absolute_import(space, rel_modulename, rel_level,
                                         fromlist_w, tentative=False)
             if w_mod is not None:
-                space.timer.stop_name("importhook", modulename)
                 return w_mod
 
     w_mod = absolute_import(space, modulename, 0, fromlist_w, tentative=0)
     if rel_modulename is not None:
         space.setitem(space.sys.get('modules'), w(rel_modulename), space.w_None)
-    space.timer.stop_name("importhook", modulename)
     return w_mod
 
 def absolute_import(space, modulename, baselevel, fromlist_w, tentative):

File pypy/module/marshal/interp_marshal.py

 def loads(space, w_str):
     """Convert a string back to a value.  Extra characters in the string are
 ignored."""
-    space.timer.start("marshal loads")
     u = StringUnmarshaller(space, w_str)
     obj = u.load_w_obj()
-    space.timer.stop("marshal loads")
     return obj
 
 

File pypy/translator/goal/targetpypystandalone.py

     withjit = space.config.objspace.usemodules.pypyjit
 
     def entry_point(argv):
-        space.timer.start("Entrypoint")
         if withjit:
             from pypy.jit.backend.hlinfo import highleveljitinfo
             highleveljitinfo.sys_executable = argv[0]
             argv = argv[:1] + argv[3:]
         try:
             try:
-                space.timer.start("space.startup")
                 space.call_function(w_run_toplevel, w_call_startup_gateway)
-                space.timer.stop("space.startup")
                 w_executable = space.wrap(argv[0])
                 w_argv = space.newlist([space.wrap(s) for s in argv[1:]])
-                space.timer.start("w_entry_point")
                 w_exitcode = space.call_function(w_entry_point, w_executable, w_argv)
-                space.timer.stop("w_entry_point")
                 exitcode = space.int_w(w_exitcode)
                 # try to pull it all in
             ##    from pypy.interpreter import main, interactive, error
                 return 1
         finally:
             try:
-                space.timer.start("space.finish")
                 space.call_function(w_run_toplevel, w_call_finish_gateway)
-                space.timer.stop("space.finish")
             except OperationError, e:
                 debug("OperationError:")
                 debug(" operror-type: " + e.w_type.getname(space))
                 debug(" operror-value: " + space.str_w(space.str(e.get_w_value(space))))
                 return 1
-        space.timer.stop("Entrypoint")
-        space.timer.dump()
         return exitcode
     return entry_point