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

Unified Diff: src/d8.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/d8.h ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index fd80fcdc036795f4dab92cac0be96955683781c3..1c3ff8c4056d3b53b76121d294af0d72f8c0cfcd 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -617,7 +617,7 @@ void Shell::Load(const v8::FunctionCallbackInfo<v8::Value>& args) {
void Shell::Quit(const v8::FunctionCallbackInfo<v8::Value>& args) {
int exit_code = args[0]->Int32Value();
- OnExit();
+ OnExit(args.GetIsolate());
exit(exit_code);
}
@@ -1054,10 +1054,11 @@ inline bool operator<(const CounterAndKey& lhs, const CounterAndKey& rhs) {
#endif // !V8_SHARED
-void Shell::OnExit() {
+void Shell::OnExit(v8::Isolate* isolate) {
LineEditor* line_editor = LineEditor::Get();
if (line_editor) line_editor->Close();
#ifndef V8_SHARED
+ reinterpret_cast<i::Isolate*>(isolate)->DumpAndResetCompilationStats();
if (i::FLAG_dump_counters) {
int number_of_counters = 0;
for (CounterMap::Iterator i(counter_map_); i.More(); i.Next()) {
@@ -1746,7 +1747,7 @@ int Shell::Main(int argc, char* argv[]) {
RunShell(isolate);
}
}
- OnExit();
+ OnExit(isolate);
#ifndef V8_SHARED
// Dump basic block profiling data.
if (i::BasicBlockProfiler* profiler =
« no previous file with comments | « src/d8.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698