v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask Class Reference
Inheritance diagram for v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask:
Collaboration diagram for v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask:

Public Member Functions

 JobTask (Heap *heap, const PinnedObjects &&pinned_objects)
 
 ~JobTask ()
 
void Run (JobDelegate *delegate) override
 
size_t GetMaxConcurrency (size_t worker_count) const override
 
uint64_t trace_id () const
 
- Public Member Functions inherited from v8::JobTask

Private Types

using ObjectsAndSizes = std::vector<std::pair<Address, size_t>>
 
using PinnedObjectPerPage
 
using FreeSpaceHandler
 

Private Member Functions

size_t SweepPage (FreeSpaceHandler free_space_handler, MemoryChunk *chunk, PageMetadata *page, ObjectsAndSizes &pinned_objects_on_page)
 
void CreateFillerFreeHandler (Address address, size_t size)
 

Static Private Member Functions

static void CreateFillerFreeSpaceHandler (Heap *heap, Address address, size_t size, bool should_zap)
 
static void AddToFreeListFreeSpaceHandler (Heap *heap, Address address, size_t size, bool should_zap)
 

Private Attributes

Heap *const heap_
 
const uint64_t trace_id_
 
const bool should_zap_
 
PinnedObjects pinned_objects_
 
std::atomic_bool is_done_ {false}
 
PinnedObjectPerPage pinned_object_per_page_
 
PinnedObjectPerPage::iterator next_page_iterator_
 

Detailed Description

Definition at line 308 of file scavenger.h.

Member Typedef Documentation

◆ FreeSpaceHandler

Initial value:
std::function<void(Heap*, Address, size_t, bool)>

Definition at line 330 of file scavenger.h.

◆ ObjectsAndSizes

Definition at line 326 of file scavenger.h.

◆ PinnedObjectPerPage

Initial value:
std::unordered_map<MemoryChunk*, ObjectsAndSizes,
base::hash<MemoryChunk*>>
std::vector< std::pair< Address, size_t > > ObjectsAndSizes
Definition scavenger.h:326

Definition at line 327 of file scavenger.h.

Constructor & Destructor Documentation

◆ JobTask()

v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::JobTask ( Heap * heap,
const PinnedObjects && pinned_objects )

Definition at line 668 of file scavenger.cc.

◆ ~JobTask()

v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::~JobTask ( )
inlinevirtual

Reimplemented from v8::JobTask.

Definition at line 311 of file scavenger.h.

Member Function Documentation

◆ AddToFreeListFreeSpaceHandler()

void v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::AddToFreeListFreeSpaceHandler ( Heap * heap,
Address address,
size_t size,
bool should_zap )
staticprivate

Definition at line 750 of file scavenger.cc.

Here is the call graph for this function:

◆ CreateFillerFreeHandler()

void v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::CreateFillerFreeHandler ( Address address,
size_t size )
private

◆ CreateFillerFreeSpaceHandler()

void v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::CreateFillerFreeSpaceHandler ( Heap * heap,
Address address,
size_t size,
bool should_zap )
staticprivate

Definition at line 740 of file scavenger.cc.

Here is the call graph for this function:

◆ GetMaxConcurrency()

size_t v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::GetMaxConcurrency ( size_t worker_count) const
inlineoverridevirtual

Controls the maximum number of threads calling Run() concurrently, given the number of threads currently assigned to this job and executing Run(). Run() is only invoked if the number of threads previously running Run() was less than the value returned. In general, this should return the latest number of incomplete work items (smallest unit of work) left to process, including items that are currently in progress. |worker_count| is the number of threads currently assigned to this job which some callers may need to determine their return value. Since GetMaxConcurrency() is a leaf function, it must not call back any JobHandle methods.

Implements v8::JobTask.

Definition at line 319 of file scavenger.h.

◆ Run()

void v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::Run ( JobDelegate * delegate)
overridevirtual

Implements v8::JobTask.

Definition at line 678 of file scavenger.cc.

Here is the call graph for this function:

◆ SweepPage()

size_t v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::SweepPage ( FreeSpaceHandler free_space_handler,
MemoryChunk * chunk,
PageMetadata * page,
ObjectsAndSizes & pinned_objects_on_page )
private

Definition at line 762 of file scavenger.cc.

Here is the call graph for this function:

◆ trace_id()

uint64_t v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::trace_id ( ) const
inline

Definition at line 323 of file scavenger.h.

Member Data Documentation

◆ heap_

Heap* const v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::heap_
private

Definition at line 342 of file scavenger.h.

◆ is_done_

std::atomic_bool v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::is_done_ {false}
private

Definition at line 347 of file scavenger.h.

◆ next_page_iterator_

PinnedObjectPerPage::iterator v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::next_page_iterator_
private

Definition at line 349 of file scavenger.h.

◆ pinned_object_per_page_

PinnedObjectPerPage v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::pinned_object_per_page_
private

Definition at line 348 of file scavenger.h.

◆ pinned_objects_

PinnedObjects v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::pinned_objects_
private

Definition at line 345 of file scavenger.h.

◆ should_zap_

const bool v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::should_zap_
private

Definition at line 344 of file scavenger.h.

◆ trace_id_

const uint64_t v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask::trace_id_
private

Definition at line 343 of file scavenger.h.


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