• Leszek Swirski's avatar
    Revert "[counters] Fix reentrant timers for V8.Execute" · a12c6fa2
    Leszek Swirski authored
    This reverts commit fffcbaea.
    
    Reason for revert: Breaks in Chromium (e.g. https://ci.chromium.org/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20%28NVIDIA%29)
    
    Original change's description:
    > [counters] Fix reentrant timers for V8.Execute
    >
    > This CL fixes a long standing issue where reentering TimedHistograms
    > scopes would cause spurious measurements. Only the non-nested scopes
    > yielded correct results.
    >
    > Due to the changed numbers, the V8.Execute histogram is renamed to
    > V8.ExecuteMicroSeconds. Note that this histogram is also guarded
    > behind the --slow-histograms flag due to the additional overhead.
    >
    > Unlike before, it does no longer include time for external callbacks
    > and only measures self time. The following example illustrates the
    > new behaviour:
    >
    > 1. Enter V8:           |--+.......+--| self-time: 4 units (reported)
    > 2. Exit V8 (callback):    |-+...+-|    self-time: 2 units (ignored)
    > 3. Re-enter V8:             |---|      self-time: 3 units (reported)
    >
    > This would result in 2 histogram entries with 4 time units for the first
    > V8 slice and 3 units for the nested part. Note that the callback time
    > itself is ignored.
    >
    > This CL attempts to clean up how TimedHistograms work:
    > - Histogram: the base class
    > - TimedHistograms: used for time-related histograms that are not nested
    > - NestedTimeHistograms: Extends TimedHistograms and is used for nested
    >   histograms
    >
    > This CL changes Histograms to not measure time themselves. Measurements
    > happen in the *HistogramScopes:
    > - BaseTimedHistogramScope: Base functionality
    > - TimedHistogramScope: For non-nested measurements
    > - NestedTimedHistogramScope: For nested measurements
    > - PauseNestedTimedHistogramScope: Ignore time during a given scope.
    >   This is used to pause timers during callbacks.
    >
    > Additional changes:
    > - ExternalCallbackScope now contains a PauseNestedTimedHistogramScope
    >   and always sets VMState<EXTERNAL>
    >
    > Bug: v8:11946
    > Change-Id: I45e4b7ff77b5948b605dd50539044cb26222fa21
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3001345
    > Reviewed-by: Omer Katz <omerkatz@chromium.org>
    > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    > Reviewed-by: Victor Gomes <victorgomes@chromium.org>
    > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#76111}
    
    Bug: v8:11946
    Change-Id: I954de1afbabf101fb5d4f52eca0d3b80a723385b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3077153
    Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Owners-Override: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#76138}
    a12c6fa2
Name
Last commit
Last update
..
baseline Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
branch-hint-map.h Loading commit data...
c-api.cc Loading commit data...
c-api.h Loading commit data...
code-space-access.cc Loading commit data...
code-space-access.h Loading commit data...
compilation-environment.h Loading commit data...
decoder.h Loading commit data...
function-body-decoder-impl.h Loading commit data...
function-body-decoder.cc Loading commit data...
function-body-decoder.h Loading commit data...
function-compiler.cc Loading commit data...
function-compiler.h Loading commit data...
graph-builder-interface.cc Loading commit data...
graph-builder-interface.h Loading commit data...
init-expr-interface.cc Loading commit data...
init-expr-interface.h Loading commit data...
jump-table-assembler.cc Loading commit data...
jump-table-assembler.h Loading commit data...
leb-helper.h Loading commit data...
local-decl-encoder.cc Loading commit data...
local-decl-encoder.h Loading commit data...
memory-protection-key.cc Loading commit data...
memory-protection-key.h Loading commit data...
memory-tracing.cc Loading commit data...
memory-tracing.h Loading commit data...
module-compiler.cc Loading commit data...
module-compiler.h Loading commit data...
module-decoder.cc Loading commit data...
module-decoder.h Loading commit data...
module-instantiate.cc Loading commit data...
module-instantiate.h Loading commit data...
object-access.h Loading commit data...
signature-map.cc Loading commit data...
signature-map.h Loading commit data...
simd-shuffle.cc Loading commit data...
simd-shuffle.h Loading commit data...
streaming-decoder.cc Loading commit data...
streaming-decoder.h Loading commit data...
struct-types.h Loading commit data...
sync-streaming-decoder.cc Loading commit data...
value-type.cc Loading commit data...
value-type.h Loading commit data...
wasm-arguments.h Loading commit data...
wasm-code-manager.cc Loading commit data...
wasm-code-manager.h Loading commit data...
wasm-constants.h Loading commit data...
wasm-debug.cc Loading commit data...
wasm-debug.h Loading commit data...
wasm-engine.cc Loading commit data...
wasm-engine.h Loading commit data...
wasm-external-refs.cc Loading commit data...
wasm-external-refs.h Loading commit data...
wasm-feature-flags.h Loading commit data...
wasm-features.cc Loading commit data...
wasm-features.h Loading commit data...
wasm-import-wrapper-cache.cc Loading commit data...
wasm-import-wrapper-cache.h Loading commit data...
wasm-init-expr.cc Loading commit data...
wasm-init-expr.h Loading commit data...
wasm-js.cc Loading commit data...
wasm-js.h Loading commit data...
wasm-limits.h Loading commit data...
wasm-linkage.h Loading commit data...
wasm-module-builder.cc Loading commit data...
wasm-module-builder.h Loading commit data...
wasm-module-sourcemap.cc Loading commit data...
wasm-module-sourcemap.h Loading commit data...
wasm-module.cc Loading commit data...
wasm-module.h Loading commit data...
wasm-objects-inl.h Loading commit data...
wasm-objects.cc Loading commit data...
wasm-objects.h Loading commit data...
wasm-objects.tq Loading commit data...
wasm-opcodes-inl.h Loading commit data...
wasm-opcodes.cc Loading commit data...
wasm-opcodes.h Loading commit data...
wasm-result.cc Loading commit data...
wasm-result.h Loading commit data...
wasm-serialization.cc Loading commit data...
wasm-serialization.h Loading commit data...
wasm-subtyping.cc Loading commit data...
wasm-subtyping.h Loading commit data...
wasm-tier.h Loading commit data...
wasm-value.h Loading commit data...