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

Unified Diff: src/compiler.cc

Issue 519543002: [WIP] Added CodeEventListener to the sampler API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CallbackEvent also logs as code-creation, added coverage for that. Created 6 years, 4 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/code-stubs.cc ('k') | src/cpu-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 92f8c11a190921e96674e795e63032f3374d24b0..c6b463b2677e9433caf8fb777a46e53f9fd430f1 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -846,6 +846,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
PROFILE(isolate, CodeCreateEvent(
log_tag, *info->code(), *result, info, *script_name));
+ isolate->CodeCreateEvent(*info->code(), *script_name);
GDBJIT(AddCode(script_name, script, info->code(), info));
// Hint to the runtime system used when allocating space for initial
@@ -1261,7 +1262,8 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
// script name and line number. Check explicitly whether logging is
// enabled as finding the line number is not free.
if (info->isolate()->logger()->is_logging_code_events() ||
- info->isolate()->cpu_profiler()->is_profiling()) {
+ info->isolate()->cpu_profiler()->is_profiling() ||
+ info->isolate()->code_event_handler() != NULL) {
Handle<Script> script = info->script();
Handle<Code> code = info->code();
if (code.is_identical_to(
@@ -1277,6 +1279,8 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
PROFILE(info->isolate(), CodeCreateEvent(
log_tag, *code, *shared, info, script_name, line_num, column_num));
+ info->isolate()->CodeCreateEvent(*code, *shared, script_name,
+ line_num, column_num);
}
GDBJIT(AddCode(Handle<String>(shared->DebugName()),
« no previous file with comments | « src/code-stubs.cc ('k') | src/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698