v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ThreadIsolation Class Reference

#include <code-memory-access.h>

Collaboration diagram for v8::internal::ThreadIsolation:

Classes

class  JitAllocation
 
class  JitPage
 
class  JitPageReference
 
struct  StlAllocator
 
struct  TrustedData
 

Public Types

enum class  JitAllocationType {
  kInstructionStream , kWasmCode , kWasmJumpTable , kWasmFarJumpTable ,
  kWasmLazyCompileTable
}
 

Static Public Member Functions

static bool Enabled ()
 
static void Initialize (ThreadIsolatedAllocator *allocator)
 
static void RegisterJitPage (Address address, size_t size)
 
static void UnregisterJitPage (Address address, size_t size)
 
static V8_NODISCARD bool MakeExecutable (Address address, size_t size)
 
static WritableJitAllocation RegisterJitAllocation (Address addr, size_t size, JitAllocationType type, bool enforce_write_api=false)
 
static WritableJitAllocation RegisterInstructionStreamAllocation (Address addr, size_t size, bool enforce_write_api=false)
 
static void RegisterJitAllocations (Address start, const std::vector< size_t > &sizes, JitAllocationType type)
 
static WritableJitAllocation LookupJitAllocation (Address addr, size_t size, JitAllocationType type, bool enforce_write_api=false)
 
static WritableJitPage LookupWritableJitPage (Address addr, size_t size)
 
static void UnregisterWasmAllocation (Address addr, size_t size)
 
static bool CanLookupStartOfJitAllocationAt (Address inner_pointer)
 
static std::optional< AddressStartOfJitAllocationAt (Address inner_pointer)
 
static V8_NODISCARD bool WriteProtectMemory (Address addr, size_t size, PageAllocator::Permission page_permissions)
 
static void RegisterJitAllocationForTesting (Address obj, size_t size)
 
static void UnregisterJitAllocationForTesting (Address addr, size_t size)
 

Private Types

typedef std::map< Address, JitPage *, std::less< Address >, StlAllocator< std::pair< const Address, JitPage * > > > JitPageMap
 

Static Private Member Functions

static ThreadIsolatedAllocatorallocator ()
 
template<typename T , typename... Args>
static void ConstructNew (T **ptr, Args &&... args)
 
template<typename T >
static void Delete (T *ptr)
 
static JitPageReference LookupJitPage (Address addr, size_t size)
 
static JitPageReference LookupJitPageLocked (Address addr, size_t size)
 
static std::optional< JitPageReferenceTryLookupJitPage (Address addr, size_t size)
 
static std::optional< JitPageReferenceTryLookupJitPageLocked (Address addr, size_t size)
 
static JitPageReference SplitJitPageLocked (Address addr, size_t size)
 
static JitPageReference SplitJitPage (Address addr, size_t size)
 
static std::pair< JitPageReference, JitPageReferenceSplitJitPages (Address addr1, size_t size1, Address addr2, size_t size2)
 

Static Private Attributes

static struct TrustedData trusted_data_
 

Friends

template<class T >
struct StlAllocator
 
class WritableJitPage
 
class WritableJitAllocation
 
class WritableJumpTablePair
 

Detailed Description

Definition at line 142 of file code-memory-access.h.

Member Typedef Documentation

◆ JitPageMap

std::map<Address, JitPage*, std::less<Address>, StlAllocator<std::pair<const Address, JitPage*> > > v8::internal::ThreadIsolation::JitPageMap
private

Definition at line 334 of file code-memory-access.h.

Member Enumeration Documentation

◆ JitAllocationType

Enumerator
kInstructionStream 
kWasmCode 
kWasmJumpTable 
kWasmFarJumpTable 
kWasmLazyCompileTable 

Definition at line 147 of file code-memory-access.h.

Member Function Documentation

◆ allocator()

static ThreadIsolatedAllocator * v8::internal::ThreadIsolation::allocator ( )
inlinestaticprivate

Definition at line 326 of file code-memory-access.h.

Here is the caller graph for this function:

◆ CanLookupStartOfJitAllocationAt()

bool v8::internal::ThreadIsolation::CanLookupStartOfJitAllocationAt ( Address inner_pointer)
static

Definition at line 629 of file code-memory-access.cc.

Here is the call graph for this function:

◆ ConstructNew()

template<typename T , typename... Args>
void v8::internal::ThreadIsolation::ConstructNew ( T ** ptr,
Args &&... args )
staticprivate

Definition at line 59 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Delete()

template<typename T >
void v8::internal::ThreadIsolation::Delete ( T * ptr)
staticprivate

Definition at line 71 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Enabled()

bool v8::internal::ThreadIsolation::Enabled ( )
static

Definition at line 49 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

void v8::internal::ThreadIsolation::Initialize ( ThreadIsolatedAllocator * allocator)
static

Definition at line 81 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LookupJitAllocation()

