- 21 Jun, 2021 5 commits
-
-
Sigurd Schneider authored
The exception meta-data API created several objects in the wrong context, resulting in the exception context being kept alive for too long. Bug: chromium:1221089 Change-Id: I02aece4e10d9bd559d49f98fe1c3e44a09e27eef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975301Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#75269}
-
Igor Sheludko authored
... and OPTIMIZED_CODE_LIST and DEOPTIMIZED_CODE_LIST slots of NativeContext which serve as heads of respective weak lists of Code objects. Drive-by: trivial NativeContext methods are moved to contexts-inl.h header. Bug: v8:11880 Change-Id: I0f2ca967b2820f84c279fea702bab28829f65d0e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968416Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75268}
-
Daniel Lehmann authored
In an effort to merge `CODE_SPACE_WRITE_SCOPE` and `NativeModuleModificationScope`, this CL moves the interface and implementation of the latter into code-space-access.{h,cc}, where the former already lives. No other changes to the code itself. R=clemensb@chromium.org CC=jkummerow@chromium.org Bug: v8:11714 Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng Change-Id: I1aabce26f2033430523a7a3a0a4864e7267bee21 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972803Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Daniel Lehmann <dlehmann@google.com> Cr-Commit-Position: refs/heads/master@{#75267}
-
Clemens Backes authored
There is exactly one WasmEngine per process, hence we do not need to store or pass a pointer to it. We just use {GetWasmEngine} (which just reads a global variable) whenever we need it. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I7e0e86e326f4cafe5a894af0ff6d35803c0340a9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972725 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75266}
-
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}
-
- 19 Jun, 2021 1 commit
-
-
v8-ci-autoroll-builder authored
Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/11f1e3d..d6115b1 Rolling v8/buildtools/linux64: git_revision:d2dce7523036ed7c55fbb8d2f272ab3720d5cf34..git_revision:7d803996740ccd587c54062750cbe04dfbc3c423 Rolling v8/third_party/aemu-linux-x64: R61GnhotR5EpRE5ZeVtRvIQPRz8z-LSXnxN1ighigqMC..h_kO6UaQmxXGNfG0ofG4wgKw_URVHcderPkx6AlamR0C Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2573cff..893c99a Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/59140d4..473499b Rolling v8/tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang/+log/66b4484..0e77445 TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com Change-Id: I00eab552662eb15afd50c8b77ff72932806d443b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973786Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#75264}
-
- 18 Jun, 2021 34 commits
-
-
Frank Tang authored
This reverts commit f8a40f6d. Reason for revert: Performance regression Original change's description: > [intl] Ship "best fit" LocaleMatcher for m93 > > LGTM1 Mike West mkwst@chromium.org > LGTM2 Chris Harrelson chrishtr@chromium.org > LGTM3 Yoav Weiss yoavweiss@chromium.org > > Design Doc: > https://docs.google.com/document/d/1cPGfiihn76yj2iAomKcspPFyLLcnk3WkCiqceBQPQyk > R2T: https://groups.google.com/a/chromium.org/g/blink-dev/c/W7TcX1tSHDI/m/1AthUhEWBAAJ > I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/TpAvyXwHM_c/m/QXJKbClfAwAJ > Stage in m92 Canary 92 92.0.4500.0 Dev 92 92.0.4503.3 Beta 92 92.0.4515.40 > https://chromiumdash.appspot.com/commit/eb6482784ca71d3b22db449fd941bfa9872d244a > > > Bug: v8:7051, v8:11868, v8:11869 > Change-Id: Id1ae20234b764e6f6def83af651daf70056d0725 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950559 > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Commit-Queue: Frank Tang <ftang@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75194} Bug: v8:7051, v8:11868, v8:11869 Change-Id: I1c5d2c2201f7724eb7db67f2c5268b787d6ca8eb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973649 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#75263}
-
Frank Tang authored
This reverts commit dd8845cd. Reason for revert: Performance regression Original change's description: > [intl] Improve test coverage of "best fit" localeMatcher > > https: //docs.google.com/document/d/1cPGfiihn76yj2iAomKcspPFyLLcnk3WkCiqceBQPQyk/edit#heading=h.cc9tt7s0iwsd > Bug: v8:7051 > Change-Id: I8c35e859062c5bdb009334dd1b725751e6df2123 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965481 > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Commit-Queue: Frank Tang <ftang@chromium.org> > Cr-Commit-Position: refs/heads/master@{#75228} Bug: v8:7051 Change-Id: I4cf9484d727291ebc2868e3594ab1f18b19bec6b No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973227 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Frank Tang <ftang@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#75262}
-
Junliang Yan authored
Change-Id: Ie092921e4a9c1e4a0acee827f73570f3f9617712 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971557Reviewed-by: Milad Fa <mfarazma@redhat.com> Commit-Queue: Junliang Yan <junyan@redhat.com> Cr-Commit-Position: refs/heads/master@{#75261}
-
Milad Fa authored
Change-Id: I2335844f500790ccd3223c37768b6811daefbf66 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971555Reviewed-by: Junliang Yan <junyan@redhat.com> Commit-Queue: Milad Fa <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/master@{#75260}
-
Manos Koukoutos authored
It will be used by consume_init_expr(). Bug: v8:11895 Change-Id: I577b5126a3c2cd0a6075ff9f085b4c93a8554846 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972906 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75259}
-
Junliang Yan authored
Change-Id: I568516149f49b7724680d9dfae6e078eb07a8b44 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971552Reviewed-by: Milad Fa <mfarazma@redhat.com> Commit-Queue: Junliang Yan <junyan@redhat.com> Cr-Commit-Position: refs/heads/master@{#75258}
-
Milad Fa authored
Port f09de17c R=zhin@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com BUG= LOG=N Change-Id: I3b8c3df178a281b5195da649048e7c722516fd45 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971551Reviewed-by: Junliang Yan <junyan@redhat.com> Commit-Queue: Milad Fa <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/master@{#75257}
-
Ng Zhi An authored
Bug: v8:11879 Change-Id: I8a7643b8b6226cdae4fb5f741a2b50f82d1894bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973212 Commit-Queue: Zhi An Ng <zhin@chromium.org> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#75256}
-
Peter Kasting authored
Bug: chromium:1221591 Change-Id: Ie24334873d1e66de0e0aa90fa1fb49d4290b7b59 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2973214 Commit-Queue: Peter Kasting <pkasting@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#75255}
-
Milad Fa authored
Change-Id: I22345aef595be1e5daef0604139e39337f003f15 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972734Reviewed-by: Junliang Yan <junyan@redhat.com> Commit-Queue: Milad Fa <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/master@{#75254}
-
Junliang Yan authored
Change-Id: I39d7e9aa098e83c9268736cac993c69eccef0015 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972735Reviewed-by: Milad Fa <mfarazma@redhat.com> Commit-Queue: Junliang Yan <junyan@redhat.com> Cr-Commit-Position: refs/heads/master@{#75253}
-
Manos Koukoutos authored
When we later introduce an additional template argument to WasmDecoder, we will have to add it here too, as well as in all places which use MemoryAccessImmediate. It is simpler to have a helper function in WasmDecoder to fetch the 64-bit memory status. Bug: v8:11895 Change-Id: I08edbf4e825cd148b30b2a5c0d04a26dfbaed186 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972905 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75252}
-
Manos Koukoutos authored
Split interface functions into constant, non-constant, and meta functions. This will be useful once initializer expression decoding is implemented as an interface for WasmFullDecoder. Additionally, add ArrayInit() interface function (currently unused). Bug: v8:11895 Change-Id: If076fe47871868c2d754f9c72c865f0a7f9f97d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964609 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75251}
-
Patrick Thier authored
Only print the property name when accessing null/undefined if we can convert it to a string without causing side effects. If we can't, omit the property name in the error message. This should avoid confusion when the key is an object with toString(). E.g. undefined[{toString:()=>'a'}] doesn't print 'read property [object Object]' anymore, which was misleading since the property accessed would be 'a', but we can't evaluate the key without side effects. Bug: v8:11365 Change-Id: If82d1adb42561d4851e2bd2ca297a1c71738aee8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960211Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/master@{#75250}
-
Michael Lippautz authored
Set stack start as otherwise TracedReference from stack would not be kept alive. Bug: chromium:1220744, chromium:1056170 Change-Id: I99d54ac44b3f7cb4aa9732eb9260b918193a68e2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972728Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#75249}
-
Santiago Aboy Solanes authored
Replace GetOwnDictionaryPropertyFromHeap with TryGetOwnDictionaryPropertyFromHeap which will return {} if we are trying to read out of bounds of the heap or the object. This is done so that we can concurrently use the method. We introduce a new compilation dependency (DependOnPropertyValueSame) which checks that the background thread indeed read the correct value. Bug: v8:7790 Change-Id: Ia5e308faf1f65add638cd271995f4f33416fbd15 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930480 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#75248}
-
Igor Sheludko authored
In order to avoid unnecessary conversions to CodeT and back this CL: - makes compiler::CompileCWasmEntry() return CodeT, - makes Execution::CallWasm() accept CodeT. Bug: v8:11880 Change-Id: Ic4b7b5f476c6efcfca4bc116ecd45cdee9f0c6c3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971743Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75247}
-
Clemens Backes authored
The {WasmCodeManager::CanRegisterUnwindInfoForNonABICompliantCodeRange} method does not access any information on the {WasmCodeManager} object, hence make it static. R=jkummerow@chromium.org Bug: v8:11879 Change-Id: I9a06ec556825bc7709970b65f22156952fa7f191 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972726 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#75246}
-
Vasili Skurydzin authored
When result is returned in a register to the calling code, some GCC versions use 32 bit compare, and some use 64 bit compare. In the case comparison is 64 bit, GCC on PPC64 arch is expecting the return value to be sign-extended, leading to an error in comparison. Change-Id: I05b7e1566bc9bb931ce9998bb310eb29c50e90e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968449Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Milad Fa <mfarazma@redhat.com> Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com> Cr-Commit-Position: refs/heads/master@{#75245}
-
Dan Elphick authored
To try and reduce StringBuilder's dependencies, use std::memcpy instead of the V8-only MemCopy. Change-Id: I576dccd4a2ff1b796314f8e806cbb0c70f6c07f2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972730 Commit-Queue: Dan Elphick <delphick@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Dan Elphick <delphick@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75244}
-
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}
-
Leszek Swirski authored
We were gating baseline compilation on FBV allocation, but in some cases, the feedback vector may be allocated eagerly (notably, if we are logging function events). Instead, unconditionally try baseline compilation after ensuring the feedback vector exists. Bug: v8:11420 Change-Id: I1264a1d541a74d4eccb5caf65c360ac23836a1a8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953161 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Reviewed-by: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/master@{#75242}
-
Santiago Aboy Solanes authored
After the last CL on TSAN support for generated loads, we are seeing timeouts in one of our TSAN bots. Bug: v8:7790, v8:11600 Change-Id: I90924540c5ddcf9902f936849df28aff0f7bd3d5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972724Reviewed-by: Mythri Alle <mythria@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#75241}
-
Igor Sheludko authored
Bug: v8:11880 Change-Id: Ia86bab21851e8ff2f2317495a9f0e19140b0de2c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969827 Commit-Queue: Igor Sheludko <ishell@chromium.org> Auto-Submit: Igor Sheludko <ishell@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#75240}
-
Victor Gomes authored
Bug: chromium:1220810 Change-Id: Ibb016b42c8acf91b2ad38b7d360dfaf1dc185cdf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972723Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/master@{#75239}
-
Lu Yahan authored
Change-Id: Ic73b5414e62de76a3d4d604c52686c273d9a1b44 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2970813 Commit-Queue: Yahan Lu <yahan@iscas.ac.cn> Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn> Auto-Submit: Yahan Lu <yahan@iscas.ac.cn> Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn> Cr-Commit-Position: refs/heads/master@{#75238}
-
Camillo Bruni authored
- Dynamically adjust timeline-tracks height - Use CSS-vars for timeline view and data heights - Introduce syncronous File.read for FireFox again - Prepare for fixed-scaled SVG text Bug: v8:10644 Change-Id: I3a6815df49e57eb49c55a8498ce7b8f49e5fd0ee Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968945 Auto-Submit: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#75237}
-
Manos Koukoutos authored
Bug: v8:7748 Change-Id: Id94edd934ff57a722012fabb729046dc7a8bc29c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968944Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/master@{#75236}
-
Igor Sheludko authored
Bug: v8:11880 Change-Id: I6a0b6bc1b4a7c75bfca2e4f611f45012474309a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968414Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75235}
-
Igor Sheludko authored
Namely, - StackFrameInfo::code_object - DependentCode's code entries - OSROptimizedCodeCache's code entries Bug: v8:11880 Change-Id: I49bc28f2935dd1561901932a2dfe0bf01bc6836e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969824Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75234}
-
Igor Sheludko authored
This CL migrates BaselineData::baseline_code field and InterpreterData::interpreter_trampoline field to CodeT. Bug: v8:11880 Change-Id: Ibd202f0dcd4266e5b98aa5c46754ba8a4fadff43 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968415Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#75233}
-
Victor Gomes authored
Bug: v8:7834 Change-Id: I6ea4b67841104ba438b1b07b9e85bf955c152d34 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967465 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#75232}
-
Maya Lekova authored
Bug: v8:11905 Change-Id: Ie43c7240383ceae522d715970615286aaeff7379 No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971744 Auto-Submit: Maya Lekova <mslekova@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#75231}
-
Daniel Lehmann authored
Currently, we have two different classes for switching the WebAssembly generated code space to writable (e.g., before patching jump tables, or when adding or removing code): `CodeSpaceWriteScope` (with the macro `CODE_SPACE_WRITE_SCOPE`) and `NativeModuleModificationScope`. The former was introduced for Apple Silicon ARM64 hardware ("Apple M1"), which uses `MAP_JIT` + `pthread_jit_write_protect_np()` to change memory permissions. The latter uses either Intel PKU (aka. memory protection keys) to switch permissions (fast and thread-local, like on M1), and alternatively `mprotect()`, on systems that do not have PKU support. Since both classes serve the same purpose just with different implementations on different platforms, we want to merge them in follow-up CLs. As a first step, here we align all uses of `CODE_SPACE_WRITE_SCOPE` with existing `NativeModuleModificationScope`s. The two had diverged due to optimization work, where we moved `NativeModuleModificationScope`s around (pulling them out of loops and across function boundaries) to lower the amount of mprotect switches. This should have none, or at best a very small positive performance impact on Apple M1, since we now also switch less often (even though switching should be very cheap). In terms of security, this in theory makes the code space writable for longer time spans, but this is probably not a large effect because (1) we often moved the scope outside of loops, where it was open for every iteration anyway, or (2) in some cases a CODE_SPACE_WRITE_SCOPE was open somewhere on the call stack already. R=jkummerow@chromium.org CC=clemensb@chromium.org Bug: v8:11714 Change-Id: Id8744429e1183e118ab5e078750d294a99c9dce0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968946Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Daniel Lehmann <dlehmann@google.com> Cr-Commit-Position: refs/heads/master@{#75230}
-