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

Unified Diff: src/serialize.cc

Issue 663453005: Log code event for deserialized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/serialize.h ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index ee0a9ec6a6abbed726b1f935bc41662b1366406f..95d528081fe65be4777f8aa64239298e2b5f86e2 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -2244,6 +2244,18 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize(
}
Handle<SharedFunctionInfo> result(SharedFunctionInfo::cast(root), isolate);
result->set_deserialized(true);
+
+ if (isolate->logger()->is_logging_code_events() ||
+ isolate->cpu_profiler()->is_profiling()) {
+ String* name = isolate->heap()->empty_string();
+ if (result->script()->IsScript()) {
+ Script* script = Script::cast(result->script());
+ if (script->name()->IsString()) name = String::cast(script->name());
+ }
+ isolate->logger()->CodeCreateEvent(Logger::SCRIPT_TAG, result->code(),
+ *result, NULL, name);
+ }
+
return result;
}
« no previous file with comments | « src/serialize.h ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698