Commit a3e1decd authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Revert "Stop logging Builtin functions as LazyCompile."

This reverts commit 7dc828b2.

Reason for revert: breaks no-i18n build:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/22340

Original change's description:
> Stop logging Builtin functions as LazyCompile.
> 
> Builtin functions were being logged via both LogCodeObjects and
> LogCompiledFunctions. The latter assumes the code in question has a
> Name and so would end up logging an unattributable entry. This patch
> stops logging that entry.
> 
> Bug: v8:8061
> Change-Id: I20e5a853b8a214a91191fa644083bac7af9dc2c4
> Reviewed-on: https://chromium-review.googlesource.com/1177759
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Bret Sepulveda <bsep@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55302}

TBR=bsep@chromium.org,jgruber@chromium.org,petermarshall@chromium.org

Change-Id: I27e1ed75fea95914640f9618b1fd0c1fd7d8f6a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8061
Reviewed-on: https://chromium-review.googlesource.com/1184981Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55305}
parent 2e0fbb25
......@@ -2231,6 +2231,9 @@ void ExistingCodeLogger::LogExistingFunction(
#endif
CALL_CODE_EVENT_HANDLER(CallbackEvent(shared->DebugName(), entry_point))
}
} else {
CALL_CODE_EVENT_HANDLER(CodeCreateEvent(
tag, *code, *shared, ReadOnlyRoots(isolate_).empty_string()))
}
}
......
......@@ -30,7 +30,6 @@
#include <unordered_set>
#include <vector>
#include "src/api-inl.h"
#include "src/builtins/builtins.h"
#include "src/log-utils.h"
#include "src/log.h"
#include "src/objects-inl.h"
......@@ -165,7 +164,6 @@ class ScopedLoggerInitializer {
return result;
}
void LogCodeObjects() { logger_->LogCodeObjects(); }
void LogCompiledFunctions() { logger_->LogCompiledFunctions(); }
void StringEvent(const char* name, const char* value) {
......@@ -891,29 +889,3 @@ TEST(LogFunctionEvents) {
i::FLAG_log_function_events = false;
isolate->Dispose();
}
TEST(BuiltinsNotLoggedAsLazyCompile) {
SETUP_FLAGS();
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
v8::Isolate* isolate = v8::Isolate::New(create_params);
{
ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
logger.LogCodeObjects();
logger.LogCompiledFunctions();
logger.StopLogging();
i::EmbeddedVector<char, 100> address_buffer;
i::Handle<i::Code> builtin = logger.i_isolate()->builtins()->builtin_handle(
i::Builtins::kStringPrototypeToLowerCaseIntl);
i::SNPrintF(address_buffer, ",0x%" V8PRIxPTR ",%d,",
builtin->InstructionStart(), builtin->InstructionSize());
std::string address(address_buffer.start());
// Should only be logged as "Builtin", not as "LazyCompile".
CHECK(logger.ContainsLine({"code-creation,Builtin,3,", address}));
CHECK(!logger.ContainsLine({"code-creation,LazyCompile,3,", address}));
}
isolate->Dispose();
}
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