- 07 Sep, 2021 1 commit
-
-
Manos Koukoutos authored
We introduce basic wasm inlining infrastructure behind a flag. The implementation is currently incomplete. Additionally, we always inline the function at index 0; proper inlining heuristics will be added later. Changes: - Rename WasmInliningPhase -> JSWasmInliningPhase - Introduce WasmInliningPhase and WasmInliner. - Pass additional parameters as needed to GenerateCodeForWasmFunction. - Remove EnsureEnd in WasmGraphAssembler. Create end node at the start of compilation. - Add a simple test. Bug: v8:12166 Change-Id: Ifd7006ba378e9f74cd248b71e16869fbbb8a82be Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141575 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/main@{#76689}
-
- 06 Sep, 2021 1 commit
-
-
Leszek Swirski authored
Remove the BaselineData intermediate structure for baseline code, and write the baseline Code object into the SharedFunctionInfo directly. We still need a pointer to the BytecodeArray/InterpreterData, so re-use the Code object's deoptimization data slot for this (baseline code doesn't have deoptimization data). A consequence of this is that the BytecodeArray pointer becomes immutable when there is baseline code. This means that we cannot install a debug BytecodeArray while baseline code is active (we have to flush it first), and we can't tier-up code with debug BytecodeArray to baseline. Change-Id: I53b93ec4d4c64b833603d7992f246982fcd97596 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118548 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#76675}
-
- 24 Aug, 2021 1 commit
-
-
Dan Elphick authored
This is a reland of d1b27019 Fixes include: Adding missing file to bazel build Forward-declaring classing before friend-classing them to fix win/gcc Add missing v8-isolate.h include for vtune builds Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit Bug: v8:11965 Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76460}
-
- 23 Aug, 2021 2 commits
-
-
Dan Elphick authored
This reverts commit d1b27019. Reason for revert: Broke vtune build, tsan build and possibly others Original change's description: > [include] Split out v8.h > > This moves every single class/function out of include/v8.h into a > separate header in include/, which v8.h then includes so that > externally nothing appears to have changed. > > Every include of v8.h from inside v8 has been changed to a more > fine-grained include. > > Previously inline functions defined at the bottom of v8.h would call > private non-inline functions in the V8 class. Since that class is now > in v8-initialization.h and is rarely included (as that would create > dependency cycles), this is not possible and so those methods have been > moved out of the V8 class into the namespace v8::api_internal. > > None of the previous files in include/ now #include v8.h, which means > if embedders were relying on this transitive dependency then it will > give compile failures. > > v8-inspector.h does depend on v8-scripts.h for the time being to ensure > that Chrome continue to compile but that change will be reverted once > those transitive #includes in chrome are changed to include it directly. > > Full design: > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing > > Bug: v8:11965 > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Camillo Bruni <cbruni@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Dan Elphick <delphick@chromium.org> > Cr-Commit-Position: refs/heads/main@{#76424} Bug: v8:11965 Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627 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/main@{#76428}
-
Dan Elphick authored
This moves every single class/function out of include/v8.h into a separate header in include/, which v8.h then includes so that externally nothing appears to have changed. Every include of v8.h from inside v8 has been changed to a more fine-grained include. Previously inline functions defined at the bottom of v8.h would call private non-inline functions in the V8 class. Since that class is now in v8-initialization.h and is rarely included (as that would create dependency cycles), this is not possible and so those methods have been moved out of the V8 class into the namespace v8::api_internal. None of the previous files in include/ now #include v8.h, which means if embedders were relying on this transitive dependency then it will give compile failures. v8-inspector.h does depend on v8-scripts.h for the time being to ensure that Chrome continue to compile but that change will be reverted once those transitive #includes in chrome are changed to include it directly. Full design: https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing Bug: v8:11965 Change-Id: I53b84b29581632710edc80eb11f819c2097a2877 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76424}
-
- 16 Aug, 2021 3 commits
-
-
Ng Zhi An authored
This is a reland of a3b2c4ec The fix is in PS3, for UBSan. We use WriteUnalignedValue for potentially unaligned memory writes. Original change's description: > [wasm][diagnostics] Support WasmCode in gdb JIT integration > > - Add new enum WASM_CODE to JitCodeEvent::CodeType > - Use AddressRegion instead of AddressRange (remove the latter) > - Change CodeDescription constructor to take an AddressRegion, > both JIT_CODE and WASM_CODE use this > - Add a simple mjsunit test that sets --gdbjit to check that > we don't crash. > - Add a api test for adding WASM_CODE > > Bug: v8:11908 > Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754 > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Commit-Queue: Zhi An Ng <zhin@chromium.org> > Cr-Commit-Position: refs/heads/master@{#76271} Bug: v8:11908 Change-Id: I5ded6d01cff40803b2f70525163f760edcf97165 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093506Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#76327}
-
Yu Yin authored
Bug: v8:12008 Change-Id: I2e1d918a1370dae1e15919fbf02d69cbe48f63bf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089095Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#76308}
-
Camillo Bruni authored
This reverts commit 91c8be95. RCS should not be exposed through the API or the inspector protocol as they are meant as an internal debugging feature. The only regularly tested and supported way is through chrome-tracing. Given that this was used mostly for an experiment to analyse chrome's performance, we can use pprof support as a replacement. Original change's description: > [DevTools] Implemented DevTools protocol API to retrieve V8 RunTime Call Stats. > > The new APIs are: > enableRuntimeCallStats > disableRuntimeCallStats > getRuntimeCallStats > > The RunTime Call Stats are collected per isolate. > > Change-Id: I7e520e2c866288aa9f9dc74f12572abedf0d3ac8 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1881601 > Commit-Queue: Peter Kvitek <kvitekp@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Cr-Commit-Position: refs/heads/master@{#64784} Change-Id: Ia7575436e97d3420dd7e68414d89477e6a86bb05 Bug: v8:11395 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2998585Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#76297}
-
- 12 Aug, 2021 2 commits
-
-
Zhi An Ng authored
This reverts commit a3b2c4ec. Reason for revert: UBSan https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8839060153390139249/+/u/Check/gdbjit Original change's description: > [wasm][diagnostics] Support WasmCode in gdb JIT integration > > - Add new enum WASM_CODE to JitCodeEvent::CodeType > - Use AddressRegion instead of AddressRange (remove the latter) > - Change CodeDescription constructor to take an AddressRegion, > both JIT_CODE and WASM_CODE use this > - Add a simple mjsunit test that sets --gdbjit to check that > we don't crash. > - Add a api test for adding WASM_CODE > > Bug: v8:11908 > Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754 > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Commit-Queue: Zhi An Ng <zhin@chromium.org> > Cr-Commit-Position: refs/heads/master@{#76271} Bug: v8:11908 Change-Id: Ic1a74a9239e8ef6107efd36f61c089ae6bfc5b6c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093365 Auto-Submit: Zhi An Ng <zhin@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#76274}
-
Ng Zhi An authored
- Add new enum WASM_CODE to JitCodeEvent::CodeType - Use AddressRegion instead of AddressRange (remove the latter) - Change CodeDescription constructor to take an AddressRegion, both JIT_CODE and WASM_CODE use this - Add a simple mjsunit test that sets --gdbjit to check that we don't crash. - Add a api test for adding WASM_CODE Bug: v8:11908 Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#76271}
-
- 11 Aug, 2021 1 commit
-
-
Clemens Backes authored
This adds dedicated histograms for measuring the memory consumption and compilation time for compiling "huge functions". Those are functions with a body of more than 100kB. They are a *very* small fraction of all functions (<0.01% according to current data), but their compile time is often unproportionally large. Since they would just disappear in the overall histograms, this CL adds dedicated histograms to make the compile time and memory consumption of those functions more visible. R=ecmziegler@chromium.org Bug: chromium:1238828 Change-Id: I30bd07792ef4d9d67ff60c49c9edd0892c5c6e6d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089166Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#76239}
-
- 09 Aug, 2021 2 commits
-
-
Camillo Bruni authored
This is a reland of fffcbaea Additional fixes: - Relax IsStarted DCHECKs in ElapsedTimer for paused_elapsed - Add LogEventStatus enum in the API for better testing - Rename Logger::StartEnd enum values to kXXX - Add additional NestedTimedHistogramScope tests 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: Ic2eef7456fbc245febcf780b23418f6ab0bebdb7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3080566 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#76180}
-
Ng Zhi An authored
In gdbbjit's event handler, we return early if code_type is not JIT_CODE. Unfortunately, in all CodeLinePosInfo event, we memset the struct, so code_type is always BYTE_CODE, so no line information was getting saved. Drive-by clean up to aggregate initialize JitCodeEvent. Since the initializer list is empty, all members are value-initialized, and in this case, zero-initialized. Bug: v8:12035 Change-Id: I67df2688f13fafbb0806546568eb2574ac8d5e2e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3071909Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#76179}
-
- 06 Aug, 2021 1 commit
-
-
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}
-
- 05 Aug, 2021 2 commits
-
-
Jakob Gruber authored
Optimizing compilation can no longer collect source positions on demand since it may now run concurrently without serialization. Instead, we now collect full source positions when any component that needs them is enabled (profiler, debugger). Bug: v8:7790,v8:12030 Change-Id: I6a2a82eb2b0d3e92121e101b4d9bf330c1f6c065 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067226Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Auto-Submit: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#76114}
-
Camillo Bruni authored
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/+/3001345Reviewed-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}
-
- 02 Aug, 2021 2 commits
-
-
Camillo Bruni authored
The V8.Execute histogram is not free and can cause more overhead than expected. This CL is guarding slower histograms behind a new --slow-histograms flag. For now --slow-histograms is enabled by default. Once all chrome-side changes and benchmark changes have landed it will be disabled by default. --dump-counters will automatically enable --slow-histograms. The goal is to not report slow histograms on UMA by default on stable: - 100% reporting on canary/dev/beta - 1% reporting on stable or specific finch experiments Chrome-side feature: https://crrev.com/c/3065464 Bug: v8:11946 Change-Id: I23c782288e10ceb76323d72eceea9170739fd543 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067318 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/master@{#76041}
-
Camillo Bruni authored
- Add V8_OS_STRING and V8_TARGET_OS_STRING define - Add v8-platform logging event - Add shared-library-end event for faster v8.log processing Change-Id: Id25a9e704620dbb70042e51a1fb6ed77ca7256bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067219Reviewed-by: Patrick Thier <pthier@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#76040}
-
- 29 Jul, 2021 1 commit
-
-
Camillo Bruni authored
If v8_enable_runtime_call_stats == false, we don't need TracingFlags::is_runtime_stats_enabled and can save a bit of code and needless overhead. Bug: v8:11299 Change-Id: Ia5ec51c29b2408b77b65984c5bba0ae16e0de243 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3024155Reviewed-by: Patrick Thier <pthier@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#75983}
-
- 26 Jul, 2021 1 commit
-
-
Leszek Swirski authored
This is a reland of e24fa913 It fixes the heap verification errors by going back to using MakeThin instead of manually creating a filler (that then makes the verifier think that this was array left-trimming). Original change's description: > [offthread] Template deserializer on Isolate > > Make the deserializer class templated on Isolate/LocalIsolate. This > allows the ObjectSerializer to be split into a main-thread and offthread > variant, with the latter taking a LocalIsolate. > > Eventually, we probably want to anyway split off the code-cache de/serializer > to a separate implementation (for various reasons), and this the only one that > wants off-thread finalization, and at this point the deserializer can revert > back to being un-templated, used only for bootstrapping. However, this is the > simplest way, for now, to enable off-thread deserialization. > > Bug: chromium:1075999 > Change-Id: I49c0d2c5409f0aa58183673785296756c3714f22 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2562254 > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75834} Bug: chromium:1075999 Change-Id: I1d81fad2550a2a9f04dd0f9d8e66422d28faf378 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3043960Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#75918}
-
- 23 Jul, 2021 1 commit
-
-
Vicky Kontoura authored
This CL adds support for classes with methods. More specifically: - A new ValueSerializer is added and classes are serialized separetely from functions, although the common parts are handled in the same way and abstracted away. - The function prototype is serialized as an object and any missing information is set up again during deserialization. - FunctionFlagsToFunctionKinds() is updated to allow for more function kinds. - Context serialization is updated to support serializing BlockContexts and creating ScopeInfos of type CLASS_SCOPE. - Map serialization is updated to support properties with custom attributes. Bug: v8:11525, v8:11706 Change-Id: I16ca7cbc17b1811721081cda05124ce36073f9be Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3006416 Commit-Queue: Vicky Kontoura <vkont@google.com> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#75893}
-
- 21 Jul, 2021 2 commits
-
-
Nico Hartmann authored
This reverts commit e24fa913. Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20GC%20Stress/18917/overview Original change's description: > [offthread] Template deserializer on Isolate > > Make the deserializer class templated on Isolate/LocalIsolate. This > allows the ObjectSerializer to be split into a main-thread and offthread > variant, with the latter taking a LocalIsolate. > > Eventually, we probably want to anyway split off the code-cache de/serializer > to a separate implementation (for various reasons), and this the only one that > wants off-thread finalization, and at this point the deserializer can revert > back to being un-templated, used only for bootstrapping. However, this is the > simplest way, for now, to enable off-thread deserialization. > > Bug: chromium:1075999 > Change-Id: I49c0d2c5409f0aa58183673785296756c3714f22 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2562254 > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Leszek Swirski <leszeks@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75834} Bug: chromium:1075999 Change-Id: Id699ebe0c17d3a61ec35b0f78417306175271647 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3041675Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#75836}
-
Leszek Swirski authored
Make the deserializer class templated on Isolate/LocalIsolate. This allows the ObjectSerializer to be split into a main-thread and offthread variant, with the latter taking a LocalIsolate. Eventually, we probably want to anyway split off the code-cache de/serializer to a separate implementation (for various reasons), and this the only one that wants off-thread finalization, and at this point the deserializer can revert back to being un-templated, used only for bootstrapping. However, this is the simplest way, for now, to enable off-thread deserialization. Bug: chromium:1075999 Change-Id: I49c0d2c5409f0aa58183673785296756c3714f22 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2562254Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#75834}
-
- 20 Jul, 2021 1 commit
-
-
Camillo Bruni authored
If any logging is enabled (for instance with --prof), the calls into Logger:ApiEntryCall become quite expensive. Move the FLAG_log_api checks to the header to speed up these high-frequency events. Change-Id: Iba718c856cd57a890ad6b63bcf4b6836bfd5d3f0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3024156Reviewed-by: Patrick Thier <pthier@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#75812}
-
- 12 Jul, 2021 1 commit
-
-
Peter Kasting authored
These need some consideration. Clang apparently considers V8_UNLIKELY to mean "always false", which seems questionable to me (possibly a bug?). That said, removing it in the cases here doesn't seem likely to cause problems -- the logging instance seems fine, and the other used to not have the macro and gained it in a commit that seemed to have nothing to do with performance. The trampoline register change is safe, but perhaps V8 will support an architecture in the future which needs this conditional? I'd leave these as-is, but it also seems a shame not to enable -Wunreachable-code-aggressive just because of these... Bug: chromium:1066980 Change-Id: Ib819298cecba082666c26fa7010009f8e9441bf8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2994805 Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Hannes Payer <hpayer@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#75681}
-
- 07 Jul, 2021 1 commit
-
-
Emanuel Ziegler authored
We only care about huge functions (>100kB) as they can cause extended compilation times and OOM situations. These are difficult to see in the existing histogram as they only account for a tiny fraction of functions. We therefore introduce a new counter that only covers those functions and remove the other histogram. Bug: chromium:1222273 Change-Id: I72fcec3fda5a358de6e29eb78d1fcf40059fb6c8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008646Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org> Cr-Commit-Position: refs/heads/master@{#75594}
-
- 06 Jul, 2021 1 commit
-
-
Camillo Bruni authored
Add and use two new RCS scopes: - RuntimeCallCounterId::kDebugger - RuntimeCallCounterId::kDebuggerCallback Change-Id: Ifd326424248948d0d5c1e0e29cacaecc92046e88 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3006415Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#75583}
-
- 01 Jul, 2021 2 commits
-
-
Clemens Backes authored
We currently only measure the compilation time of individual functions, but that does not include other things that happen for lazy compilation, like switching memory permissions or publishing the code. This CL adds a dedicated counter to measure the complete lazy compilation time. R=jkummerow@chromium.org CC=dlehmann@google.com Bug: v8:11940 Change-Id: I9a87882d2adc7bea6c5258954a642da18b8337ef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997106Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75498}
-
Peter Kasting authored
There are still a few cases remaining that seem more controversial; I'll upload those separately. Bug: chromium:1066980 Change-Id: Iabbaf23f9bbe97781857c0c589f2b3db685dfdc2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2994804 Commit-Queue: Peter Kasting <pkasting@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#75494}
-
- 22 Jun, 2021 3 commits
-
-
Dan Elphick authored
Moves VSNPrintf, SNPrintf and StrNCpy out of utils/utils.h into base/strings.h. Bug: v8:11879 Change-Id: I0e165cb27c42f89c9acd1c6378514b40a90cd18d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972732 Auto-Submit: Dan Elphick <delphick@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75308}
-
Andreas Haas authored
In the first CL to introduce a histogram for deserialization time a high-resolution counter was required to get microsecond precision. However, with the histogram we want to detect if we need to optimize deserialization or not. For this information high precision does not matter, it is more important that we get information from all devices. R=clemensb@chromium.org Bug: v8:11862 Change-Id: Id72e25ab7e5ac8217393ab6fd11416187822a158 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2978256Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#75306}
-
Clemens Backes authored
After a series of CLs per component, this removes all remaining NOLINT annotations that my script identified as not needed (because removing them does not cause a presubmit error). R=mlippautz@chromium.org, jkummerow@chromium.org, leszeks@chromium.org R=cbruni@chromium.org Bug: v8:11879 Change-Id: Ia403c23588a0c2871b987931f6c26f85821e9e9c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972733Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75296}
-
- 21 Jun, 2021 1 commit
-
-
Clemens Backes authored
The WasmEngine is shared across the whole process, so there is no need to store it in every Isolate. Instead, we can just get it from everywhere on any thread using {wasm::GetWasmEngine()}, which is a simple read of a global. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I13afb8ca3d116aa14bfaec5a4bbd6d71faa9aa17 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969825Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75265}
-
- 18 Jun, 2021 1 commit
-
-
Dan Elphick authored
The adding of base:: was mostly prepared using git grep and sed: git grep -l <pattern> | grep -v base/vector.h | \ xargs sed -i 's/\b<pattern>\b/base::<pattern>/ with lots of manual clean-ups due to the resulting v8::internal::base::Vectors. #includes were fixed using: git grep -l "src/utils/vector.h" | \ axargs sed -i 's!src/utils/vector.h!src/base/vector.h!' Bug: v8:11879 Change-Id: I3e6d622987fee4478089c40539724c19735bd625 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75243}
-
- 17 Jun, 2021 2 commits
-
-
Andreas Haas authored
At the moment deserialization happens synchronously on the main thread. This is fine at the moment because deserialization is fast. However, future refactorings may affect deserialization time, and may force us to deserialize in the background. This CL adds a timer to monitor deserialization time, so that we get a signal if deserialization time regresses. R=clemensb@chromium.org Bug: v8:11862 Change-Id: I18b52c19106b92158cd986492926a24d0d57e6ba Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966389Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#75218}
-
Sigurd Schneider authored
Bug: chromium:1213393 Change-Id: I100c5caba38cab3a1ef9511125937ef7b34d818f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966381Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#75203}
-
- 14 Jun, 2021 1 commit
-
-
Camillo Bruni authored
- Convert Builtin to enum class - Change int-based builtin_index methods to use Builtin - Change Builtins::builtin to Builtins::code Change-Id: Id9e3bb83da97e8894ca7ca78e1e852da60675619 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949104 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#75127}
-
- 12 Jun, 2021 1 commit
-
-
Marja Hölttä authored
Drive-by: Also add deferred function references. Bug: v8:11525 Change-Id: If546f2e6c5a991372f1b99dac149504941a24b3e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951731 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#75110}
-
- 09 Jun, 2021 1 commit
-
-
Dan Elphick authored
By moving this out of counters.h, counters.h no longer needs to depend on isolate.h. Change-Id: Ic5272e3b3a729c0a438124dc5cdc1835817f3341 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949098 Auto-Submit: Dan Elphick <delphick@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75055}
-
- 07 Jun, 2021 1 commit
-
-
Camillo Bruni authored
- Add new Builtin enum - Move Builtins::Name:kXXX to Builtin::kXXX - Update existing code Follow CLs will unify the mix of using int builtin-ids and Builtins::Name to only use the new Builtin enum and changing it to an enum class. Change-Id: Ib39aa45a25696acdf147f46392901b1e051deaa4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905592 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#74995}
-