[pypy-svn] r40828 - in pypy/dist/pypy: jit/hintannotator translator
pedronis at codespeak.net
pedronis at codespeak.net
Tue Mar 20 12:55:04 CET 2007
Author: pedronis
Date: Tue Mar 20 12:55:03 2007
New Revision: 40828
Modified:
pypy/dist/pypy/jit/hintannotator/bookkeeper.py
pypy/dist/pypy/translator/driver.py
Log:
print the number of seen graphs for hint-annotation (the number of specialized copies may vary depending on order issues)
Modified: pypy/dist/pypy/jit/hintannotator/bookkeeper.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/bookkeeper.py (original)
+++ pypy/dist/pypy/jit/hintannotator/bookkeeper.py Tue Mar 20 12:55:03 2007
@@ -50,13 +50,16 @@
bk = self.bookkeeper
if bk.annotator.policy.look_inside_graph(self.origgraph):
graph = copygraph(self.origgraph, varmap=TIMESHIFTMAP)
- bk.nonstubgraphcount += 1
+ if not self._cache:
+ bk.nonstuboriggraphcount += 1
if verbose:
log(str(graph))
else:
log.dot()
else:
graph = self.build_callback_graph(self.origgraph)
+ if not self._cache:
+ bk.stuboriggraphcount += 1
if verbose:
log.stub(str(graph))
else:
@@ -123,7 +126,8 @@
self.tsgraph_maximal_call_families = UnionFind(TsGraphCallFamily)
self.annotator = hannotator
self.tsgraphsigs = {}
- self.nonstubgraphcount = 0
+ self.nonstuboriggraphcount = 0
+ self.stuboriggraphcount = 0
if hannotator is not None: # for tests
t = hannotator.base_translator
self.impurity_analyzer = ImpurityAnalyzer(t)
Modified: pypy/dist/pypy/translator/driver.py
==============================================================================
--- pypy/dist/pypy/translator/driver.py (original)
+++ pypy/dist/pypy/translator/driver.py Tue Mar 20 12:55:03 2007
@@ -362,9 +362,10 @@
[SomeLLAbstractConstant(v.concretetype,
{OriginFlags(): True})
for v in self.portal_graph.getargs()])
- count = hannotator.bookkeeper.nonstubgraphcount
- self.log.info('Hint-annotated %d graphs (plus %d stubs).' % (
- count, len(hannotator.translator.graphs) - count))
+ count = hannotator.bookkeeper.nonstuboriggraphcount
+ stubcount = hannotator.bookkeeper.stuboriggraphcount
+ self.log.info("The hint-annotator saw %d graphs"
+ " (and made stubs for %d graphs)." % (count, stubcount))
n = len(list(hannotator.translator.graphs[0].iterblocks()))
self.log.info("portal has %d blocks" % n)
self.hannotator = hannotator
More information about the Pypy-commit
mailing list