v8/test/unittests/base
Benoît Lizé b1dd828707 [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}
2022-04-19 13:35:07 +00:00
..
platform [builtins] Remap builtins on Linux 2022-04-19 13:35:07 +00:00
utils Fix v8 unittests broken on official builds by recent crash logging changes 2021-07-05 07:38:47 +00:00
address-region-unittest.cc Fix -Wc++11-narrowing in V8. 2021-06-09 22:47:37 +00:00
atomic-utils-unittest.cc Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
bits-unittest.cc Fix CountPopulation non-builtin implementation 2020-05-14 14:24:13 +00:00
cpu-unittest.cc [ia32][x64] Detect AVX2 2020-12-17 05:44:54 +00:00
division-by-constant-unittest.cc [cleanup][test] Remove redundant NOLINT annotations 2021-04-30 11:46:14 +00:00
flags-unittest.cc [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
functional-unittest.cc [cleanup] Remove DISALLOW_COPY_AND_ASSIGN in test/{common,unittests} 2020-11-06 06:07:54 +00:00
ieee754-unittest.cc [ubsan] Fix various cases of undefined behavior 2019-01-10 13:52:04 +00:00
iterator-unittest.cc Improve iterator_range to take non-&& arguments 2020-01-28 13:03:43 +00:00
logging-unittest.cc Fix v8 unittests broken on official builds by recent crash logging changes 2021-07-05 07:38:47 +00:00
macros-unittest.cc Account for different interpretations of "trivially copyable" 2018-03-02 15:45:14 +00:00
ostreams-unittest.cc Move utility code to src/utils 2019-05-23 14:13:34 +00:00
region-allocator-unittest.cc Introduce v8_enable_virtual_memory_cage 2021-08-11 16:13:42 +00:00
sys-info-unittest.cc Remove NaCl support. 2016-07-27 07:50:31 +00:00
template-utils-unittest.cc [base] Remove base::fold and base::all 2022-04-07 09:13:49 +00:00
threaded-list-unittest.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
vector-unittest.cc [base] Move utils/vector.h to base/vector.h 2021-06-18 13:33:13 +00:00
virtual-address-space-unittest.cc [base] Don't return bool from VirtualAddressSpace::Free* routines 2022-03-07 16:53:23 +00:00
vlq-base64-unittest.cc Add Base64 VLQ decoding support 2019-07-16 16:16:24 +00:00
vlq-unittest.cc [sparkplug][cleanup] Add helper to en-/decode VLQ. 2021-02-25 15:05:01 +00:00