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

#include <feedback-vector.h>

Inheritance diagram for v8::internal::FeedbackVector:
Collaboration diagram for v8::internal::FeedbackVector:

Public Member Functions

bool is_empty () const
 
void clear_invocation_count (RelaxedStoreTag tag)
 
int osr_urgency () const
 
void set_osr_urgency (int urgency)
 
void reset_osr_urgency ()
 
void RequestOsrAtNextOpportunity ()
 
bool maybe_has_maglev_osr_code () const
 
bool maybe_has_turbofan_osr_code () const
 
bool maybe_has_optimized_osr_code () const
 
void set_maybe_has_optimized_osr_code (bool value, CodeKind code_kind)
 
void reset_osr_state ()
 
bool log_next_execution () const
 
void set_log_next_execution (bool value=true)
 
Tagged< Codeoptimized_code (IsolateForSandbox isolate) const
 
bool has_optimized_code () const
 
bool maybe_has_maglev_code () const
 
void set_maybe_has_maglev_code (bool value)
 
bool maybe_has_turbofan_code () const
 
void set_maybe_has_turbofan_code (bool value)
 
void SetOptimizedCode (IsolateForSandbox isolate, Tagged< Code > code)
 
void EvictOptimizedCodeMarkedForDeoptimization (Isolate *isolate, Tagged< SharedFunctionInfo > shared, const char *reason)
 
void ClearOptimizedCode ()
 
std::optional< Tagged< Code > > GetOptimizedOsrCode (Isolate *isolate, FeedbackSlot slot)
 
void SetOptimizedOsrCode (Isolate *isolate, FeedbackSlot slot, Tagged< Code > code)
 
TieringState tiering_state () const
 
V8_EXPORT_PRIVATE void set_tiering_state (TieringState state)
 
void reset_tiering_state ()
 
bool osr_tiering_in_progress ()
 
void set_osr_tiering_in_progress (bool osr_in_progress)
 
bool interrupt_budget_reset_by_ic_change () const
 
void set_interrupt_budget_reset_by_ic_change (bool value)
 
bool was_once_deoptimized () const
 
void set_was_once_deoptimized ()
 
void reset_flags ()
 
Tagged< MaybeObjectSynchronizedGet (FeedbackSlot slot) const
 
