Skip to content

Commit 5ee115f

Browse files
LeszekSwirskiCommit Bot
authored andcommitted
[uma] Add histogram for streaming compile finalization
Measure finalization time for streaming JS compilation (to measure impact of off-thread streaming finalization). Bug: chromium:865098 Bug: chromium:1011762 Change-Id: Idc89ea18e55fec87ac7e8cca28925820e0c56b84 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1844783 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#64190}
1 parent 151fd02 commit 5ee115f

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/codegen/compiler.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,12 @@ struct ScriptCompileTimerScope {
19111911
case CacheBehaviour::kConsumeCodeCache:
19121912
return isolate_->counters()->compile_script_with_consume_cache();
19131913

1914+
// Note that this only counts the finalization part of streaming, the
1915+
// actual streaming compile is counted by BackgroundCompileTask into
1916+
// "compile_script_on_background".
1917+
case CacheBehaviour::kNoCacheBecauseStreamingSource:
1918+
return isolate_->counters()->compile_script_streaming_finalization();
1919+
19141920
case CacheBehaviour::kNoCacheBecauseInlineScript:
19151921
return isolate_->counters()
19161922
->compile_script_no_cache_because_inline_script();
@@ -1930,9 +1936,6 @@ struct ScriptCompileTimerScope {
19301936
// TODO(leszeks): Consider counting separately once modules are more
19311937
// common.
19321938
case CacheBehaviour::kNoCacheBecauseModule:
1933-
// TODO(leszeks): Count separately or remove entirely once we have
1934-
// background compilation.
1935-
case CacheBehaviour::kNoCacheBecauseStreamingSource:
19361939
case CacheBehaviour::kNoCacheBecauseV8Extension:
19371940
case CacheBehaviour::kNoCacheBecauseExtensionModule:
19381941
case CacheBehaviour::kNoCacheBecausePacScript:

src/logging/counters-definitions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ namespace internal {
221221
MICROSECOND) \
222222
HT(compile_script_no_cache_because_cache_too_cold, \
223223
V8.CompileScriptMicroSeconds.NoCache.CacheTooCold, 1000000, MICROSECOND) \
224+
HT(compile_script_streaming_finalization, \
225+
V8.CompileScriptMicroSeconds.StreamingFinalization, 1000000, MICROSECOND) \
224226
HT(compile_script_on_background, \
225227
V8.CompileScriptMicroSeconds.BackgroundThread, 1000000, MICROSECOND) \
226228
HT(compile_function_on_background, \

0 commit comments

Comments
 (0)