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

#include <wasm-code-manager.h>

Collaboration diagram for v8::internal::wasm::NativeModule:

Classes

struct  CodeSpaceData
 
struct  JumpTablesRef
 

Public Types

enum class  RemoveFilter {
  kRemoveDebugCode , kRemoveNonDebugCode , kRemoveLiftoffCode , kRemoveTurbofanCode ,
  kRemoveAllCode
}
 
enum class  JumpTableType { kJumpTable , kFarJumpTable , kLazyCompileTable }
 
using CallIndirectTargetMap = absl::flat_hash_map<WasmCodePointer, uint32_t>
 

Public Member Functions

 NativeModule (const NativeModule &)=delete
 
NativeModuleoperator= (const NativeModule &)=delete
 
 ~NativeModule ()
 
std::unique_ptr< WasmCodeAddCode (int index, const CodeDesc &desc, int stack_slots, int ool_spill_count, uint32_t tagged_parameter_slots, base::Vector< const uint8_t > protected_instructions, base::Vector< const uint8_t > source_position_table, base::Vector< const uint8_t > inlining_positions, base::Vector< const uint8_t > deopt_data, WasmCode::Kind kind, ExecutionTier tier, ForDebugging for_debugging)
 
WasmCodePublishCode (UnpublishedWasmCode)
 
std::vector< WasmCode * > PublishCode (base::Vector< UnpublishedWasmCode >)
 
void UpdateWellKnownImports (base::Vector< WellKnownImport > entries)
 
void ReinstallDebugCode (WasmCode *)
 
std::pair< base::Vector< uint8_t >, JumpTablesRefAllocateForDeserializedCode (size_t total_code_size)
 
std::unique_ptr< WasmCodeAddDeserializedCode (int index, base::Vector< uint8_t > instructions, int stack_slots, int ool_spills, uint32_t tagged_parameter_slots, int safepoint_table_offset, int handler_table_offset, int constant_pool_offset, int code_comments_offset, int unpadded_binary_size, base::Vector< const uint8_t > protected_instructions_data, base::Vector< const uint8_t > reloc_info, base::Vector< const uint8_t > source_position_table, base::Vector< const uint8_t > inlining_positions, base::Vector< const uint8_t > deopt_data, WasmCode::Kind kind, ExecutionTier tier)
 
WasmCodeAddCodeForTesting (DirectHandle< Code > code, uint64_t signature_hash)
 
void InitializeJumpTableForLazyCompilation (uint32_t num_wasm_functions)
 
void InitializeCodePointerTableHandles (uint32_t num_wasm_functions)
 
void FreeCodePointerTableHandles ()
 
void UseLazyStubLocked (uint32_t func_index)
 
std::pair< std::vector< WasmCode * >, std::vector< WellKnownImport > > SnapshotCodeTable () const
 
std::vector< WasmCode * > SnapshotAllOwnedCode () const
 
WasmCodeGetCode (uint32_t index) const
 
bool HasCode (uint32_t index) const
 
bool HasCodeWithTier (uint32_t index, ExecutionTier tier) const
 
void SetWasmSourceMap (std::unique_ptr< WasmModuleSourceMap > source_map)
 
WasmModuleSourceMapGetWasmSourceMap () const
 
Address jump_table_start () const
 
Address GetNearCallTargetForFunction (uint32_t func_index, const JumpTablesRef &) const
 
Address GetJumpTableEntryForBuiltin (Builtin builtin, const JumpTablesRef &) const
 
uint32_t GetFunctionIndexFromJumpTableSlot (Address slot_address) const
 
CallIndirectTargetMap CreateIndirectCallTargetToFunctionIndexMap () const
 
void LogWasmCodes (Isolate *, Tagged< Script >)
 
CompilationStatecompilation_state () const
 
uint32_t num_functions () const
 
uint32_t num_imported_functions () const
 
uint32_t num_declared_functions () const
 
void set_lazy_compile_frozen (bool frozen)
 
bool lazy_compile_frozen () const
 
base::Vector< const uint8_t > wire_bytes () const
 
const WasmModulemodule () const
 
std::shared_ptr< const WasmModuleshared_module () const
 
size_t committed_code_space () const
 
size_t generated_code_size () const
 
size_t liftoff_bailout_count () const
 
size_t liftoff_code_size () const
 
