Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Attributes | List of all members
dart::StoreBuffer Class Reference

#include <pointer_block.h>

Inheritance diagram for dart::StoreBuffer:
dart::BlockStack< kStoreBufferBlockSize >

Public Types

enum  ThresholdPolicy { kCheckThreshold , kIgnoreThreshold }
 
- Public Types inherited from dart::BlockStack< kStoreBufferBlockSize >
typedef PointerBlock< BlockSize > Block
 

Public Member Functions

void PushBlock (Block *block, ThresholdPolicy policy)
 
bool Overflowed ()
 
intptr_t Size ()
 
- Public Member Functions inherited from dart::BlockStack< kStoreBufferBlockSize >
 BlockStack ()
 
 ~BlockStack ()
 
BlockPopNonFullBlock ()
 
BlockPopEmptyBlock ()
 
BlockPopNonEmptyBlock ()
 
BlockPopAll ()
 
void PushAll (Block *blocks)
 
void Reset ()
 
bool IsEmpty ()
 
BlockWaitForWork (RelaxedAtomic< uintptr_t > *num_busy, bool abort)
 
void VisitObjectPointers (ObjectPointerVisitor *visitor)
 

Static Public Attributes

static constexpr intptr_t kMaxNonEmpty = 100
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::BlockStack< kStoreBufferBlockSize >
static void Init ()
 
static void Cleanup ()
 
- Protected Member Functions inherited from dart::BlockStack< kStoreBufferBlockSize >
bool IsEmptyLocked ()
 
void PushBlockImpl (Block *block)
 
- Static Protected Member Functions inherited from dart::BlockStack< kStoreBufferBlockSize >
static void TrimGlobalEmpty ()
 
- Protected Attributes inherited from dart::BlockStack< kStoreBufferBlockSize >
List full_
 
List partial_
 
Monitor monitor_
 
- Static Protected Attributes inherited from dart::BlockStack< kStoreBufferBlockSize >
static constexpr intptr_t kMaxGlobalEmpty
 
static Listglobal_empty_
 
static Mutexglobal_mutex_
 

Detailed Description

Definition at line 287 of file pointer_block.h.

Member Enumeration Documentation

◆ ThresholdPolicy

Enumerator
kCheckThreshold 
kIgnoreThreshold 

Definition at line 292 of file pointer_block.h.

Member Function Documentation

◆ Overflowed()

bool dart::StoreBuffer::Overflowed ( )

Definition at line 251 of file pointer_block.cc.

251 {
252 MonitorLocker ml(&monitor_);
253 return (full_.length() + partial_.length()) > kMaxNonEmpty;
254}
static constexpr intptr_t kMaxNonEmpty

◆ PushBlock()

void dart::StoreBuffer::PushBlock ( Block block,
ThresholdPolicy  policy 
)

Definition at line 158 of file pointer_block.cc.

158 {
160 if ((policy == kCheckThreshold) && Overflowed()) {
161 MonitorLocker ml(&monitor_);
162 Thread* thread = Thread::Current();
163 // Sanity check: it makes no sense to schedule the GC in another isolate
164 // group.
165 // (If Isolate ever gets multiple store buffers, we should avoid this
166 // coupling by passing in an explicit callback+parameter at construction.)
167 ASSERT(thread->isolate_group()->store_buffer() == this);
168 thread->ScheduleInterrupts(Thread::kVMInterrupt);
169 }
170}
void PushBlockImpl(Block *block)
@ kVMInterrupt
Definition: thread.h:488
static Thread * Current()
Definition: thread.h:362
#define ASSERT(E)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network policy
Definition: switches.h:248

◆ Size()

intptr_t dart::StoreBuffer::Size ( )

Definition at line 256 of file pointer_block.cc.

256 {
257 ASSERT(Thread::Current()->OwnsGCSafepoint()); // No lock needed.
258 return full_.length() + partial_.length();
259}

Member Data Documentation

◆ kMaxNonEmpty

constexpr intptr_t dart::StoreBuffer::kMaxNonEmpty = 100
staticconstexpr

Definition at line 290 of file pointer_block.h.


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