[pypy-svn] r59878 - pypy/trunk/pypy/translator/tool
antocuni at codespeak.net
antocuni at codespeak.net
Tue Nov 11 22:37:33 CET 2008
Author: antocuni
Date: Tue Nov 11 22:37:30 2008
New Revision: 59878
Modified:
pypy/trunk/pypy/translator/tool/staticsizereport.py
Log:
add a new fake module which contains all pbcs which are unreachables from
graphs
Modified: pypy/trunk/pypy/translator/tool/staticsizereport.py
==============================================================================
--- pypy/trunk/pypy/translator/tool/staticsizereport.py (original)
+++ pypy/trunk/pypy/translator/tool/staticsizereport.py Tue Nov 11 22:37:30 2008
@@ -159,13 +159,25 @@
# report sizes per module
seen = set()
+ reachables = set()
for modulename, nodes in modules:
if count_modules_separately:
seen = set()
if not nodes:
continue
size, typereports = make_report_static_size(database, nodes, by_lltype, seen)
+ reachables.update(seen)
reports.append(ModuleReport(modulename, size, typereports))
+
+
+ allnodes = set([node for node in database.globalcontainers() if node.nodekind != "func"])
+ unreachables = allnodes-reachables
+ if count_modules_separately:
+ seen = set()
+ size, typereports = make_report_static_size(database, unreachables, by_lltype, seen)
+ reports.append(ModuleReport('<unreachable nodes>', size, typereports))
+
+
reports.sort()
reports.reverse()
return reports
More information about the Pypy-commit
mailing list