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

Unified Diff: src/isolate.cc

Issue 753483002: dump compiler stats from d8 on direct exit from js (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « src/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index f5f83d6cfa96d2acf7f740ccf53d04c684d07a74..d7bfad6f16a18e58f08e0ae4a40e7bf1c1ddc23e 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1743,11 +1743,7 @@ void Isolate::Deinit() {
heap_.mark_compact_collector()->EnsureSweepingCompleted();
}
- if (turbo_statistics() != NULL) {
- OFStream os(stdout);
- os << *turbo_statistics() << std::endl;
- }
- if (FLAG_hydrogen_stats) GetHStatistics()->Print();
+ DumpAndResetCompilationStats();
if (FLAG_print_deopt_stress) {
PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
@@ -2249,6 +2245,19 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) {
}
+void Isolate::DumpAndResetCompilationStats() {
+ if (turbo_statistics() != nullptr) {
+ OFStream os(stdout);
+ os << *turbo_statistics() << std::endl;
+ }
+ if (hstatistics() != nullptr) hstatistics()->Print();
+ delete turbo_statistics_;
+ turbo_statistics_ = nullptr;
+ delete hstatistics_;
+ hstatistics_ = nullptr;
+}
+
+
HStatistics* Isolate::GetHStatistics() {
if (hstatistics() == NULL) set_hstatistics(new HStatistics());
return hstatistics();
« no previous file with comments | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698