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

Unified Diff: src/log.cc

Issue 1772403002: [Interpreter] Log code-creation events for bytecode handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« src/log.h ('K') | « src/log.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 09b731e44774408a75bb9b9bbeb36d1225d23a1b..3450549c0128eb7ebb399d896cacf64e265dcfec 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,16 @@ void Logger::LogCodeObjects() {
}
}
+void Logger::LogBytecodeHandlers() {
rmcilroy 2016/03/08 16:21:57 You should probably guard on FLAG_ignition so this
Stefano Sanfilippo 2016/03/08 17:22:29 Done.
+ 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());
« src/log.h ('K') | « src/log.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698