6956482764
5 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Camillo Bruni
|
6956482764 |
[counters] Improve v8.execute histogram timer
- Mark uncommon timer-paths as V8_NOINLINE - Add explicit LongTaskNestedTimedHistogramScope class - Use explicit LongTaskRecordMode enum - Mark a few more isolate methods as const - Add more timer scopes: - Accessors::ArrayLengthSetter - v8::NewContext Bug: v8:12498, chromium:1275056 Change-Id: I7896ee341c3c3a1fd5acf8f3f59347ff01dda9c0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338258 Reviewed-by: Marja Hölttä <marja@chromium.org> Auto-Submit: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#78372} |
||
Camillo Bruni
|
ce02d2f452 |
[api] Add LongTaskStats::v8_execute_us
The execute_us is now tied to the --slow-histograms flag. This currently enabled on a small population as a persistent finch study which should give us enough coverage for now. Drive-by-fixes: - Rename counter: execute_precise() to execute() - Avoid Leave/Enter overhead in NestedTimedHistogramScope if the histogram is not enabled - Only stop timers in debug mode for NestedTimedHistogramScope Bug: chromium:1275056 Change-Id: Id6a492bdd68edb5194cb191c7083829a9f90283f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320431 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#78318} |
||
Camillo Bruni
|
f688fe086f |
Reland "[counters] Fix reentrant timers for V8.Execute"
This is a reland of
|
||
Leszek Swirski
|
a12c6fa2ea |
Revert "[counters] Fix reentrant timers for V8.Execute"
This reverts commit
|
||
Camillo Bruni
|
fffcbaea55 |
[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} |