Commit 1ba58b4d authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[snapshot] Emit embedded blob code data start as function symbol

The UMA sampling profiler needs a way to detect the beginning of the
embedded builtins code range; a plain symbol is not enough, but a
function symbol should be good.

This changes (x64)

 v8_Default_embedded_blob_code_data_:

to

 v8_Default_embedded_blob_code_data_:
 .type v8_Default_embedded_blob_code_data_, @function
 .size v8_Default_embedded_blob_code_data_, 0

Bug: v8:6666
Change-Id: I5dce3aaca0f36e15ad4339e20fbbdc76282a289e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450058
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70330}
parent acf5e1aa
......@@ -192,7 +192,14 @@ class EmbeddedFileWriter : public EmbeddedFileWriterInterface {
w->Comment("instruction streams.");
w->SectionText();
w->AlignToCodeAlignment();
w->DeclareLabel(EmbeddedBlobCodeDataSymbol().c_str());
// UMA needs an exposed function-type label at the start of the embedded
// code section, thus this label is declared as a function (otherwise we
// could use DeclareLabel).
static constexpr int kDummyFunctionLength = 0;
w->DeclareFunctionBegin(EmbeddedBlobCodeDataSymbol().c_str(),
kDummyFunctionLength);
w->DeclareFunctionEnd(EmbeddedBlobCodeDataSymbol().c_str());
for (int i = 0; i < i::Builtins::builtin_count; i++) {
if (!blob->ContainsBuiltin(i)) continue;
......
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