Reland "Use preserve_most calling conventions for Zone::Expand"
This is a reland of commit 48fee7d232
.
We now use the "COMPONENT_BUILD" macro to disable preserve_all, which
covers more uses (like building libbase or libplatform, where we would
otherwise have to check for BUILDING_V8_BASE_SHARED or
BUILDING_V8_PLATFORM_SHARED).
Original change's description:
> Use preserve_most calling conventions for Zone::NewExpand
>
> The zone uses bump allocation in the fast-path, and falls back to
> allocating a new segment if there is not enough space.
> Since this is rarely executed and zone allocations happen a lot, we
> should mark `Zone::NewExpand` as "preserve_most" to make
> `Zone::Allocate` as fast and slim as possible.
>
> R=bikineev@chromium.org, leszeks@chromium.org
>
> Change-Id: I0d592a35440bc3d61ca04425fc2f98c8a8bbbaae
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4146436
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85258}
Change-Id: I1413d47d84f384a724850a6f5b60adf75bba84f8
Cq-Include-Trybots: luci.v8.try:v8_win64_dbg
Cq-Include-Trybots: luci.v8.try:v8_win_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162931
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85310}
This commit is contained in:
parent
601913ded3
commit
cfdb4e0791
@ -351,7 +351,7 @@ path. Add it with -I<path> to the command line
|
|||||||
// for now.
|
// for now.
|
||||||
#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \
|
#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \
|
||||||
defined(_M_ARM64)) /* x64 or arm64 */ \
|
defined(_M_ARM64)) /* x64 or arm64 */ \
|
||||||
&& !defined(BUILDING_V8_SHARED) && !defined(USING_V8_SHARED)
|
&& !defined(COMPONENT_BUILD)
|
||||||
# define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
|
# define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
|
||||||
#endif
|
#endif
|
||||||
# define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
|
# define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
|
||||||
|
@ -235,7 +235,7 @@ class V8_EXPORT_PRIVATE Zone final {
|
|||||||
|
|
||||||
// Expand the Zone to hold at least 'size' more bytes.
|
// Expand the Zone to hold at least 'size' more bytes.
|
||||||
// Should only be called if there is not enough room in the Zone already.
|
// Should only be called if there is not enough room in the Zone already.
|
||||||
V8_NOINLINE void Expand(size_t size);
|
V8_NOINLINE V8_PRESERVE_MOST void Expand(size_t size);
|
||||||
|
|
||||||
// The free region in the current (front) segment is represented as
|
// The free region in the current (front) segment is represented as
|
||||||
// the half-open interval [position, limit). The 'position' variable
|
// the half-open interval [position, limit). The 'position' variable
|
||||||
|
Loading…
Reference in New Issue
Block a user