Bug 1664475: Add telemetry probes to collect data for script delazification, xdr encoding time, bytecode caching time, and baseline compilation time. r=nbp,Dexter,sefeng,smaug

Differential Revision: https://phabricator.services.mozilla.com/D90798
This commit is contained in:
Denis Palmeiro
2020-10-08 13:46:29 +00:00
parent 957dea8984
commit 759ed522ab
15 changed files with 305 additions and 16 deletions

View File

@@ -3140,6 +3140,8 @@ void ScriptLoader::EncodeBytecode() {
return;
}
TimeStamp startTime = TimeStamp::Now();
AutoEntryScript aes(globalObject, "encode bytecode", true);
RefPtr<ScriptLoadRequest> request;
while (!mBytecodeEncodingQueue.isEmpty()) {
@@ -3148,6 +3150,10 @@ void ScriptLoader::EncodeBytecode() {
request->mScriptBytecode.clearAndFree();
request->DropBytecodeCacheReferences();
}
TimeDuration delta = TimeStamp::Now() - startTime;
Telemetry::Accumulate(Telemetry::JS_BYTECODE_CACHING_TIME,
static_cast<uint32_t>(delta.ToMilliseconds()));
}
void ScriptLoader::EncodeRequestBytecode(JSContext* aCx,