Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 91f2ecfd57e2f0f72f443f6b5e5bd3e2f7efb6af..7607474d23ec075396918127e918550cc76871ef 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -13,6 +13,8 @@ |
#include "src/code-stubs.h" |
#include "src/deoptimizer.h" |
#include "src/global-handles.h" |
+#include "src/interpreter/bytecodes.h" |
+#include "src/interpreter/interpreter.h" |
#include "src/log-inl.h" |
#include "src/log-utils.h" |
#include "src/macro-assembler.h" |
@@ -1525,6 +1527,8 @@ void Logger::LogCodeObject(Object* object) { |
case AbstractCode::INTERPRETED_FUNCTION: |
case AbstractCode::OPTIMIZED_FUNCTION: |
return; // We log this later using LogCompiledFunctions. |
+ case AbstractCode::BYTECODE_HANDLER: |
+ return; // We log it later by walking the dispatch table. |
case AbstractCode::BINARY_OP_IC: // fall through |
case AbstractCode::COMPARE_IC: // fall through |
case AbstractCode::TO_BOOLEAN_IC: // fall through |
@@ -1598,6 +1602,18 @@ void Logger::LogCodeObjects() { |
} |
} |
+void Logger::LogBytecodeHandlers() { |
+ if (!FLAG_ignition) return; |
+ |
+ const int last_index = static_cast<int>(interpreter::Bytecode::kLast); |
+ for (int index = 0; index <= last_index; ++index) { |
+ interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(index); |
+ Code* code = isolate_->interpreter()->GetBytecodeHandler(bytecode); |
+ CodeCreateEvent(Logger::BYTECODE_HANDLER_TAG, AbstractCode::cast(code), |
+ interpreter::Bytecodes::ToString(bytecode)); |
+ } |
+} |
+ |
void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, |
Handle<AbstractCode> code) { |
Handle<String> func_name(shared->DebugName()); |