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

Unified Diff: src/compiler.cc

Issue 5965011: Basic GDB JIT Interface integration. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: minor formatting cleanup Created 10 years 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/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index e4864e48015df3ef51186b5f814920b6d5364518..a53bf1ba49cb69274e184ffa419f18d6f9e36e5a 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -35,6 +35,7 @@
#include "data-flow.h"
#include "debug.h"
#include "full-codegen.h"
+#include "gdbjit.h"
#include "hydrogen.h"
#include "lithium-allocator.h"
#include "liveedit.h"
@@ -399,6 +400,9 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
OPROFILE(CreateNativeCodeRegion(String::cast(script->name()),
info->code()->instruction_start(),
info->code()->instruction_size()));
+ GDBJIT(AddCode(Handle<String>(String::cast(script->name())),
+ script,
+ info->code()));
} else {
PROFILE(CodeCreateEvent(
info->is_eval()
@@ -409,6 +413,7 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
OPROFILE(CreateNativeCodeRegion(info->is_eval() ? "Eval" : "Script",
info->code()->instruction_start(),
info->code()->instruction_size()));
+ GDBJIT(AddCode(Handle<String>(), script, info->code()));
}
// Allocate function.
@@ -772,6 +777,10 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
code->instruction_size()));
}
}
+
+ GDBJIT(AddCode(name,
+ Handle<Script>(info->script()),
+ Handle<Code>(info->code())));
}
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698