[wasm] Avoid allocating SharedFunctionInfo for logging.

R=herhut@chromium.org

Change-Id: I6fd915a66cd4993a8934e09575464cce2a17d404
Reviewed-on: https://chromium-review.googlesource.com/970475
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52110}
This commit is contained in:
Michael Starzinger 2018-03-20 15:21:14 +01:00 committed by Commit Bot
parent 8add369a99
commit fc766889a9

View File

@ -4619,12 +4619,7 @@ void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,
va_end(arguments);
Handle<String> name_str =
isolate->factory()->NewStringFromAsciiChecked(buffer.start());
Handle<String> script_str =
isolate->factory()->NewStringFromAsciiChecked("(wasm)");
Handle<SharedFunctionInfo> shared =
isolate->factory()->NewSharedFunctionInfo(name_str, code, false);
PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared,
*script_str, 0, 0));
PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *name_str));
}
} // namespace