- 03 May, 2022 1 commit
-
-
Georgia Kouveli authored
Mark the labels to the code and data global, which removes the need for having separate pointers to these labels in the .data section. This means that `v8_Default_embedded_blob_code_` and `v8_Default_embedded_blob_data_` can now actually be read-only when RELRO is enabled. The actual contents of `v8_Default_embedded_blob_code_` remain potentially non-readable for platforms where code is marked as execute-only, but these changes do not attempt to read them. Bug: v8:12850 Change-Id: Ic1bc8e68fe44a9ce45380c83b0be5fa94e7da267 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616510 Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com> Reviewed-by: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80331}
-
- 20 Apr, 2022 1 commit
-
-
Benoît Lizé authored
Reason for reland: Fixed Fuchsia build. Original change's description: > [builtins] Remap builtins on Linux > > This is a CL similar to > https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux > rather than macOS. The goal is to allow builtins to use short builtin > calls without paying a memory cost, by remapping rather than copying > them. > > However, while macOS has a system call making this easier, on Linux we > don't have one on most kernels. There is the recently-introduced > mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on > anonymous mappings until 5.13, which is too recent for most Android > devices. > > Instead, we open() the file containing the builtins, and mmap() it at > the desired location. > > Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426 > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Commit-Queue: Benoit Lize <lizeb@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80022} Change-Id: I0cc8cf510bd2cb8621130bea8406d79aa209948c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596164Reviewed-by: Jakob Linke <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Benoit Lize <lizeb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80049}
-
- 19 Apr, 2022 2 commits
-
-
Shu-yu Guo authored
This reverts commit b1dd8287. Reason for revert: Breaking fuschia build https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Fuchsia%20-%20builder/13592/overview Original change's description: > [builtins] Remap builtins on Linux > > This is a CL similar to > https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux > rather than macOS. The goal is to allow builtins to use short builtin > calls without paying a memory cost, by remapping rather than copying > them. > > However, while macOS has a system call making this easier, on Linux we > don't have one on most kernels. There is the recently-introduced > mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on > anonymous mappings until 5.13, which is too recent for most Android > devices. > > Instead, we open() the file containing the builtins, and mmap() it at > the desired location. > > Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426 > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Commit-Queue: Benoit Lize <lizeb@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80022} Change-Id: I0093fe84216f8c8fd1a8691c53817e578d92fa40 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3594009 Auto-Submit: Shu-yu Guo <syg@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shu-yu Guo <syg@chromium.org> Owners-Override: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#80028}
-
Benoît Lizé authored
This is a CL similar to https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux rather than macOS. The goal is to allow builtins to use short builtin calls without paying a memory cost, by remapping rather than copying them. However, while macOS has a system call making this easier, on Linux we don't have one on most kernels. There is the recently-introduced mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on anonymous mappings until 5.13, which is too recent for most Android devices. Instead, we open() the file containing the builtins, and mmap() it at the desired location. Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Benoit Lize <lizeb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80022}
-
- 04 Apr, 2022 2 commits
-
-
Igor Sheludko authored
Bug: v8:11880 Change-Id: Id3975d0c10ac5ece5c55d9db5ae7c6786fde2dfe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564566Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#79739}
-
Igor Sheludko authored
... instead of Code objects. This is a step towards not creating Code objects for embedded builtins. Bug: v8:11880 Change-Id: Ie9f87b09d06e6b872ce3a5fa5d03a2502df979d9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564565Reviewed-by: Jakob Linke <jgruber@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#79733}
-
- 01 Apr, 2022 1 commit
-
-
Benoit Lize authored
For short builtin calls, the builtins are copied on the heap when they cannot be put close enough to be in range of relative calls. This costs memory, as the embedded builtins are part of the binary, and mapped from the binary, and as a consequence shared with all running processes. Rather than copying the memory, we can remap it at a different address, avoiding the memory cost. This CL does that, on ARM64 macOS only for now. This saves at least ~1.4MiB of memory per V8 process. See below the output of vmmap <PID>: [...] Memory Tag 255 7408308000-740833c000 [ 208K 144K 144K 0K] r-x/rwx SM=ZER Memory Tag 255 740833c000-7408340000 [ 16K 0K 0K 0K] ---/rwx SM=ZER Memory Tag 255 7408344000-7408348000 [ 16K 0K 0K 0K] ---/rwx SM=ZER Memory Tag 255 7408348000-740837c000 [ 208K 144K 144K 0K] r-x/rwx SM=ZER Memory Tag 255 740837c000-740fe80000 [123.0M 0K 0K 0K] ---/rwx SM=ZER mapped file 740fe80000-740ffe4000 [ 1424K 1328K 0K 0K] r-x/rwx SM=COW ...pp/Contents/Frameworks/Chromium Framework.framework/Versions/102.0.4958.0/Chromium Framework Memory Tag 255 740ffe4000-7410000000 [ 112K 0K 0K 0K] ---/rwx SM=ZER The "208K" regions are 256kiB code pages, minus the header and guard pages, meaning that they are code chunks. The mapped file are the remapped builtins, showing that they aren't copied, but remapped from the binary. Bug: chromium:1298417 Change-Id: Ia30a43e671726d01450a7db0ecb7777b34763053 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3553006Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Benoit Lize <lizeb@chromium.org> Cr-Commit-Position: refs/heads/main@{#79716}
-
- 28 Mar, 2022 1 commit
-
-
Milad Fa authored
Code alignment was updated to 64-bytes on ppc: https://crrev.com/c/3528993 This change is required to maintain the same alignment on AIX. Change-Id: I8cc33c9abad1ceeac050fde30700d315ef549d7f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3552087Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#79639}
-
- 24 Mar, 2022 1 commit
-
-
Milad Fa authored
P10 comes with prefixed instruction (2 x 4-byte instructions) which allow for using larger immediate values. `paddi` has been added in this CL which uses a 34-bit immediate. Prefixed instructions cannot cross 64-byte boundaries, i.e we cannot have the first 4-bytes on one side and the second 4-bytes emitted on the other side of the boundary. Therefore we need to align generated code to 64 bytes and emit a nop whenever the boundary is being crossed midway (check emit_prefix). Change-Id: I90e9953089214e15eeef0d70147ea5943fe05f45 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528993Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Junliang Yan <junyan@redhat.com> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#79612}
-
- 24 Feb, 2022 1 commit
-
-
Clemens Backes authored
{FreePages} is never expected to fail, and each caller wraps the call in a CHECK macro. In order to learn more about failures, this CL moves the CHECK inside of {::FreePages}, to fail whenever the {PageAllocator} fails to free pages. As a next step, I'll audit our {PageAllocator} implementations to ensure that none of them return {false} for {FreePages}. Note that this is already the case for the gin platform (chromium). R=mlippautz@chromium.org Bug: v8:12656, chromium:1299735 Change-Id: Ib61be6cc8da0110ead2db1ad005728bd061e0243 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484321Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#79248}
-
- 18 Feb, 2022 1 commit
-
-
Samuel Groß authored
Previously, V8_OS_MACOSX was, somewhat confusingly, also used for iOS. With this CL, V8_OS_DARWIN will be set on both macOS and iOS, V8_OS_MACOS only on macOS, and V8_OS_IOS only on iOS. This CL also renames V8_TARGET_OS_MACOSX to V8_TARGET_OS_MACOS and renames platform-xnu.cc to platform-darwin.cc. Change-Id: I4bcafc7c337586662114144f6c7ccf47d978da1f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468577Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#79167}
-
- 14 Jan, 2022 1 commit
-
-
Igor Sheludko authored
The Isolate might not be aware that remapped builtins are used (see Code::OffHeapInstructionStart()), so always try to lookup PC in the remapped builtins if they are available. This is a follow-up to https://chromium-review.googlesource.com/c/v8/v8/+/3379817. Bug: chromium:1241665, v8:11460 Change-Id: Ied59ce6c7920278ed701e7139c8b6839a04cf1cf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386381Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78624}
-
- 12 Jan, 2022 1 commit
-
-
Igor Sheludko authored
The Isolate might not be aware that remapped builtins are used (see Code::OffHeapInstructionStart()), so always try to lookup PC in the remapped builtins if they are available. Bug: chromium:1241665, v8:11460 Change-Id: Iefc373cf0ea0110c8c002b7677e6a1fd8fd45319 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3379817Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78579}
-
- 16 Dec, 2021 1 commit
-
-
Igor Sheludko authored
This CL * removes Builtins::codet() and Builtins::codet_handle() returning builtins as CodeT objects in favor of code() and code_handle(), * removes BUILTIN_CODET macro in favor of BUILTIN_CODE, * removes CodeDataContainer table. Bug: v8:11880 Change-Id: Ic868549030744b0ff3ea5d5edbfcacf77c6de96d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3344650Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78399}
-
- 02 Dec, 2021 1 commit
-
-
Igor Sheludko authored
... as a prerequisite for adding InstructionStream heap object. Bug: v8:11880 Change-Id: I22b4832cedd46bee4a4c5a0d7b5032eba10b2a7b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310900Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78204}
-
- 01 Sep, 2021 1 commit
-
-
Hao Xu authored
This is a reland of commit 40af03b8 The original CL failed one test in Windows, and this CL fix this issue. Original changes's description: > [codegen] Align the code start at 64 byte in x64 > > In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte. > > Bug: chromium:1231471 > Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167 > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Hao A Xu <hao.a.xu@intel.com> > Cr-Commit-Position: refs/heads/main@{#76484} Bug: chromium:1231471 Change-Id: Ia927305c792c7486588bc15e9e87840d6db18478 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133957Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Hao A Xu <hao.a.xu@intel.com> Cr-Commit-Position: refs/heads/main@{#76617}
-
- 25 Aug, 2021 2 commits
-
-
Leszek Swirski authored
This reverts commit 40af03b8. Reason for revert: Breaks on win https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20debug/39151/overview Original change's description: > [codegen] Align the code start at 64 byte in x64 > > In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte. > > Bug: chromium:1231471 > Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167 > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Hao A Xu <hao.a.xu@intel.com> > Cr-Commit-Position: refs/heads/main@{#76484} Bug: chromium:1231471 Change-Id: I93ad896d40e8bb906a05eab8e03980ce2061b9c0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118005 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@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/main@{#76488}
-
Hao Xu authored
In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte. Bug: chromium:1231471 Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Hao A Xu <hao.a.xu@intel.com> Cr-Commit-Position: refs/heads/main@{#76484}
-
- 16 Aug, 2021 1 commit
-
-
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}
-
- 12 Aug, 2021 1 commit
-
-
Ross McIlroy authored
These are no longer enabled, so remove the code mitigation logic from the codebase. BUG=chromium:1003890 Change-Id: I536bb1732e8463281c21da446bbba8f47ede8ebe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3045704 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#76256}
-
- 27 Jul, 2021 1 commit
-
-
Vasili Skurydzin authored
This changes builtin definition so that builtins are now located in GL .text section, to maintain their alignment in the resulting binaries and make sure the off-heap code is aligned to kCodeAlignment. Change-Id: I4662ca59273fa2dd11e7ecf63969597b9dd9664b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3054431Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Milad Fa <mfarazma@redhat.com> Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com> Cr-Commit-Position: refs/heads/master@{#75940}
-
- 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}
-
- 23 Jun, 2021 1 commit
-
-
Adam Kallai authored
SNPrintF function is moved into base/strings.h [1], so it needs to fix the scope of this function for Windows on ARM related source as well. [1] https://chromium-review.googlesource.com/c/v8/v8/+/2972732 Bug: None Change-Id: Ia9934f17941558b6338f28900f069766507c87b2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2982016Reviewed-by: Dan Elphick <delphick@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#75339}
-
- 22 Jun, 2021 1 commit
-
-
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}
-
- 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 1 commit
-
-
Adam Kallai authored
Adopt Windows ARM64 related source to Builtin changes: https://chromium-review.googlesource.com/c/v8/v8/+/2949104 Bug: v8:11892 Change-Id: I267aac720c832ce11ce2708a92e212241b368ee6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964605Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#75198}
-
- 16 Jun, 2021 1 commit
-
-
John Xu authored
Cobalt is a V8 embedder and it has its own platform abstraction. So to V8 the OS name is "Starboard" instead of Win/Linux/Android even though the real OS is one of them. To select the right embedded file writer for Cobalt, we need some customizations in platform-embedded-file-writer-base.*. Bug: v8:10927 Change-Id: I6dadb4690ade0b4aebec14bc87fdc6d71c03b3bb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963804 Auto-Submit: John Xu <johnx@google.com> Commit-Queue: John Xu <johnx@google.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#75170}
-
- 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}
-
- 10 Jun, 2021 1 commit
-
-
John Xu authored
For Cobalt's purpose in the past, we introduced base::Memcpy to intercept memcpy calls and replace it with SbMemoryCopy on Starboard/Cobalt. Recently Cobalt removed SbMemoryCopy because we found out that memcpy implementation is universal. To reduce the cost to maintain base::Memcpy, let us remove it and revert back to raw memcpy. Bug: v8:10927 Change-Id: I060f191f8f1aed8b78ffe4558a3743f3a2da008b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2951462Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: John Xu <johnx@google.com> Cr-Commit-Position: refs/heads/master@{#75070}
-
- 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}
-
- 04 May, 2021 1 commit
-
-
Shu-yu Guo authored
Bug: v8:11460 Change-Id: I97a21d158ad057334cc7fe5f53edc5c6c23d1355 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2861711 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Dan Elphick <delphick@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#74365}
-
- 28 Apr, 2021 1 commit
-
-
Jakob Gruber authored
.. which traces various stats (time, memory) related to the snapshot. Due to various flag shuffles, it was broken as of Oct 2020, with some line items reporting constant 0. This also refactors --profile-deserialization and --serialization-statistics s.t. the former only reports deserialization times and the latter reports memory. Memory.json now passes both flags. Change-Id: I7dacbbbe9f7a667e0802d0f7a44703dc34524a4e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2854742 Auto-Submit: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#74241}
-
- 16 Apr, 2021 3 commits
-
-
Leszek Swirski authored
This is a reland of ae0752df Reland fixes: * Remove UNREACHABLE() from constexpr switch, since we don't have a CONSTEXPR_UNREACHABLE() (it's ok, the switch is exhaustive for the enum anyway). * Fix IsRegisterArray trait to use public inheritance and size_t for std::array size. Original change's description: > [codegen] Add static interface descriptors > > Add a new CRTP StaticCallInterfaceDescriptor class, which provides > static constexpr getters for a descriptor's registers, parameter counts, > and so on. Each CallInterfaceDescriptor subclass is changed to extend > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself > extending CallInterfaceDescriptor to still provide a dynamic lookup > where needed. > > StaticCallInterfaceDescriptor provides a couple of customisation points, > where it reads its CRTP derived descriptor's static fields and > functions, with default fallbacks where appropriate. With these > customisation points, the definition of CallInterfaceDescriptor > subclasses is simplified to: > > a) Providing parameter names (as before) > b) Providing parameter types (as before) > c) Optionally setting flags (like kNoContext or kAllowVarArgs) as > static booleans on the class. > d) Optionally providing a `registers()` method that returns a > std::array<Register, N> of registers that may be used for > parameters (if not provided, this defaults to the implementation > specific default register set). > > Parameter registers (and register count) are automagically set based on > the number of parameters and number of given registers, with extra magic > to ignore no_reg registers (to reduce ia32 special casing). The > CallInterfaceDescriptorData is initialized based on these static > functions, rather than manual per-descriptor initializers. > > This allows us to skip loading descriptors dynamically for CallBuiltin > in Sparkplug, and instead lets us use a bit of template magic to > statically set up arguments for the calls. Any other users of statically > known descriptors will also benefit, thanks to C++ picking the static > methods over the dynamic methods on the base class when available. > > Because we can remove various virtual functions and trigger heavier > inlining of constantly known values, binary size slightly decreases with > this change. > > Note that torque-generated descriptors are changed to use the same magic, > rather than having Torque-specific magic, for consistency. > > Bug: v8:11420 > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518 > Auto-Submit: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#73996} TBR=nicohartmann@chromium.org,clemensb@chromium.org,ishell@chromium.org,clemensb@chromium.org Bug: v8:11420 Change-Id: Icd1f6cdb3c178e74460044b1e9623139929ceba8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831872Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#74010}
-
Leszek Swirski authored
This reverts commit ae0752df. Reason for revert: Predictably, constexpr issues on non-clang compilers. Original change's description: > [codegen] Add static interface descriptors > > Add a new CRTP StaticCallInterfaceDescriptor class, which provides > static constexpr getters for a descriptor's registers, parameter counts, > and so on. Each CallInterfaceDescriptor subclass is changed to extend > StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself > extending CallInterfaceDescriptor to still provide a dynamic lookup > where needed. > > StaticCallInterfaceDescriptor provides a couple of customisation points, > where it reads its CRTP derived descriptor's static fields and > functions, with default fallbacks where appropriate. With these > customisation points, the definition of CallInterfaceDescriptor > subclasses is simplified to: > > a) Providing parameter names (as before) > b) Providing parameter types (as before) > c) Optionally setting flags (like kNoContext or kAllowVarArgs) as > static booleans on the class. > d) Optionally providing a `registers()` method that returns a > std::array<Register, N> of registers that may be used for > parameters (if not provided, this defaults to the implementation > specific default register set). > > Parameter registers (and register count) are automagically set based on > the number of parameters and number of given registers, with extra magic > to ignore no_reg registers (to reduce ia32 special casing). The > CallInterfaceDescriptorData is initialized based on these static > functions, rather than manual per-descriptor initializers. > > This allows us to skip loading descriptors dynamically for CallBuiltin > in Sparkplug, and instead lets us use a bit of template magic to > statically set up arguments for the calls. Any other users of statically > known descriptors will also benefit, thanks to C++ picking the static > methods over the dynamic methods on the base class when available. > > Because we can remove various virtual functions and trigger heavier > inlining of constantly known values, binary size slightly decreases with > this change. > > Note that torque-generated descriptors are changed to use the same magic, > rather than having Torque-specific magic, for consistency. > > Bug: v8:11420 > Change-Id: Icc5e238b6313a08734feb564204a13226b450c22 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518 > Auto-Submit: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Commit-Queue: Clemens Backes <clemensb@chromium.org> > Cr-Commit-Position: refs/heads/master@{#73996} Bug: v8:11420 Change-Id: Ie5469c9253fc140590ac30b72db6eb1d93f86806 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831485 Auto-Submit: Leszek Swirski <leszeks@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@{#74000}
-
Leszek Swirski authored
Add a new CRTP StaticCallInterfaceDescriptor class, which provides static constexpr getters for a descriptor's registers, parameter counts, and so on. Each CallInterfaceDescriptor subclass is changed to extend StaticCallInterfaceDescriptor, with StaticCallInterfaceDescriptor itself extending CallInterfaceDescriptor to still provide a dynamic lookup where needed. StaticCallInterfaceDescriptor provides a couple of customisation points, where it reads its CRTP derived descriptor's static fields and functions, with default fallbacks where appropriate. With these customisation points, the definition of CallInterfaceDescriptor subclasses is simplified to: a) Providing parameter names (as before) b) Providing parameter types (as before) c) Optionally setting flags (like kNoContext or kAllowVarArgs) as static booleans on the class. d) Optionally providing a `registers()` method that returns a std::array<Register, N> of registers that may be used for parameters (if not provided, this defaults to the implementation specific default register set). Parameter registers (and register count) are automagically set based on the number of parameters and number of given registers, with extra magic to ignore no_reg registers (to reduce ia32 special casing). The CallInterfaceDescriptorData is initialized based on these static functions, rather than manual per-descriptor initializers. This allows us to skip loading descriptors dynamically for CallBuiltin in Sparkplug, and instead lets us use a bit of template magic to statically set up arguments for the calls. Any other users of statically known descriptors will also benefit, thanks to C++ picking the static methods over the dynamic methods on the base class when available. Because we can remove various virtual functions and trigger heavier inlining of constantly known values, binary size slightly decreases with this change. Note that torque-generated descriptors are changed to use the same magic, rather than having Torque-specific magic, for consistency. Bug: v8:11420 Change-Id: Icc5e238b6313a08734feb564204a13226b450c22 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814518 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73996}
-
- 12 Apr, 2021 1 commit
-
-
Yahan Lu authored
Port pc-relative builtin-to-builtin calls. Port: ccc068d5 Change-Id: I1d11dd1e77ca578f7714864e4e090493fa8bca0a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814722 Commit-Queue: Yahan Lu <yahan@iscas.ac.cn> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Brice Dobry <brice.dobry@futurewei.com> Cr-Commit-Position: refs/heads/master@{#73894}
-
- 08 Apr, 2021 1 commit
-
-
Ulan Degenbaev authored
Flushing of the builtins code needs to happen while the code pages are writeable. Bug: 889460, v8:11619 Change-Id: Iaff40d66f3f1bd36ec0f3017684e236f9e4b773e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2810786 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#73861}
-
- 24 Mar, 2021 1 commit
-
-
Igor Sheludko authored
... of physical memory, since builtins re-embedding comes with a memory overhead. Bug: v8:11527 Change-Id: I24b77c3ab63e1891bd4c6134c3f3456921cc2a01 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784564Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#73632}
-
- 17 Mar, 2021 2 commits
-
-
Igor Sheludko authored
This is a speed-for-memory tradeoff, which can be achieved by re-mapping the builtins code blob into existing code range. This CL handles cases where both embedded and un-embedded off-heap builtins' PCs might appear on the call stack. The v8_enable_short_builtin_calls build flag is still disabled. Bug: v8:11527, v8:11421 Change-Id: Ie3db6eb8e264854df42b936a97d3e73d01de5dfd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2749636 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#73476}
-
Igor Sheludko authored
This is a speed-for-memory tradeoff, which can be achieved by re-mapping the builtins code blob into existing code range. The feature can be enabled by v8_enable_short_builtin_calls flag and it's off by default. This CL adds GN flag and updates code generator to emit shorter pc-relative calls/jumps to builtins. However, the runtime doesn't support appearance of the off-heap builtins' PCs that point to the embedded code blob on the stack yet. Bug: v8:11527, v8:11421 Change-Id: Iaba384c549675852beae70739175976ee193ffef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727502Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#73458}
-