Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: tools/ll_prof.py

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gyp/v8.gyp ('k') | tools/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ll_prof.py
===================================================================
--- tools/ll_prof.py (revision 7948)
+++ tools/ll_prof.py (working copy)
@@ -784,12 +784,14 @@
return True
-def PrintReport(code_map, library_repo, arch, options):
+def PrintReport(code_map, library_repo, arch, ticks, options):
print "Ticks per symbol:"
used_code = [code for code in code_map.UsedCode()]
used_code.sort(key=lambda x: x.self_ticks, reverse=True)
for i, code in enumerate(used_code):
- print "%10d %s [%s]" % (code.self_ticks, code.FullName(), code.origin)
+ code_ticks = code.self_ticks
+ print "%10d %5.1f%% %s [%s]" % (code_ticks, 100. * code_ticks / ticks,
+ code.FullName(), code.origin)
if options.disasm_all or i < options.disasm_top:
code.PrintAnnotated(arch, options)
print
@@ -797,7 +799,9 @@
mmap_infos = [m for m in library_repo.infos]
mmap_infos.sort(key=lambda m: m.ticks, reverse=True)
for mmap_info in mmap_infos:
- print "%10d %s" % (mmap_info.ticks, mmap_info.unique_name)
+ mmap_ticks = mmap_info.ticks
+ print "%10d %5.1f%% %s" % (mmap_ticks, 100. * mmap_ticks / ticks,
+ mmap_info.unique_name)
def PrintDot(code_map, options):
@@ -882,6 +886,7 @@
if not options.quiet:
print "Generated code architecture: %s" % log_reader.arch
print
+ sys.stdout.flush()
# Process the code and trace logs.
library_repo = LibraryRepo()
@@ -923,7 +928,7 @@
if options.dot:
PrintDot(code_map, options)
else:
- PrintReport(code_map, library_repo, log_reader.arch, options)
+ PrintReport(code_map, library_repo, log_reader.arch, ticks, options)
if not options.quiet:
print
« no previous file with comments | « tools/gyp/v8.gyp ('k') | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698