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

Unified Diff: src/hydrogen.cc

Issue 6696070: Fix hydrogen statistics output when no code gets optimized. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 7347)
+++ src/hydrogen.cc (working copy)
@@ -5811,9 +5811,14 @@
PrintF(" %8u bytes / %4.1f %%\n", size, size_percent);
}
double source_size_in_kb = static_cast<double>(source_size_) / 1024;
+ double normalized_time = source_size_in_kb > 0
+ ? (static_cast<double>(sum) / 1000) / source_size_in_kb
+ : 0;
+ double normalized_bytes = source_size_in_kb > 0
+ ? total_size_ / source_size_in_kb
+ : 0;
PrintF("%30s - %7.3f ms %7.3f bytes\n", "Sum",
- (static_cast<double>(sum) / 1000) / source_size_in_kb,
- total_size_ / source_size_in_kb);
+ normalized_time, normalized_bytes);
PrintF("---------------------------------------------------------------\n");
PrintF("%30s - %7.3f ms (%.1f times slower than full code gen)\n",
"Total",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698