Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 035a626acd2eff1ba4439ae8b322a2fe3ba93af6..a2500c0a6d9e16dfb10ad75a866aea135854b7f3 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2457,8 +2457,17 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) { |
void Isolate::DumpAndResetCompilationStats() { |
if (turbo_statistics() != nullptr) { |
+ DCHECK(FLAG_turbo_stats || FLAG_turbo_stats_nvp); |
+ |
OFStream os(stdout); |
- os << *turbo_statistics() << std::endl; |
+ if (FLAG_turbo_stats) { |
+ AsPrintableStatistics ps = {*turbo_statistics(), false}; |
+ os << ps << std::endl; |
+ } |
+ if (FLAG_turbo_stats_nvp) { |
+ AsPrintableStatistics ps = {*turbo_statistics(), true}; |
+ os << ps << std::endl; |
+ } |
} |
if (hstatistics() != nullptr) hstatistics()->Print(); |
delete turbo_statistics_; |