void SynchronizedSet (FeedbackSlot slot, Tagged< MaybeObject > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
Tagged< MaybeObjectGet (FeedbackSlot slot) const
 
Tagged< MaybeObjectGet (PtrComprCageBase cage_base, FeedbackSlot slot) const
 
DirectHandle< FeedbackCellGetClosureFeedbackCell (Isolate *isolate, int index) const
 
Tagged< FeedbackCellclosure_feedback_cell (int index) const
 
MaybeObjectSlot slots_start ()
 
V8_EXPORT_PRIVATE FeedbackSlotKind GetKind (FeedbackSlot slot) const
 
V8_EXPORT_PRIVATE FeedbackSlotKind GetKind (FeedbackSlot slot, AcquireLoadTag tag) const
 
TypeofMode GetTypeofMode (FeedbackSlot slot) const
 
LanguageMode GetLanguageMode (FeedbackSlot slot) const
 
void FeedbackSlotPrint (std::ostream &os, FeedbackSlot slot)
 
bool ClearSlots (Isolate *isolate)
 
bool ClearAllSlotsForTesting (Isolate *isolate)
 

Static Public Member Functions

static constexpr uint32_t FlagMaskForNeedsProcessingCheckFrom (CodeKind code_kind)
 
static int GetIndex (FeedbackSlot slot)
 
static FeedbackSlot ToSlot (intptr_t index)
 
static V8_EXPORT_PRIVATE Handle< FeedbackVectorNew (Isolate *isolate, DirectHandle< SharedFunctionInfo > shared, DirectHandle< ClosureFeedbackCellArray > closure_feedback_cell_array, DirectHandle< FeedbackCell > parent_feedback_cell, IsCompiledScope *is_compiled_scope)
 
static V8_EXPORT_PRIVATE Handle< FeedbackVectorNewForTesting (Isolate *isolate, const FeedbackVectorSpec *spec)
 
static V8_EXPORT_PRIVATE Handle< FeedbackVectorNewWithOneBinarySlotForTesting (Zone *zone, Isolate *isolate)
 
static V8_EXPORT_PRIVATE Handle< FeedbackVectorNewWithOneCompareSlotForTesting (Zone *zone, Isolate *isolate)
 
static DirectHandle< SymbolUninitializedSentinel (Isolate *isolate)
 
static Handle< SymbolMegamorphicSentinel (Isolate *isolate)
 
static DirectHandle< SymbolMegaDOMSentinel (Isolate *isolate)
 
static Tagged< SymbolRawUninitializedSentinel (Isolate *isolate)
 
static constexpr int OffsetOfElementAt (int index)
 

Public Attributes

 NEVER_READ_ONLY_SPACE
 

Static Public Attributes

static constexpr uint32_t kFlagsMaybeHasTurbofanCode
 
static constexpr uint32_t kFlagsMaybeHasMaglevCode
 
static constexpr uint32_t kFlagsHasAnyOptimizedCode
 
static constexpr uint32_t kFlagsTieringStateIsAnyRequested
 
static constexpr uint32_t kFlagsLogNextExecution
 
static constexpr uint8_t kInvocationCountBeforeStableDeoptSentinel = 0xff
 
static constexpr int kMaxOsrUrgency = 6
 

Private Member Functions

bool ClearSlots (Isolate *isolate, ClearBehavior behavior)
 
void Set (FeedbackSlot slot, Tagged< MaybeObject > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 

Static Private Member Functions

static void AddToVectorsForProfilingTools (Isolate *isolate, DirectHandle< FeedbackVector > vector)
 

Private Attributes

friend NexusConfig
 

Detailed Description

Definition at line 309 of file feedback-vector.h.

Member Function Documentation

◆ AddToVectorsForProfilingTools()

void v8::internal::FeedbackVector::AddToVectorsForProfilingTools ( Isolate * isolate,
DirectHandle< FeedbackVector > vector )
staticprivate

Definition at line 377 of file feedback-vector.cc.

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

◆ clear_invocation_count()

void v8::internal::FeedbackVector::clear_invocation_count ( RelaxedStoreTag tag)
inline

◆ ClearAllSlotsForTesting()

bool v8::internal::FeedbackVector::ClearAllSlotsForTesting ( Isolate * isolate)
inline

Definition at line 509 of file feedback-vector.h.

Here is the call graph for this function:

◆ ClearOptimizedCode()

void v8::internal::FeedbackVector::ClearOptimizedCode ( )

Definition at line 433 of file feedback-vector.cc.

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

◆ ClearSlots() [1/2]

bool v8::internal::FeedbackVector::ClearSlots ( Isolate * isolate)
inline

Definition at line 504 of file feedback-vector.h.

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

◆ ClearSlots() [2/2]

bool v8::internal::FeedbackVector::ClearSlots ( Isolate * isolate,
ClearBehavior behavior )
private

Definition at line 500 of file feedback-vector.cc.

Here is the call graph for this function:

◆ closure_feedback_cell()

Tagged< FeedbackCell > v8::internal::FeedbackVector::closure_feedback_cell ( int index) const
inline

Definition at line 337 of file feedback-vector-inl.h.

◆ EvictOptimizedCodeMarkedForDeoptimization()

void v8::internal::FeedbackVector::EvictOptimizedCodeMarkedForDeoptimization ( Isolate * isolate,
Tagged< SharedFunctionInfo > shared,
const char * reason )

Definition at line 441 of file feedback-vector.cc.

Here is the call graph for this function:

◆ FeedbackSlotPrint()

void v8::internal::FeedbackVector::FeedbackSlotPrint ( std::ostream & os,
FeedbackSlot slot )

◆ FlagMaskForNeedsProcessingCheckFrom()

uint32_t v8::internal::FeedbackVector::FlagMaskForNeedsProcessingCheckFrom ( CodeKind code_kind)
inlinestaticconstexpr

Definition at line 65 of file feedback-vector-inl.h.

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

◆ Get() [1/2]

Tagged< MaybeObject > v8::internal::FeedbackVector::Get ( FeedbackSlot slot) const
inline

Definition at line 317 of file feedback-vector-inl.h.

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

◆ Get() [2/2]

Tagged< MaybeObject > v8::internal::FeedbackVector::Get ( PtrComprCageBase cage_base,
FeedbackSlot slot ) const
inline

Definition at line 323 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ GetClosureFeedbackCell()

DirectHandle< FeedbackCell > v8::internal::FeedbackVector::GetClosureFeedbackCell ( Isolate * isolate,
int index ) const
inline

Definition at line 331 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ GetIndex()

static int v8::internal::FeedbackVector::GetIndex ( FeedbackSlot slot)
inlinestatic

Definition at line 429 of file feedback-vector.h.

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

◆ GetKind() [1/2]

FeedbackSlotKind v8::internal::FeedbackVector::GetKind ( FeedbackSlot slot) const

Definition at line 203 of file feedback-vector.cc.

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

◆ GetKind() [2/2]

FeedbackSlotKind v8::internal::FeedbackVector::GetKind ( FeedbackSlot slot,
AcquireLoadTag tag ) const

Definition at line 208 of file feedback-vector.cc.

Here is the call graph for this function:

◆ GetLanguageMode()

LanguageMode v8::internal::FeedbackVector::GetLanguageMode ( FeedbackSlot slot) const
inline

Definition at line 489 of file feedback-vector.h.

Here is the call graph for this function:

◆ GetOptimizedOsrCode()

std::optional< Tagged< Code > > v8::internal::FeedbackVector::GetOptimizedOsrCode ( Isolate * isolate,
FeedbackSlot slot )
inline

Definition at line 277 of file feedback-vector-inl.h.

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

◆ GetTypeofMode()

TypeofMode v8::internal::FeedbackVector::GetTypeofMode ( FeedbackSlot slot) const
inline

Definition at line 484 of file feedback-vector.h.

Here is the call graph for this function:

◆ has_optimized_code()

bool v8::internal::FeedbackVector::has_optimized_code ( ) const
inline

Definition at line 252 of file feedback-vector-inl.h.

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

◆ interrupt_budget_reset_by_ic_change()

bool v8::internal::FeedbackVector::interrupt_budget_reset_by_ic_change ( ) const
inline

Definition at line 190 of file feedback-vector-inl.h.

◆ is_empty()

bool v8::internal::FeedbackVector::is_empty ( ) const
inline

Definition at line 128 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ log_next_execution()

bool v8::internal::FeedbackVector::log_next_execution ( ) const
inline

Definition at line 224 of file feedback-vector-inl.h.

◆ maybe_has_maglev_code()

bool v8::internal::FeedbackVector::maybe_has_maglev_code ( ) const
inline

Definition at line 259 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ maybe_has_maglev_osr_code()

bool v8::internal::FeedbackVector::maybe_has_maglev_osr_code ( ) const
inline

Definition at line 171 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ maybe_has_optimized_osr_code()

bool v8::internal::FeedbackVector::maybe_has_optimized_osr_code ( ) const
inline

Definition at line 167 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ maybe_has_turbofan_code()

bool v8::internal::FeedbackVector::maybe_has_turbofan_code ( ) const
inline

Definition at line 267 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ maybe_has_turbofan_osr_code()

bool v8::internal::FeedbackVector::maybe_has_turbofan_osr_code ( ) const
inline

Definition at line 175 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ MegaDOMSentinel()

DirectHandle< Symbol > v8::internal::FeedbackVector::MegaDOMSentinel ( Isolate * isolate)
inlinestatic

Definition at line 471 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ MegamorphicSentinel()

Handle< Symbol > v8::internal::FeedbackVector::MegamorphicSentinel ( Isolate * isolate)
inlinestatic

Definition at line 467 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ New()

Handle< FeedbackVector > v8::internal::FeedbackVector::New ( Isolate * isolate,
DirectHandle< SharedFunctionInfo > shared,
DirectHandle< ClosureFeedbackCellArray > closure_feedback_cell_array,
DirectHandle< FeedbackCell > parent_feedback_cell,
IsCompiledScope * is_compiled_scope )
static

Definition at line 250 of file feedback-vector.cc.

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

◆ NewForTesting()

Handle< FeedbackVector > v8::internal::FeedbackVector::NewForTesting ( Isolate * isolate,
const FeedbackVectorSpec * spec )
static

Definition at line 340 of file feedback-vector.cc.

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

◆ NewWithOneBinarySlotForTesting()

Handle< FeedbackVector > v8::internal::FeedbackVector::NewWithOneBinarySlotForTesting ( Zone * zone,
Isolate * isolate )
static

Definition at line 361 of file feedback-vector.cc.

Here is the call graph for this function:

◆ NewWithOneCompareSlotForTesting()

Handle< FeedbackVector > v8::internal::FeedbackVector::NewWithOneCompareSlotForTesting ( Zone * zone,
Isolate * isolate )
static

Definition at line 369 of file feedback-vector.cc.

Here is the call graph for this function:

◆ OffsetOfElementAt()

static constexpr int v8::internal::FeedbackVector::OffsetOfElementAt ( int index)
inlinestaticconstexpr

Definition at line 531 of file feedback-vector.h.

Here is the caller graph for this function:

◆ optimized_code()

Tagged< Code > v8::internal::FeedbackVector::optimized_code ( IsolateForSandbox isolate) const
inline

Definition at line 232 of file feedback-vector-inl.h.

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

◆ osr_tiering_in_progress()

bool v8::internal::FeedbackVector::osr_tiering_in_progress ( )

Definition at line 492 of file feedback-vector.cc.

◆ osr_urgency()

int v8::internal::FeedbackVector::osr_urgency ( ) const
inline

◆ RawUninitializedSentinel()

Tagged< Symbol > v8::internal::FeedbackVector::RawUninitializedSentinel ( Isolate * isolate)
inlinestatic

Definition at line 475 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ RequestOsrAtNextOpportunity()

void v8::internal::FeedbackVector::RequestOsrAtNextOpportunity ( )
inline

Definition at line 161 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ reset_flags()

void v8::internal::FeedbackVector::reset_flags ( )

Definition at line 465 of file feedback-vector.cc.

◆ reset_osr_state()

void v8::internal::FeedbackVector::reset_osr_state ( )
inline

Definition at line 165 of file feedback-vector-inl.h.

◆ reset_osr_urgency()

void v8::internal::FeedbackVector::reset_osr_urgency ( )
inline

Definition at line 159 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ reset_tiering_state()

void v8::internal::FeedbackVector::reset_tiering_state ( )
inline

Definition at line 220 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ Set()

void v8::internal::FeedbackVector::Set ( FeedbackSlot slot,
Tagged< MaybeObject > value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
inlineprivate

Definition at line 363 of file feedback-vector-inl.h.

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

◆ set_interrupt_budget_reset_by_ic_change()

void v8::internal::FeedbackVector::set_interrupt_budget_reset_by_ic_change ( bool value)
inline

Definition at line 194 of file feedback-vector-inl.h.

◆ set_log_next_execution()

void v8::internal::FeedbackVector::set_log_next_execution ( bool value = true)
inline

Definition at line 228 of file feedback-vector-inl.h.

◆ set_maybe_has_maglev_code()

void v8::internal::FeedbackVector::set_maybe_has_maglev_code ( bool value)
inline

Definition at line 263 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ set_maybe_has_optimized_osr_code()

void v8::internal::FeedbackVector::set_maybe_has_optimized_osr_code ( bool value,
CodeKind code_kind )
inline

Definition at line 179 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ set_maybe_has_turbofan_code()

void v8::internal::FeedbackVector::set_maybe_has_turbofan_code ( bool value)
inline

Definition at line 271 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ set_osr_tiering_in_progress()

void v8::internal::FeedbackVector::set_osr_tiering_in_progress ( bool osr_in_progress)

Definition at line 496 of file feedback-vector.cc.

◆ set_osr_urgency()

void v8::internal::FeedbackVector::set_osr_urgency ( int urgency)
inline
Here is the caller graph for this function:

◆ set_tiering_state()

void v8::internal::FeedbackVector::set_tiering_state ( TieringState state)

Definition at line 457 of file feedback-vector.cc.

Here is the caller graph for this function:

◆ set_was_once_deoptimized()

void v8::internal::FeedbackVector::set_was_once_deoptimized ( )
inline

Definition at line 203 of file feedback-vector-inl.h.

◆ SetOptimizedCode()

void v8::internal::FeedbackVector::SetOptimizedCode ( IsolateForSandbox isolate,
Tagged< Code > code )

Definition at line 395 of file feedback-vector.cc.

Here is the call graph for this function:

◆ SetOptimizedOsrCode()

void v8::internal::FeedbackVector::SetOptimizedOsrCode ( Isolate * isolate,
FeedbackSlot slot,
Tagged< Code > code )

Definition at line 480 of file feedback-vector.cc.

Here is the call graph for this function:

◆ slots_start()

MaybeObjectSlot v8::internal::FeedbackVector::slots_start ( )
inline

Definition at line 369 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ SynchronizedGet()

Tagged< MaybeObject > v8::internal::FeedbackVector::SynchronizedGet ( FeedbackSlot slot) const
inline

Definition at line 342 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ SynchronizedSet()

void v8::internal::FeedbackVector::SynchronizedSet ( FeedbackSlot slot,
Tagged< MaybeObject > value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
inline

Definition at line 352 of file feedback-vector-inl.h.

Here is the call graph for this function:

◆ tiering_state()

TieringState v8::internal::FeedbackVector::tiering_state ( ) const
inline

Definition at line 216 of file feedback-vector-inl.h.

◆ ToSlot()

FeedbackSlot v8::internal::FeedbackVector::ToSlot ( intptr_t index)
inlinestatic

Definition at line 296 of file feedback-vector-inl.h.

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

◆ UninitializedSentinel()

DirectHandle< Symbol > v8::internal::FeedbackVector::UninitializedSentinel ( Isolate * isolate)
inlinestatic

Definition at line 463 of file feedback-vector-inl.h.

Here is the caller graph for this function:

◆ was_once_deoptimized()

bool v8::internal::FeedbackVector::was_once_deoptimized ( ) const
inline

Definition at line 198 of file feedback-vector-inl.h.

Member Data Documentation

◆ kFlagsHasAnyOptimizedCode

uint32_t v8::internal::FeedbackVector::kFlagsHasAnyOptimizedCode
staticconstexpr
Initial value:
=
FeedbackVector::MaybeHasMaglevCodeBit::kMask |
FeedbackVector::MaybeHasTurbofanCodeBit::kMask

Definition at line 323 of file feedback-vector.h.

◆ kFlagsLogNextExecution

uint32_t v8::internal::FeedbackVector::kFlagsLogNextExecution
staticconstexpr
Initial value:
=
FeedbackVector::LogNextExecutionBit::kMask

Definition at line 328 of file feedback-vector.h.

◆ kFlagsMaybeHasMaglevCode

uint32_t v8::internal::FeedbackVector::kFlagsMaybeHasMaglevCode
staticconstexpr
Initial value:
=
FeedbackVector::MaybeHasMaglevCodeBit::kMask

Definition at line 321 of file feedback-vector.h.

◆ kFlagsMaybeHasTurbofanCode

uint32_t v8::internal::FeedbackVector::kFlagsMaybeHasTurbofanCode
staticconstexpr
Initial value:
=
FeedbackVector::MaybeHasTurbofanCodeBit::kMask

Definition at line 319 of file feedback-vector.h.

◆ kFlagsTieringStateIsAnyRequested

uint32_t v8::internal::FeedbackVector::kFlagsTieringStateIsAnyRequested
staticconstexpr
Initial value:
=
kNoneOrInProgressMask << FeedbackVector::TieringStateBits::kShift
static constexpr uint32_t kNoneOrInProgressMask
Definition globals.h:2512

Definition at line 326 of file feedback-vector.h.

◆ kInvocationCountBeforeStableDeoptSentinel

uint8_t v8::internal::FeedbackVector::kInvocationCountBeforeStableDeoptSentinel = 0xff
staticconstexpr

Definition at line 351 of file feedback-vector.h.

◆ kMaxOsrUrgency

int v8::internal::FeedbackVector::kMaxOsrUrgency = 6
staticconstexpr

Definition at line 356 of file feedback-vector.h.

◆ NEVER_READ_ONLY_SPACE

v8::internal::FeedbackVector::NEVER_READ_ONLY_SPACE

Definition at line 317 of file feedback-vector.h.

◆ NexusConfig

friend v8::internal::FeedbackVector::NexusConfig
private

Definition at line 554 of file feedback-vector.h.


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