Chromium Code Reviews| 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]); |
| + } |
| + } |
|
rmcilroy
2016/03/23 11:04:26
As discussed, maybe we could output json for this
Stefano Sanfilippo
2016/03/23 16:26:26
Done JSON. As of where to move this, I'll start by
|
| printf("+----------------------------------------------------------------+" |
| "-------------+\n"); |
| delete [] counters; |