WritableJitAllocation v8::internal::ThreadIsolation::LookupJitAllocation ( Address addr,
size_t size,
JitAllocationType type,
bool enforce_write_api = false )
static

Definition at line 489 of file code-memory-access.cc.

Here is the caller graph for this function:

◆ LookupJitPage()

ThreadIsolation::JitPageReference v8::internal::ThreadIsolation::LookupJitPage ( Address addr,
size_t size )
staticprivate

Definition at line 147 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LookupJitPageLocked()

ThreadIsolation::JitPageReference v8::internal::ThreadIsolation::LookupJitPageLocked ( Address addr,
size_t size )
staticprivate

Definition at line 138 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LookupWritableJitPage()

WritableJitPage v8::internal::ThreadIsolation::LookupWritableJitPage ( Address addr,
size_t size )
static

Definition at line 154 of file code-memory-access.cc.

Here is the caller graph for this function:

◆ MakeExecutable()

bool v8::internal::ThreadIsolation::MakeExecutable ( Address address,
size_t size )
static

Definition at line 460 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterInstructionStreamAllocation()

WritableJitAllocation v8::internal::ThreadIsolation::RegisterInstructionStreamAllocation ( Address addr,
size_t size,
bool enforce_write_api = false )
static

Definition at line 482 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterJitAllocation()

WritableJitAllocation v8::internal::ThreadIsolation::RegisterJitAllocation ( Address addr,
size_t size,
JitAllocationType type,
bool enforce_write_api = false )
static

Definition at line 474 of file code-memory-access.cc.

Here is the caller graph for this function:

◆ RegisterJitAllocationForTesting()

void v8::internal::ThreadIsolation::RegisterJitAllocationForTesting ( Address obj,
size_t size )
static

Definition at line 518 of file code-memory-access.cc.

Here is the call graph for this function:

◆ RegisterJitAllocations()

void v8::internal::ThreadIsolation::RegisterJitAllocations ( Address start,
const std::vector< size_t > & sizes,
JitAllocationType type )
static

Definition at line 497 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterJitPage()

void v8::internal::ThreadIsolation::RegisterJitPage ( Address address,
size_t size )
static

Definition at line 406 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SplitJitPage()

ThreadIsolation::JitPageReference v8::internal::ThreadIsolation::SplitJitPage ( Address addr,
size_t size )
staticprivate

Definition at line 535 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SplitJitPageLocked()

ThreadIsolation::JitPageReference v8::internal::ThreadIsolation::SplitJitPageLocked ( Address addr,
size_t size )
staticprivate

Definition at line 541 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SplitJitPages()

std::pair< ThreadIsolation::JitPageReference, ThreadIsolation::JitPageReference > v8::internal::ThreadIsolation::SplitJitPages ( Address addr1,
size_t size1,
Address addr2,
size_t size2 )
staticprivate

Definition at line 568 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartOfJitAllocationAt()

std::optional< Address > v8::internal::ThreadIsolation::StartOfJitAllocationAt ( Address inner_pointer)
static

Definition at line 583 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryLookupJitPage()

std::optional< ThreadIsolation::JitPageReference > v8::internal::ThreadIsolation::TryLookupJitPage ( Address addr,
size_t size )
staticprivate

Definition at line 161 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryLookupJitPageLocked()

std::optional< ThreadIsolation::JitPageReference > v8::internal::ThreadIsolation::TryLookupJitPageLocked ( Address addr,
size_t size )
staticprivate

Definition at line 168 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnregisterJitAllocationForTesting()

void v8::internal::ThreadIsolation::UnregisterJitAllocationForTesting ( Address addr,
size_t size )
static

Definition at line 524 of file code-memory-access.cc.

Here is the call graph for this function:

◆ UnregisterJitPage()

void v8::internal::ThreadIsolation::UnregisterJitPage ( Address address,
size_t size )
static

Definition at line 416 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnregisterWasmAllocation()

void v8::internal::ThreadIsolation::UnregisterWasmAllocation ( Address addr,
size_t size )
static

Definition at line 530 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteProtectMemory()

bool v8::internal::ThreadIsolation::WriteProtectMemory ( Address addr,
size_t size,
PageAllocator::Permission page_permissions )
static

Definition at line 594 of file code-memory-access.cc.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ StlAllocator

template<class T >
friend struct StlAllocator
friend

Definition at line 383 of file code-memory-access.h.

◆ WritableJitAllocation

friend class WritableJitAllocation
friend

Definition at line 385 of file code-memory-access.h.

◆ WritableJitPage

friend class WritableJitPage
friend

Definition at line 384 of file code-memory-access.h.

◆ WritableJumpTablePair

friend class WritableJumpTablePair
friend

Definition at line 386 of file code-memory-access.h.

Member Data Documentation

◆ trusted_data_

ThreadIsolation::TrustedData v8::internal::ThreadIsolation::trusted_data_
staticprivate

Definition at line 353 of file code-memory-access.h.


The documentation for this class was generated from the following files: