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

#include <wasm-code-manager.h>

Collaboration diagram for v8::internal::wasm::WasmCodeManager:

Public Member Functions

 WasmCodeManager ()
 
 WasmCodeManager (const WasmCodeManager &)=delete
 
WasmCodeManageroperator= (const WasmCodeManager &)=delete
 
 ~WasmCodeManager ()
 
NativeModuleLookupNativeModule (Address pc) const
 
WasmCodeLookupCode (Isolate *isolate, Address pc) const
 
std::pair< WasmCode *, SafepointEntryLookupCodeAndSafepoint (Isolate *isolate, Address pc)
 
void FlushCodeLookupCache (Isolate *isolate)
 
size_t committed_code_space () const
 

Static Public Member Functions

static size_t EstimateLiftoffCodeSize (int body_size)
 
static size_t EstimateNativeModuleCodeSize (const WasmModule *)
 
static size_t EstimateNativeModuleCodeSize (int num_functions, int code_section_length)
 
static size_t EstimateNativeModuleMetaDataSize (const WasmModule *)
 
static bool HasMemoryProtectionKeySupport ()
 
static bool MemoryProtectionKeysEnabled ()
 
static bool MemoryProtectionKeyWritable ()
 

Private Member Functions

std::shared_ptr< NativeModuleNewNativeModule (Isolate *isolate, WasmEnabledFeatures enabled_features, WasmDetectedFeatures detected_features, CompileTimeImports compile_imports, size_t code_size_estimate, std::shared_ptr< const WasmModule > module)
 
V8_WARN_UNUSED_RESULT VirtualMemory TryAllocate (size_t size)
 
void Commit (base::AddressRegion)
 
void Decommit (base::AddressRegion)
 
void FreeNativeModule (base::Vector< VirtualMemory > owned_code, size_t committed_size)
 
void AssignRange (base::AddressRegion, NativeModule *)
 
WasmCodeLookupCode (Address pc) const
 

Private Attributes

const size_t max_committed_code_space_
 
std::atomic< size_ttotal_committed_code_space_ {0}
 
std::atomic< size_tcritical_committed_code_space_
 
base::Mutex native_modules_mutex_
 
std::map< Address, std::pair< Address, NativeModule * > > lookup_map_
 
std::atomic< Addressnext_code_space_hint_
 

Friends

class WasmCodeAllocator
 
class WasmCodeLookupCache
 
class WasmEngine
 
class WasmImportWrapperCache
 

Detailed Description

Definition at line 1124 of file wasm-code-manager.h.

Constructor & Destructor Documentation

◆ WasmCodeManager() [1/2]

v8::internal::wasm::WasmCodeManager::WasmCodeManager ( )

Definition at line 2122 of file wasm-code-manager.cc.

◆ WasmCodeManager() [2/2]

v8::internal::wasm::WasmCodeManager::WasmCodeManager ( const WasmCodeManager & )
delete

◆ ~WasmCodeManager()

v8::internal::wasm::WasmCodeManager::~WasmCodeManager ( )

Definition at line 2133 of file wasm-code-manager.cc.

Member Function Documentation

◆ AssignRange()

void v8::internal::wasm::WasmCodeManager::AssignRange ( base::AddressRegion region,
NativeModule * native_module )
private

Definition at line 2203 of file wasm-code-manager.cc.

◆ Commit()

void v8::internal::wasm::WasmCodeManager::Commit ( base::AddressRegion region)
private

Definition at line 2146 of file wasm-code-manager.cc.

Here is the call graph for this function:

◆ committed_code_space()

size_t v8::internal::wasm::WasmCodeManager::committed_code_space ( ) const
inline

Definition at line 1147 of file wasm-code-manager.h.

Here is the caller graph for this function:

◆ Decommit()

void v8::internal::wasm::WasmCodeManager::Decommit ( base::AddressRegion region)
private

Definition at line 2184 of file wasm-code-manager.cc.

Here is the call graph for this function:

◆ EstimateLiftoffCodeSize()

size_t v8::internal::wasm::WasmCodeManager::EstimateLiftoffCodeSize ( int body_size)
static

Definition at line 2321 of file wasm-code-manager.cc.

◆ EstimateNativeModuleCodeSize() [1/2]

size_t v8::internal::wasm::WasmCodeManager::EstimateNativeModuleCodeSize ( const WasmModule * module)
static

Definition at line 2327 of file wasm-code-manager.cc.

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

◆ EstimateNativeModuleCodeSize() [2/2]

size_t v8::internal::wasm::WasmCodeManager::EstimateNativeModuleCodeSize ( int num_functions,
int code_section_length )
static

Definition at line 2342 of file wasm-code-manager.cc.

Here is the call graph for this function:

◆ EstimateNativeModuleMetaDataSize()

