Commit 5b0a753d authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[code-cache] Keep track of extensions not caching

Bug: chromium:769203
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Iffb7e92fb9c08c42f03ad28c8defb516454a2d3d
Reviewed-on: https://chromium-review.googlesource.com/753740Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49158}
parent 3f67c138
......@@ -1447,6 +1447,7 @@ class V8_EXPORT ScriptCompiler {
kNoCacheBecauseInspector,
kNoCacheBecauseScriptTooSmall,
kNoCacheBecauseCacheTooCold,
kNoCacheBecauseExtension,
};
/**
......
......@@ -3730,8 +3730,9 @@ bool Genesis::CompileExtension(Isolate* isolate, v8::Extension* extension) {
Compiler::GetSharedFunctionInfoForScript(
source, script_name, 0, 0, ScriptOriginOptions(),
MaybeHandle<Object>(), context, extension, nullptr,
ScriptCompiler::kNoCompileOptions, ScriptCompiler::kNoCacheNoReason,
EXTENSION_CODE, MaybeHandle<FixedArray>());
ScriptCompiler::kNoCompileOptions,
ScriptCompiler::kNoCacheBecauseExtension, EXTENSION_CODE,
MaybeHandle<FixedArray>());
if (!maybe_function_info.ToHandle(&function_info)) return false;
cache->Add(name, function_info);
}
......
......@@ -1244,6 +1244,7 @@ struct ScriptCompileTimerScope {
kNoCacheBecauseCachingDisabled,
kNoCacheBecauseModule,
kNoCacheBecauseStreamingSource,
kNoCacheBecauseExtension,
kCount
};
......@@ -1336,6 +1337,8 @@ struct ScriptCompileTimerScope {
return CacheBehaviour::kNoCacheBecauseModule;
case ScriptCompiler::kNoCacheBecauseStreamingSource:
return CacheBehaviour::kNoCacheBecauseStreamingSource;
case ScriptCompiler::kNoCacheBecauseExtension:
return CacheBehaviour::kNoCacheBecauseExtension;
}
UNREACHABLE();
}
......@@ -1374,6 +1377,7 @@ struct ScriptCompileTimerScope {
// TODO(leszeks): Count separately or remove entirely once we have
// background compilation.
case CacheBehaviour::kNoCacheBecauseStreamingSource:
case CacheBehaviour::kNoCacheBecauseExtension:
return isolate_->counters()->compile_script_no_cache_other();
case CacheBehaviour::kCount:
......
......@@ -1055,7 +1055,7 @@ class RuntimeCallTimerScope {
20) \
HR(wasm_lazy_compilation_throughput, V8.WasmLazyCompilationThroughput, 1, \
10000, 50) \
HR(compile_script_cache_behaviour, V8.CompileScript.CacheBehaviour, 0, 12, 13)
HR(compile_script_cache_behaviour, V8.CompileScript.CacheBehaviour, 0, 13, 14)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
......
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