size_t turbofan_code_size () const
 
void AddLazyCompilationTimeSample (int64_t sample)
 
int num_lazy_compilations () const
 
int64_t sum_lazy_compilation_time_in_ms () const
 
int64_t max_lazy_compilation_time_in_ms () const
 
bool ShouldLazyCompilationMetricsBeReported ()
 
bool ShouldPgoDataBeWritten ()
 
bool HasWireBytes () const
 
void SetWireBytes (base::OwnedVector< const uint8_t > wire_bytes)
 
void AddLiftoffBailout ()
 
WasmCodeLookup (Address) const
 
WasmEnabledFeatures enabled_features () const
 
const CompileTimeImportscompile_imports () const
 
Builtin GetBuiltinInJumptableSlot (Address target) const
 
void SampleCodeSize (Counters *) const
 
V8_WARN_UNUSED_RESULT UnpublishedWasmCode AddCompiledCode (WasmCompilationResult &)
 
V8_WARN_UNUSED_RESULT std::vector< UnpublishedWasmCodeAddCompiledCode (base::Vector< WasmCompilationResult >)
 
void SetDebugState (DebugState)
 
DebugState IsInDebugState () const
 
std::pair< size_t, size_tRemoveCompiledCode (RemoveFilter filter)
 
size_t SumLiftoffCodeSizeForTesting () const
 
void FreeCode (base::Vector< WasmCode *const >)
 
size_t GetNumberOfCodeSpacesForTesting () const
 
bool HasDebugInfo () const
 
DebugInfoGetDebugInfo ()
 
NamesProviderGetNamesProvider ()
 
std::atomic< uint32_t > * tiering_budget_array () const
 
Counterscounters () const
 
size_t EstimateCurrentMemoryConsumption () const
 
void PrintCurrentMemoryConsumptionEstimate () const
 
bool log_code () const
 
void EnableCodeLogging ()
 
void DisableCodeLogging ()
 
bool TrySetFastApiCallTarget (int func_index, Address target)
 
std::atomic< Address > * fast_api_targets () const
 
void set_fast_api_signature (int func_index, const MachineSignature *sig)
 
bool has_fast_api_signature (int index)
 
std::atomic< const MachineSignature * > * fast_api_signatures () const
 
WasmCodePointer GetCodePointerHandle (int index) const
 

Static Public Attributes

static constexpr ExternalPointerTag kManagedTag = kWasmNativeModuleTag
 
static constexpr bool kNeedsFarJumpsBetweenCodeSpaces = false
 

Private Member Functions

 NativeModule (WasmEnabledFeatures enabled_features, WasmDetectedFeatures detected_features, CompileTimeImports compile_imports, VirtualMemory code_space, std::shared_ptr< const WasmModule > module, std::shared_ptr< Counters > async_counters, std::shared_ptr< NativeModule > *shared_this)
 
std::unique_ptr< WasmCodeAddCodeWithCodeSpace (int index, const CodeDesc &desc, int stack_slots, int ool_spill_count, uint32_t tagged_parameter_slots, base::Vector< const uint8_t > protected_instructions_data, base::Vector< const uint8_t > source_position_table, base::Vector< const uint8_t > inlining_positions, base::Vector< const uint8_t > deopt_data, WasmCode::Kind kind, ExecutionTier tier, ForDebugging for_debugging, bool frame_has_feedback_slot, base::Vector< uint8_t > code_space, const JumpTablesRef &jump_tables_ref)
 
WasmCodeCreateEmptyJumpTableLocked (int jump_table_size, JumpTableType type)
 
WasmCodeCreateEmptyJumpTableInRegionLocked (int jump_table_size, base::AddressRegion, JumpTableType type)
 
JumpTablesRef FindJumpTablesForRegionLocked (base::AddressRegion) const
 
void UpdateCodeSize (size_t, ExecutionTier, ForDebugging)
 
void PatchJumpTablesLocked (uint32_t slot_index, Address target, Address code_pointer_table_target, uint64_t signature_hash)
 
void PatchJumpTableLocked (WritableJumpTablePair &jump_table_pair, const CodeSpaceData &, uint32_t slot_index, Address target)
 
void AddCodeSpaceLocked (base::AddressRegion)
 
WasmCodePublishCodeLocked (std::unique_ptr< WasmCode >, AssumptionsJournal *)
 
void TransferNewOwnedCodeLocked () const
 
bool should_update_code_table (WasmCode *new_code, WasmCode *prior_code) const
 

Private Attributes

OperationsBarrier::Token engine_scope_
 
WasmCodeAllocator code_allocator_
 
const WasmEnabledFeatures enabled_features_
 
const CompileTimeImports compile_imports_
 
std::shared_ptr< const WasmModulemodule_
 
std::unique_ptr< WasmModuleSourceMapsource_map_
 
std::shared_ptr< base::OwnedVector< const uint8_t > > wire_bytes_
 
WasmCodemain_jump_table_ = nullptr
 
WasmCodemain_far_jump_table_ = nullptr
 
WasmCodelazy_compile_table_ = nullptr
 
std::unique_ptr< CompilationStatecompilation_state_
 
std::unique_ptr< std::atomic< uint32_t >[]> tiering_budgets_
 
base::RecursiveMutex allocation_mutex_
 
std::map< Address, std::unique_ptr< WasmCode > > owned_code_
 
std::vector< std::unique_ptr< WasmCode > > new_owned_code_
 
std::unique_ptr< WasmCode *[]> code_table_
 
std::unique_ptr< WasmCodePointer[]> code_pointer_handles_
 
size_t code_pointer_handles_size_ = 0
 
std::vector< CodeSpaceDatacode_space_data_
 
std::unique_ptr< DebugInfodebug_info_
 
std::unique_ptr< NamesProvidernames_provider_
 
DebugState debug_state_ = kNotDebugging
 
bool lazy_compile_frozen_ = false
 
std::atomic< size_tliftoff_bailout_count_ {0}
 
std::atomic< size_tliftoff_code_size_ {0}
 
std::atomic< size_tturbofan_code_size_ {0}
 
std::atomic< int > num_lazy_compilations_ {0}
 
std::atomic< int64_t > sum_lazy_compilation_time_in_micro_sec_ {0}
 
std::atomic< int64_t > max_lazy_compilation_time_in_micro_sec_ {0}
 
std::atomic< boolshould_metrics_be_reported_ {true}
 
std::atomic< boolshould_pgo_data_be_written_ {true}
 
std::atomic< boollog_code_ {false}
 
std::unique_ptr< std::atomic< Address >[]> fast_api_targets_
 
std::unique_ptr< std::atomic< const MachineSignature * >[]> fast_api_signatures_
 

Friends

class WasmCode
 
class WasmCodeAllocator
 
class WasmCodeManager
 
class CodeSpaceWriteScope
 

Detailed Description

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

Member Typedef Documentation

◆ CallIndirectTargetMap

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

Member Enumeration Documentation

◆ JumpTableType

Enumerator
kJumpTable 
kFarJumpTable 
kLazyCompileTable 

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

◆ RemoveFilter

Enumerator
kRemoveDebugCode 
kRemoveNonDebugCode 
kRemoveLiftoffCode 
kRemoveTurbofanCode 
kRemoveAllCode 

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

Constructor & Destructor Documentation

◆ NativeModule() [1/2]

v8::internal::wasm::NativeModule::NativeModule ( const NativeModule & )
delete
Here is the caller graph for this function:

◆ ~NativeModule()

v8::internal::wasm::NativeModule::~NativeModule ( )

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

Here is the call graph for this function:

◆ NativeModule() [2/2]

v8::internal::wasm::NativeModule::NativeModule ( WasmEnabledFeatures enabled_features,
WasmDetectedFeatures detected_features,
CompileTimeImports compile_imports,
VirtualMemory code_space,
std::shared_ptr< const WasmModule > module,
std::shared_ptr< Counters > async_counters,
std::shared_ptr< NativeModule > * shared_this )
private

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

Here is the call graph for this function:

Member Function Documentation

◆ AddCode()

std::unique_ptr< WasmCode > v8::internal::wasm::NativeModule::AddCode ( int index,
const CodeDesc & desc,
int stack_slots,
int ool_spill_count,
uint32_t tagged_parameter_slots,
base::Vector< const uint8_t > protected_instructions,
base::Vector< const uint8_t > source_position_table,
base::Vector< const uint8_t > inlining_positions,
base::Vector< const uint8_t > deopt_data,
WasmCode::Kind kind,
ExecutionTier tier,
ForDebugging for_debugging )

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

Here is the call graph for this function:

◆ AddCodeForTesting()

WasmCode * v8::internal::wasm::NativeModule::AddCodeForTesting ( DirectHandle< Code > code,
uint64_t signature_hash )

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

Here is the call graph for this function:

◆ AddCodeSpaceLocked()

void v8::internal::wasm::NativeModule::AddCodeSpaceLocked ( base::AddressRegion region)
private

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

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

◆ AddCodeWithCodeSpace()

std::unique_ptr< WasmCode > v8::internal::wasm::NativeModule::AddCodeWithCodeSpace ( int index,
const CodeDesc & desc,
int stack_slots,
int ool_spill_count,
uint32_t tagged_parameter_slots,
base::Vector< const uint8_t > protected_instructions_data,
base::Vector< const uint8_t > source_position_table,
base::Vector< const uint8_t > inlining_positions,
base::Vector< const uint8_t > deopt_data,
WasmCode::Kind kind,
ExecutionTier tier,
ForDebugging for_debugging,
bool frame_has_feedback_slot,
base::Vector< uint8_t > code_space,
const JumpTablesRef & jump_tables_ref )
private

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

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

◆ AddCompiledCode() [1/2]

std::vector< UnpublishedWasmCode > v8::internal::wasm::NativeModule::AddCompiledCode ( base::Vector< WasmCompilationResult > results)

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

Here is the call graph for this function:

◆ AddCompiledCode() [2/2]

UnpublishedWasmCode v8::internal::wasm::NativeModule::AddCompiledCode ( WasmCompilationResult & result)

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

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

◆ AddDeserializedCode()

std::unique_ptr< WasmCode > v8::internal::wasm::NativeModule::AddDeserializedCode ( int index,
base::Vector< uint8_t > instructions,
int stack_slots,
int ool_spills,
uint32_t tagged_parameter_slots,
int safepoint_table_offset,
int handler_table_offset,
int constant_pool_offset,
int code_comments_offset,
int unpadded_binary_size,
base::Vector< const uint8_t > protected_instructions_data,
base::Vector< const uint8_t > reloc_info,
base::Vector< const uint8_t > source_position_table,
base::Vector< const uint8_t > inlining_positions,
base::Vector< const uint8_t > deopt_data,
WasmCode::Kind kind,
ExecutionTier tier )

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

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

◆ AddLazyCompilationTimeSample()

void v8::internal::wasm::NativeModule::AddLazyCompilationTimeSample ( int64_t sample)

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

◆ AddLiftoffBailout()

void v8::internal::wasm::NativeModule::AddLiftoffBailout ( )
inline

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

◆ AllocateForDeserializedCode()

std::pair< base::Vector< uint8_t >, NativeModule::JumpTablesRef > v8::internal::wasm::NativeModule::AllocateForDeserializedCode ( size_t total_code_size)

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

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

◆ committed_code_space()

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

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

Here is the caller graph for this function:

◆ compilation_state()

CompilationState * v8::internal::wasm::NativeModule::compilation_state ( ) const
inline

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

Here is the caller graph for this function:

◆ compile_imports()

const CompileTimeImports & v8::internal::wasm::NativeModule::compile_imports ( ) const
inline

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

Here is the caller graph for this function:

◆ counters()

Counters * v8::internal::wasm::NativeModule::counters ( ) const
inline

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

◆ CreateEmptyJumpTableInRegionLocked()

WasmCode * v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegionLocked ( int jump_table_size,
base::AddressRegion region,
JumpTableType type )
private

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

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

◆ CreateEmptyJumpTableLocked()

WasmCode * v8::internal::wasm::NativeModule::CreateEmptyJumpTableLocked ( int jump_table_size,
JumpTableType type )
private

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

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

◆ CreateIndirectCallTargetToFunctionIndexMap()

NativeModule::CallIndirectTargetMap v8::internal::wasm::NativeModule::CreateIndirectCallTargetToFunctionIndexMap ( ) const

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

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

◆ DisableCodeLogging()

void v8::internal::wasm::NativeModule::DisableCodeLogging ( )
inline

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

Here is the caller graph for this function:

◆ EnableCodeLogging()

void v8::internal::wasm::NativeModule::EnableCodeLogging ( )
inline

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

Here is the caller graph for this function:

◆ enabled_features()

WasmEnabledFeatures v8::internal::wasm::NativeModule::enabled_features ( ) const
inline

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

Here is the caller graph for this function:

◆ EstimateCurrentMemoryConsumption()

size_t v8::internal::wasm::NativeModule::EstimateCurrentMemoryConsumption ( ) const

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

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

◆ fast_api_signatures()

std::atomic< const MachineSignature * > * v8::internal::wasm::NativeModule::fast_api_signatures ( ) const
inline

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

Here is the caller graph for this function:

◆ fast_api_targets()

std::atomic< Address > * v8::internal::wasm::NativeModule::fast_api_targets ( ) const
inline

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

Here is the caller graph for this function:

◆ FindJumpTablesForRegionLocked()

NativeModule::JumpTablesRef v8::internal::wasm::NativeModule::FindJumpTablesForRegionLocked ( base::AddressRegion code_region) const
private

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

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

◆ FreeCode()

void v8::internal::wasm::NativeModule::FreeCode ( base::Vector< WasmCode *const > codes)

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

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

◆ FreeCodePointerTableHandles()

void v8::internal::wasm::NativeModule::FreeCodePointerTableHandles ( )

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

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

◆ generated_code_size()

size_t v8::internal::wasm::NativeModule::generated_code_size ( ) const
inline

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

◆ GetBuiltinInJumptableSlot()

Builtin v8::internal::wasm::NativeModule::GetBuiltinInJumptableSlot ( Address target) const

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

Here is the call graph for this function:

◆ GetCode()

WasmCode * v8::internal::wasm::NativeModule::GetCode ( uint32_t index) const

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

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

◆ GetCodePointerHandle()

WasmCodePointer v8::internal::wasm::NativeModule::GetCodePointerHandle ( int index) const

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

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

◆ GetDebugInfo()

DebugInfo * v8::internal::wasm::NativeModule::GetDebugInfo ( )

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

Here is the caller graph for this function:

◆ GetFunctionIndexFromJumpTableSlot()

uint32_t v8::internal::wasm::NativeModule::GetFunctionIndexFromJumpTableSlot ( Address slot_address) const

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

Here is the call graph for this function:

◆ GetJumpTableEntryForBuiltin()

Address v8::internal::wasm::NativeModule::GetJumpTableEntryForBuiltin ( Builtin builtin,
const JumpTablesRef & jump_tables ) const

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

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

◆ GetNamesProvider()

NamesProvider * v8::internal::wasm::NativeModule::GetNamesProvider ( )

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

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

◆ GetNearCallTargetForFunction()

Address v8::internal::wasm::NativeModule::GetNearCallTargetForFunction ( uint32_t func_index,
const JumpTablesRef & jump_tables ) const

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

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

◆ GetNumberOfCodeSpacesForTesting()

size_t v8::internal::wasm::NativeModule::GetNumberOfCodeSpacesForTesting ( ) const

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

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

◆ GetWasmSourceMap()

WasmModuleSourceMap * v8::internal::wasm::NativeModule::GetWasmSourceMap ( ) const

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

Here is the caller graph for this function:

◆ has_fast_api_signature()

bool v8::internal::wasm::NativeModule::has_fast_api_signature ( int index)
inline

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

◆ HasCode()

bool v8::internal::wasm::NativeModule::HasCode ( uint32_t index) const

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

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

◆ HasCodeWithTier()

bool v8::internal::wasm::NativeModule::HasCodeWithTier ( uint32_t index,
ExecutionTier tier ) const

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

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

◆ HasDebugInfo()

bool v8::internal::wasm::NativeModule::HasDebugInfo ( ) const

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

Here is the caller graph for this function:

◆ HasWireBytes()

bool v8::internal::wasm::NativeModule::HasWireBytes ( ) const
inline

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

Here is the caller graph for this function:

◆ InitializeCodePointerTableHandles()

void v8::internal::wasm::NativeModule::InitializeCodePointerTableHandles ( uint32_t num_wasm_functions)

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

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

◆ InitializeJumpTableForLazyCompilation()

void v8::internal::wasm::NativeModule::InitializeJumpTableForLazyCompilation ( uint32_t num_wasm_functions)

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

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

◆ IsInDebugState()

DebugState v8::internal::wasm::NativeModule::IsInDebugState ( ) const
inline

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

Here is the caller graph for this function:

◆ jump_table_start()

Address v8::internal::wasm::NativeModule::jump_table_start ( ) const
inline

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

Here is the caller graph for this function:

◆ lazy_compile_frozen()

bool v8::internal::wasm::NativeModule::lazy_compile_frozen ( ) const
inline

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

Here is the caller graph for this function:

◆ liftoff_bailout_count()

size_t v8::internal::wasm::NativeModule::liftoff_bailout_count ( ) const
inline

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

◆ liftoff_code_size()

size_t v8::internal::wasm::NativeModule::liftoff_code_size ( ) const
inline

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

◆ log_code()

bool v8::internal::wasm::NativeModule::log_code ( ) const
inline

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

Here is the caller graph for this function:

◆ LogWasmCodes()

void v8::internal::wasm::NativeModule::LogWasmCodes ( Isolate * isolate,
Tagged< Script > script )

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

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

◆ Lookup()

WasmCode * v8::internal::wasm::NativeModule::Lookup ( Address pc) const

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

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

◆ max_lazy_compilation_time_in_ms()

int64_t v8::internal::wasm::NativeModule::max_lazy_compilation_time_in_ms ( ) const
inline

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

◆ module()

const WasmModule * v8::internal::wasm::NativeModule::module ( ) const
inline

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

Here is the caller graph for this function:

◆ num_declared_functions()

uint32_t v8::internal::wasm::NativeModule::num_declared_functions ( ) const
inline

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

Here is the caller graph for this function:

◆ num_functions()

uint32_t v8::internal::wasm::NativeModule::num_functions ( ) const
inline

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

Here is the caller graph for this function:

◆ num_imported_functions()

uint32_t v8::internal::wasm::NativeModule::num_imported_functions ( ) const
inline

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

Here is the caller graph for this function:

◆ num_lazy_compilations()

int v8::internal::wasm::NativeModule::num_lazy_compilations ( ) const
inline

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

◆ operator=()

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

◆ PatchJumpTableLocked()

void v8::internal::wasm::NativeModule::PatchJumpTableLocked ( WritableJumpTablePair & jump_table_pair,
const CodeSpaceData & code_space_data,
uint32_t slot_index,
Address target )
private

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

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

◆ PatchJumpTablesLocked()

void v8::internal::wasm::NativeModule::PatchJumpTablesLocked ( uint32_t slot_index,
Address target,
Address code_pointer_table_target,
uint64_t signature_hash )
private

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

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

◆ PrintCurrentMemoryConsumptionEstimate()

void v8::internal::wasm::NativeModule::PrintCurrentMemoryConsumptionEstimate ( ) const

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

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

◆ PublishCode() [1/2]

std::vector< WasmCode * > v8::internal::wasm::NativeModule::PublishCode ( base::Vector< UnpublishedWasmCode > unpublished_codes)

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

Here is the call graph for this function:

◆ PublishCode() [2/2]

WasmCode * v8::internal::wasm::NativeModule::PublishCode ( UnpublishedWasmCode unpublished_code)

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

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

◆ PublishCodeLocked()

WasmCode * v8::internal::wasm::NativeModule::PublishCodeLocked ( std::unique_ptr< WasmCode > owned_code,
AssumptionsJournal * assumptions )
private

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

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

◆ ReinstallDebugCode()

void v8::internal::wasm::NativeModule::ReinstallDebugCode ( WasmCode * code)

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

Here is the call graph for this function:

◆ RemoveCompiledCode()

std::pair< size_t, size_t > v8::internal::wasm::NativeModule::RemoveCompiledCode ( RemoveFilter filter)

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

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

◆ SampleCodeSize()

void v8::internal::wasm::NativeModule::SampleCodeSize ( Counters * counters) const

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

Here is the call graph for this function:

◆ set_fast_api_signature()

void v8::internal::wasm::NativeModule::set_fast_api_signature ( int func_index,
const MachineSignature * sig )
inline

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

◆ set_lazy_compile_frozen()

void v8::internal::wasm::NativeModule::set_lazy_compile_frozen ( bool frozen)
inline

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

◆ SetDebugState()

void v8::internal::wasm::NativeModule::SetDebugState ( DebugState new_debug_state)

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

Here is the call graph for this function:

◆ SetWasmSourceMap()

void v8::internal::wasm::NativeModule::SetWasmSourceMap ( std::unique_ptr< WasmModuleSourceMap > source_map)

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

Here is the caller graph for this function:

◆ SetWireBytes()

void v8::internal::wasm::NativeModule::SetWireBytes ( base::OwnedVector< const uint8_t > wire_bytes)

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

Here is the call graph for this function:

◆ shared_module()

std::shared_ptr< const WasmModule > v8::internal::wasm::NativeModule::shared_module ( ) const
inline

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

◆ should_update_code_table()

bool v8::internal::wasm::NativeModule::should_update_code_table ( WasmCode * new_code,
WasmCode * prior_code ) const
private

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

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

◆ ShouldLazyCompilationMetricsBeReported()

bool v8::internal::wasm::NativeModule::ShouldLazyCompilationMetricsBeReported ( )
inline

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

◆ ShouldPgoDataBeWritten()

bool v8::internal::wasm::NativeModule::ShouldPgoDataBeWritten ( )
inline

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

◆ SnapshotAllOwnedCode()

std::vector< WasmCode * > v8::internal::wasm::NativeModule::SnapshotAllOwnedCode ( ) const

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

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

◆ SnapshotCodeTable()

std::pair< std::vector< WasmCode * >, std::vector< WellKnownImport > > v8::internal::wasm::NativeModule::SnapshotCodeTable ( ) const

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

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

◆ sum_lazy_compilation_time_in_ms()

int64_t v8::internal::wasm::NativeModule::sum_lazy_compilation_time_in_ms ( ) const
inline

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

◆ SumLiftoffCodeSizeForTesting()

size_t v8::internal::wasm::NativeModule::SumLiftoffCodeSizeForTesting ( ) const

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

Here is the call graph for this function:

◆ tiering_budget_array()

std::atomic< uint32_t > * v8::internal::wasm::NativeModule::tiering_budget_array ( ) const
inline

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

Here is the caller graph for this function:

◆ TransferNewOwnedCodeLocked()

void v8::internal::wasm::NativeModule::TransferNewOwnedCodeLocked ( ) const
private

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

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

◆ TrySetFastApiCallTarget()

bool v8::internal::wasm::NativeModule::TrySetFastApiCallTarget ( int func_index,
Address target )
inline

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

◆ turbofan_code_size()

size_t v8::internal::wasm::NativeModule::turbofan_code_size ( ) const
inline

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

◆ UpdateCodeSize()

void v8::internal::wasm::NativeModule::UpdateCodeSize ( size_t size,
ExecutionTier tier,
ForDebugging for_debugging )
private

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

Here is the caller graph for this function:

◆ UpdateWellKnownImports()

void v8::internal::wasm::NativeModule::UpdateWellKnownImports ( base::Vector< WellKnownImport > entries)

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

Here is the call graph for this function:

◆ UseLazyStubLocked()

void v8::internal::wasm::NativeModule::UseLazyStubLocked ( uint32_t func_index)

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

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

◆ wire_bytes()

base::Vector< const uint8_t > v8::internal::wasm::NativeModule::wire_bytes ( ) const
inline

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

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ CodeSpaceWriteScope

friend class CodeSpaceWriteScope
friend

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

◆ WasmCode

friend class WasmCode
friend

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

◆ WasmCodeAllocator

friend class WasmCodeAllocator
friend

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

◆ WasmCodeManager

friend class WasmCodeManager
friend

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

Member Data Documentation

◆ allocation_mutex_

base::RecursiveMutex v8::internal::wasm::NativeModule::allocation_mutex_
mutableprivate

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

◆ code_allocator_

WasmCodeAllocator v8::internal::wasm::NativeModule::code_allocator_
private

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

◆ code_pointer_handles_

std::unique_ptr<WasmCodePointer[]> v8::internal::wasm::NativeModule::code_pointer_handles_
private

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

◆ code_pointer_handles_size_

size_t v8::internal::wasm::NativeModule::code_pointer_handles_size_ = 0
private

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

◆ code_space_data_

std::vector<CodeSpaceData> v8::internal::wasm::NativeModule::code_space_data_
private

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

◆ code_table_

std::unique_ptr<WasmCode*[]> v8::internal::wasm::NativeModule::code_table_
private

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

◆ compilation_state_

std::unique_ptr<CompilationState> v8::internal::wasm::NativeModule::compilation_state_
private

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

◆ compile_imports_

const CompileTimeImports v8::internal::wasm::NativeModule::compile_imports_
private

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

◆ debug_info_

std::unique_ptr<DebugInfo> v8::internal::wasm::NativeModule::debug_info_
private

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

◆ debug_state_

DebugState v8::internal::wasm::NativeModule::debug_state_ = kNotDebugging
private

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

◆ enabled_features_

const WasmEnabledFeatures v8::internal::wasm::NativeModule::enabled_features_
private

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

◆ engine_scope_

OperationsBarrier::Token v8::internal::wasm::NativeModule::engine_scope_
private

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

◆ fast_api_signatures_

std::unique_ptr<std::atomic<const MachineSignature*>[]> v8::internal::wasm::NativeModule::fast_api_signatures_
private

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

◆ fast_api_targets_

std::unique_ptr<std::atomic<Address>[]> v8::internal::wasm::NativeModule::fast_api_targets_
private

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

◆ kManagedTag

ExternalPointerTag v8::internal::wasm::NativeModule::kManagedTag = kWasmNativeModuleTag
staticconstexpr

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

◆ kNeedsFarJumpsBetweenCodeSpaces

bool v8::internal::wasm::NativeModule::kNeedsFarJumpsBetweenCodeSpaces = false
staticconstexpr

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

◆ lazy_compile_frozen_

bool v8::internal::wasm::NativeModule::lazy_compile_frozen_ = false
private

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

◆ lazy_compile_table_

WasmCode* v8::internal::wasm::NativeModule::lazy_compile_table_ = nullptr
private

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

◆ liftoff_bailout_count_

std::atomic<size_t> v8::internal::wasm::NativeModule::liftoff_bailout_count_ {0}
private

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

◆ liftoff_code_size_

std::atomic<size_t> v8::internal::wasm::NativeModule::liftoff_code_size_ {0}
private

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

◆ log_code_

std::atomic<bool> v8::internal::wasm::NativeModule::log_code_ {false}
private

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

◆ main_far_jump_table_

WasmCode* v8::internal::wasm::NativeModule::main_far_jump_table_ = nullptr
private

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

◆ main_jump_table_

WasmCode* v8::internal::wasm::NativeModule::main_jump_table_ = nullptr
private

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

◆ max_lazy_compilation_time_in_micro_sec_

std::atomic<int64_t> v8::internal::wasm::NativeModule::max_lazy_compilation_time_in_micro_sec_ {0}
private

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

◆ module_

std::shared_ptr<const WasmModule> v8::internal::wasm::NativeModule::module_
private

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

◆ names_provider_

std::unique_ptr<NamesProvider> v8::internal::wasm::NativeModule::names_provider_
private

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

◆ new_owned_code_

std::vector<std::unique_ptr<WasmCode> > v8::internal::wasm::NativeModule::new_owned_code_
mutableprivate

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

◆ num_lazy_compilations_

std::atomic<int> v8::internal::wasm::NativeModule::num_lazy_compilations_ {0}
private

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

◆ owned_code_

std::map<Address, std::unique_ptr<WasmCode> > v8::internal::wasm::NativeModule::owned_code_
mutableprivate

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

◆ should_metrics_be_reported_

std::atomic<bool> v8::internal::wasm::NativeModule::should_metrics_be_reported_ {true}
private

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

◆ should_pgo_data_be_written_

std::atomic<bool> v8::internal::wasm::NativeModule::should_pgo_data_be_written_ {true}
private

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

◆ source_map_

std::unique_ptr<WasmModuleSourceMap> v8::internal::wasm::NativeModule::source_map_
private

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

◆ sum_lazy_compilation_time_in_micro_sec_

std::atomic<int64_t> v8::internal::wasm::NativeModule::sum_lazy_compilation_time_in_micro_sec_ {0}
private

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

◆ tiering_budgets_

std::unique_ptr<std::atomic<uint32_t>[]> v8::internal::wasm::NativeModule::tiering_budgets_
private

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

◆ turbofan_code_size_

std::atomic<size_t> v8::internal::wasm::NativeModule::turbofan_code_size_ {0}
private

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

◆ wire_bytes_

std::shared_ptr<base::OwnedVector<const uint8_t> > v8::internal::wasm::NativeModule::wire_bytes_
private

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


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