[pypy-commit] pypy vecopt: some changes after being tested with test_zjit
plan_rich
noreply at buildbot.pypy.org
Tue Jun 23 14:46:53 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt
Changeset: r78262:fefc4fafe4f6
Date: 2015-06-23 14:47 +0200
http://bitbucket.org/pypy/pypy/changeset/fefc4fafe4f6/
Log: some changes after being tested with test_zjit
diff --git a/rpython/jit/metainterp/optimizeopt/vectorize.py b/rpython/jit/metainterp/optimizeopt/vectorize.py
--- a/rpython/jit/metainterp/optimizeopt/vectorize.py
+++ b/rpython/jit/metainterp/optimizeopt/vectorize.py
@@ -72,7 +72,7 @@
#
ns = int((end-start)*10.0**9)
debug_start("vec-opt-clock")
- debug_print("unroll: %d gso count: %d opcount: (%d -> %d) took %fns" % \
+ debug_print("unroll: %d gso count: %d opcount: (%d -> %d) took %dns" % \
(opt.unroll_count+1,
gso.strength_reduced,
len(orig_ops),
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
@@ -36,22 +36,29 @@
def __init__(self, name, id, vec):
self.t = []
self.name = name
- self.unique_id = id
+ self.unique_id = hex(id)
self.vec = vec
def xxx_clock_start(self):
- self.t.append(time.clock())
+ now = time.clock()
+ self.t.append(now)
+ debug_start("xxx-clock-start")
+ debug_print("name: %s id(jdsd): %s now: %dns" % \
+ (self.name, self.unique_id, int(now*10**9)))
+ debug_stop("xxx-clock-start")
def xxx_clock_stop(self, fail=False):
end = time.clock()
if len(self.t) == 0:
- raise AssertionError("trying to stop clock but timing for jit driver sd has never started")
+ return
+ assert len(self.t) == 1
start = self.t[-1]
- del self.t[-1]
+ if not fail:
+ del self.t[-1]
ns = (end - start) * 10**9
debug_start("xxx-clock-stop")
- debug_print("name: %s id(jdsd): %s exe time: %dns fail? %d vec? %d" % \
- (self.name, self.unique_id, int(ns), int(fail), int(self.vec)))
+ debug_print("name: %s id(jdsd): %s now: %ns 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