size_t v8::internal::wasm::WasmCodeManager::EstimateNativeModuleMetaDataSize ( const WasmModule * module)
static

Definition at line 2382 of file wasm-code-manager.cc.

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

◆ FlushCodeLookupCache()

void v8::internal::wasm::WasmCodeManager::FlushCodeLookupCache ( Isolate * isolate)

Definition at line 2977 of file wasm-code-manager.cc.

Here is the caller graph for this function:

◆ FreeNativeModule()

void v8::internal::wasm::WasmCodeManager::FreeNativeModule ( base::Vector< VirtualMemory > owned_code,
size_t committed_size )
private

Definition at line 2886 of file wasm-code-manager.cc.

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

◆ HasMemoryProtectionKeySupport()

bool v8::internal::wasm::WasmCodeManager::HasMemoryProtectionKeySupport ( )
static

Definition at line 2406 of file wasm-code-manager.cc.

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

◆ LookupCode() [1/2]

WasmCode * v8::internal::wasm::WasmCodeManager::LookupCode ( Address pc) const
private

Definition at line 2928 of file wasm-code-manager.cc.

Here is the call graph for this function:

◆ LookupCode() [2/2]

WasmCode * v8::internal::wasm::WasmCodeManager::LookupCode ( Isolate * isolate,
Address pc ) const

Definition at line 2934 of file wasm-code-manager.cc.

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

◆ LookupCodeAndSafepoint()

std::pair< WasmCode *, SafepointEntry > v8::internal::wasm::WasmCodeManager::LookupCodeAndSafepoint ( Isolate * isolate,
Address pc )

Definition at line 2948 of file wasm-code-manager.cc.

Here is the call graph for this function:

◆ LookupNativeModule()

NativeModule * v8::internal::wasm::WasmCodeManager::LookupNativeModule ( Address pc) const

Definition at line 2913 of file wasm-code-manager.cc.

Here is the caller graph for this function:

◆ MemoryProtectionKeysEnabled()

bool v8::internal::wasm::WasmCodeManager::MemoryProtectionKeysEnabled ( )
static

Definition at line 2415 of file wasm-code-manager.cc.

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

◆ MemoryProtectionKeyWritable()

bool v8::internal::wasm::WasmCodeManager::MemoryProtectionKeyWritable ( )
static

Definition at line 2420 of file wasm-code-manager.cc.

◆ NewNativeModule()

std::shared_ptr< NativeModule > v8::internal::wasm::WasmCodeManager::NewNativeModule ( Isolate * isolate,
WasmEnabledFeatures enabled_features,
WasmDetectedFeatures detected_features,
CompileTimeImports compile_imports,
size_t code_size_estimate,
std::shared_ptr< const WasmModule > module )
private

Definition at line 2428 of file wasm-code-manager.cc.

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

◆ operator=()

WasmCodeManager & v8::internal::wasm::WasmCodeManager::operator= ( const WasmCodeManager & )
delete

◆ TryAllocate()

VirtualMemory v8::internal::wasm::WasmCodeManager::TryAllocate ( size_t size)
private

Definition at line 2210 of file wasm-code-manager.cc.

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

Friends And Related Symbol Documentation

◆ WasmCodeAllocator

friend class WasmCodeAllocator
friend

Definition at line 1178 of file wasm-code-manager.h.

◆ WasmCodeLookupCache

friend class WasmCodeLookupCache
friend

Definition at line 1179 of file wasm-code-manager.h.

◆ WasmEngine

friend class WasmEngine
friend

Definition at line 1180 of file wasm-code-manager.h.

◆ WasmImportWrapperCache

friend class WasmImportWrapperCache
friend

Definition at line 1181 of file wasm-code-manager.h.

Member Data Documentation

◆ critical_committed_code_space_

std::atomic<size_t> v8::internal::wasm::WasmCodeManager::critical_committed_code_space_
private

Definition at line 1207 of file wasm-code-manager.h.

◆ lookup_map_

std::map<Address, std::pair<Address, NativeModule*> > v8::internal::wasm::WasmCodeManager::lookup_map_
private

Definition at line 1214 of file wasm-code-manager.h.

◆ max_committed_code_space_

const size_t v8::internal::wasm::WasmCodeManager::max_committed_code_space_
private

Definition at line 1200 of file wasm-code-manager.h.

◆ native_modules_mutex_

base::Mutex v8::internal::wasm::WasmCodeManager::native_modules_mutex_
mutableprivate

Definition at line 1209 of file wasm-code-manager.h.

◆ next_code_space_hint_

std::atomic<Address> v8::internal::wasm::WasmCodeManager::next_code_space_hint_
private

Definition at line 1225 of file wasm-code-manager.h.

◆ total_committed_code_space_

std::atomic<size_t> v8::internal::wasm::WasmCodeManager::total_committed_code_space_ {0}
private

Definition at line 1202 of file wasm-code-manager.h.


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