Commit dc5dbc22 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[snapshot] Emit code create event for lazy deserialized builtins.

Bug: v8:6986
Change-Id: I2fd6a7d2dfc229792c734e24eba4b797f19d8ca3
Reviewed-on: https://chromium-review.googlesource.com/734240Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48866}
parent a9da0ce7
......@@ -254,6 +254,9 @@ class Logger : public CodeEventListener {
// Callback from Log, stops profiling in case of insufficient resources.
void LogFailure();
// Used for logging stubs found in the snapshot.
void LogCodeObject(Object* code_object);
private:
explicit Logger(Isolate* isolate);
~Logger();
......@@ -270,9 +273,6 @@ class Logger : public CodeEventListener {
void MoveEventInternal(CodeEventListener::LogEventsAndTags event,
Address from, Address to);
// Used for logging stubs found in the snapshot.
void LogCodeObject(Object* code_object);
// Helper method. It resets name_buffer_ and add tag name into it.
void InitNameBuffer(CodeEventListener::LogEventsAndTags tag);
......
......@@ -108,6 +108,10 @@ Code* Snapshot::DeserializeBuiltin(Isolate* isolate, int builtin_id) {
Builtins::name(builtin_id), bytes, ms);
}
if (isolate->logger()->is_logging_code_events() || isolate->is_profiling()) {
isolate->logger()->LogCodeObject(code);
}
return code;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment