v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
large-page-metadata.h
Go to the documentation of this file.
1// Copyright 2023 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_HEAP_LARGE_PAGE_METADATA_H_
6#define V8_HEAP_LARGE_PAGE_METADATA_H_
7
9
10namespace v8 {
11namespace internal {
12
14 public:
15 // A limit to guarantee that we do not overflow typed slot offset in the old
16 // to old remembered set. Note that this limit is higher than what assembler
17 // already imposes on x64 and ia32 architectures.
18 static constexpr int kMaxCodePageSize = 512 * MB;
19
21 DCHECK_IMPLIES(metadata, metadata->Chunk()->IsLargePage());
22 return static_cast<LargePageMetadata*>(metadata);
23 }
24
26 return cast(MutablePageMetadata::cast(metadata));
27 }
28
30
31 LargePageMetadata(Heap* heap, BaseSpace* space, size_t chunk_size,
33 VirtualMemory reservation, Executability executable);
34
36
40
45 return static_cast<const LargePageMetadata*>(list_node_.next());
46 }
47
48 void ClearOutOfLiveRangeSlots(Address free_start);
49
50 private:
51 friend class MemoryAllocator;
52};
53
54} // namespace internal
55
56namespace base {
57// Define special hash function for page pointers, to be used with std data
58// structures, e.g. std::unordered_set<LargePageMetadata*,
59// base::hash<LargePageMetadata*>
60template <>
61struct hash<i::LargePageMetadata*> : hash<i::MemoryChunkMetadata*> {};
62template <>
63struct hash<const i::LargePageMetadata*> : hash<const i::MemoryChunkMetadata*> {
64};
65} // namespace base
66
67} // namespace v8
68
69#endif // V8_HEAP_LARGE_PAGE_METADATA_H_
static Tagged< HeapObject > FromAddress(Address address)
static V8_INLINE LargePageMetadata * FromHeapObject(Tagged< HeapObject > o)
const LargePageMetadata * next_page() const
Tagged< HeapObject > GetObject() const
MemoryChunk::MainThreadFlags InitialFlags(Executability executable) const
LargePageMetadata(Heap *heap, BaseSpace *space, size_t chunk_size, Address area_start, Address area_end, VirtualMemory reservation, Executability executable)
void ClearOutOfLiveRangeSlots(Address free_start)
static LargePageMetadata * cast(MutablePageMetadata *metadata)
static LargePageMetadata * cast(MemoryChunkMetadata *metadata)
heap::ListNode< MutablePageMetadata > list_node_
static MutablePageMetadata * cast(MemoryChunkMetadata *metadata)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage * MB
Definition flags.cc:2197
uint32_t cast
#define DCHECK_IMPLIES(v1, v2)
Definition logging.h:493
#define V8_INLINE
Definition v8config.h:500