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

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: Rebasing before committing. 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
« no previous file with comments | « 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 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());
« no previous file with comments | « src/log.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698