[pypy-commit] pypy vecopt: setting to safe default
plan_rich
noreply at buildbot.pypy.org
Wed Jun 24 08:57:20 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt
Changeset: r78279:1bd1ae3b3117
Date: 2015-06-24 08:57 +0200
http://bitbucket.org/pypy/pypy/changeset/1bd1ae3b3117/
Log: setting to safe default
diff --git a/rpython/jit/metainterp/warmspot.py b/rpython/jit/metainterp/warmspot.py
--- a/rpython/jit/metainterp/warmspot.py
+++ b/rpython/jit/metainterp/warmspot.py
@@ -33,25 +33,25 @@
# XXX XXX XXX
class XXXBench(object):
- def __init__(self, name, id, vec):
+ def __init__(self, name, uid, vec):
self.t = []
- self.name = name
- self.unique_id = hex(id)
+ if name is None:
+ name = "<unkown>"
+ if uid is None:
+ uid = 0
+ self.name = str(name)
+ self.unique_id = hex(uid)
self.vec = vec
def xxx_clock_start(self):
- if not self.vec:
- return
now = time.clock()
self.t.append(now)
debug_start("xxx-clock-start")
- debug_print("name: %s id(jdsd): %s now: %dns" % \
+ debug_print("name: %s id: %s now: %dns" % \
(self.name, self.unique_id, int(now)*10**9) )
debug_stop("xxx-clock-start")
def xxx_clock_stop(self, fail=False):
- if not self.vec:
- return
end = time.clock()
if len(self.t) == 0:
return
@@ -60,7 +60,7 @@
del self.t[-1]
ns = (end - start) * 10**9
debug_start("xxx-clock-stop")
- debug_print("name: %s id(jdsd): %s now: %dns exe time: %dns fail? %d vec? %d" % \
+ debug_print("name: %s id: %s now: %dns exe time: %dns fail? %d vec? %d" % \
(self.name, self.unique_id, int(end)*10**9, int(ns), int(fail), int(self.vec)))
debug_stop("xxx-clock-stop")
More information about the pypy-commit
mailing list