Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r59174:31a65ad058c9
Date: 2012-12-01 11:07 -0800
http://bitbucket.org/pypy/pypy/changeset/31a65ad058c9/
Log: remove long-unused space.timing option
diff --git a/pypy/config/pypyoption.py b/pypy/config/pypyoption.py
--- a/pypy/config/pypyoption.py
+++ b/pypy/config/pypyoption.py
@@ -196,10 +196,6 @@
"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),
diff --git a/pypy/doc/config/objspace.timing.txt
b/pypy/doc/config/objspace.timing.txt
deleted file mode 100644
--- a/pypy/doc/config/objspace.timing.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-timing of various parts of the interpreter (simple profiling)
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1,4 +1,3 @@
-import pypy
from pypy.interpreter.executioncontext import ExecutionContext, ActionFlag
from pypy.interpreter.executioncontext import UserDelAction, FrameTraceAction
from pypy.interpreter.error import OperationError, operationerrfmt
@@ -10,10 +9,8 @@
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']
@@ -325,11 +322,6 @@
self.bytecodecounts = [0] * 256
self.bytecodetransitioncount = {}
- if self.config.objspace.timing:
- self.timer = Timer()
- else:
- self.timer = DummyTimer()
-
self.initialize()
def startup(self):
@@ -349,9 +341,7 @@
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()
@@ -458,9 +448,7 @@
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):
diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -238,7 +238,6 @@
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,
@@ -277,13 +276,11 @@
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):
diff --git a/pypy/module/marshal/interp_marshal.py
b/pypy/module/marshal/interp_marshal.py
--- a/pypy/module/marshal/interp_marshal.py
+++ b/pypy/module/marshal/interp_marshal.py
@@ -50,10 +50,8 @@
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
diff --git a/pypy/translator/goal/targetpypystandalone.py
b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -29,7 +29,6 @@
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]
@@ -48,14 +47,10 @@
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
@@ -68,16 +63,12 @@
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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit