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

Unified Diff: src/d8.cc

Issue 1817033002: [Interpreter] Add dispatch counters for each bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-abort
Patch Set: Rebase on master. Created 4 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
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index d7e1b6ab06e6fa67638dd74f89434b5c78f6b404..0ce0d5b1d8f1f29487c56f6884870e1efb63c500 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -9,6 +9,7 @@
#endif
#include <errno.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
@@ -41,6 +42,7 @@
#include "src/base/platform/platform.h"
#include "src/base/sys-info.h"
#include "src/basic-block-profiler.h"
+#include "src/interpreter/interpreter.h"
#include "src/snapshot/natives.h"
#include "src/utils.h"
#include "src/v8.h"
@@ -1335,6 +1337,20 @@ void Shell::OnExit(v8::Isolate* isolate) {
printf("| %-62s | %11i |\n", key, counter->count());
}
}
+ if (i::FLAG_ignition_count_handler_dispatches) {
+ uint32_t* handler_dispatch_counters =
+ reinterpret_cast<i::Isolate*>(isolate)
+ ->interpreter()
+ ->handlers_dispatch_counters();
+ for (int i = 0; i <= static_cast<int>(i::interpreter::Bytecode::kLast);
+ ++i) {
+ i::interpreter::Bytecode bytecode =
+ i::interpreter::Bytecodes::FromByte(i);
+ printf("| c:V8.Ignition_DispatchCounter_%-32s | %11" PRIu32 " |\n",
+ i::interpreter::Bytecodes::ToString(bytecode),
+ handler_dispatch_counters[i]);
+ }
+ }
printf("+----------------------------------------------------------------+"
"-------------+\n");
delete [] counters;

Powered by Google App Engine
This is Rietveld 408576698