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

#include <memory-reducer.h>

Collaboration diagram for v8::internal::MemoryReducer:

Classes

struct  Event
 
class  State
 
class  TimerTask
 

Public Types

enum  Id { kUninit , kDone , kWait , kRun }
 
enum  EventType { kTimer , kMarkCompact , kPossibleGarbage }
 

Public Member Functions

 MemoryReducer (Heap *heap)
 
 MemoryReducer (const MemoryReducer &)=delete
 
MemoryReduceroperator= (const MemoryReducer &)=delete
 
void NotifyMarkCompact (size_t committed_memory_before)
 
void NotifyPossibleGarbage ()
 
void ScheduleTimer (double delay_ms)
 
void TearDown ()
 
Heapheap ()
 
bool ShouldGrowHeapSlowly ()
 

Static Public Member Functions

static State Step (const State &state, const Event &event)
 
static int MaxNumberOfGCs ()
 
static bool IsFrozen (const Heap *heap)
 

Static Public Attributes

static const int kLongDelayMs = 8000
 
static const int kShortDelayMs = 500
 
static const int kWatchdogDelayMs = 100000
 
static const double kCommittedMemoryFactor = 1.1
 
static const size_t kCommittedMemoryDelta = 10 * MB
 

Private Member Functions

void NotifyTimer (const Event &event)
 

Static Private Member Functions

static bool WatchdogGC (const State &state, const Event &event)
 

Private Attributes

Heapheap_
 
std::shared_ptr< v8::TaskRunnertaskrunner_
 
State state_
 
unsigned int js_calls_counter_
 
double js_calls_sample_time_ms_
 
int start_delay_ms_ = false
 

Friends

class heap::HeapTester
 

Detailed Description

Definition at line 87 of file memory-reducer.h.

Member Enumeration Documentation

◆ EventType

Enumerator
kTimer 
kMarkCompact 
kPossibleGarbage 

Definition at line 146 of file memory-reducer.h.

◆ Id

Enumerator
kUninit 
kDone 
kWait 
kRun 

Definition at line 89 of file memory-reducer.h.

Constructor & Destructor Documentation

◆ MemoryReducer() [1/2]

v8::internal::MemoryReducer::MemoryReducer ( Heap * heap)
explicit

Definition at line 23 of file memory-reducer.cc.

◆ MemoryReducer() [2/2]

v8::internal::MemoryReducer::MemoryReducer ( const MemoryReducer & )
delete

Member Function Documentation

◆ heap()

Heap * v8::internal::MemoryReducer::heap ( )
inline

Definition at line 180 of file memory-reducer.h.

Here is the caller graph for this function:

◆ IsFrozen()

bool v8::internal::MemoryReducer::IsFrozen ( const Heap * heap)
static

Definition at line 246 of file memory-reducer.cc.

Here is the caller graph for this function:

◆ MaxNumberOfGCs()

int v8::internal::MemoryReducer::MaxNumberOfGCs ( )
static

Definition at line 240 of file memory-reducer.cc.

Here is the caller graph for this function:

◆ NotifyMarkCompact()

void v8::internal::MemoryReducer::NotifyMarkCompact ( size_t committed_memory_before)

Definition at line 103 of file memory-reducer.cc.

Here is the call graph for this function:

◆ NotifyPossibleGarbage()

void v8::internal::MemoryReducer::NotifyPossibleGarbage ( )

Definition at line 132 of file memory-reducer.cc.

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

◆ NotifyTimer()

void v8::internal::MemoryReducer::NotifyTimer ( const Event & event)
private

Definition at line 75 of file memory-reducer.cc.

Here is the call graph for this function:

◆ operator=()

MemoryReducer & v8::internal::MemoryReducer::operator= ( const MemoryReducer & )
delete

◆ ScheduleTimer()

void v8::internal::MemoryReducer::ScheduleTimer ( double delay_ms)

Definition at line 228 of file memory-reducer.cc.

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

◆ ShouldGrowHeapSlowly()

bool v8::internal::MemoryReducer::ShouldGrowHeapSlowly ( )
inline

Definition at line 182 of file memory-reducer.h.

◆ Step()

MemoryReducer::State v8::internal::MemoryReducer::Step ( const State & state,
const Event & event )
static

Definition at line 156 of file memory-reducer.cc.

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

◆ TearDown()

void v8::internal::MemoryReducer::TearDown ( )

Definition at line 237 of file memory-reducer.cc.

Here is the call graph for this function:

◆ WatchdogGC()

bool v8::internal::MemoryReducer::WatchdogGC ( const State & state,
const Event & event )
staticprivate

Definition at line 149 of file memory-reducer.cc.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ heap::HeapTester

friend class heap::HeapTester
friend

Definition at line 213 of file memory-reducer.h.

Member Data Documentation

◆ heap_

Heap* v8::internal::MemoryReducer::heap_
private

Definition at line 205 of file memory-reducer.h.

◆ js_calls_counter_

unsigned int v8::internal::MemoryReducer::js_calls_counter_
private

Definition at line 208 of file memory-reducer.h.

◆ js_calls_sample_time_ms_

double v8::internal::MemoryReducer::js_calls_sample_time_ms_
private

Definition at line 209 of file memory-reducer.h.

◆ kCommittedMemoryDelta

const size_t v8::internal::MemoryReducer::kCommittedMemoryDelta = 10 * MB
static

Definition at line 178 of file memory-reducer.h.

◆ kCommittedMemoryFactor

const double v8::internal::MemoryReducer::kCommittedMemoryFactor = 1.1
static

Definition at line 175 of file memory-reducer.h.

◆ kLongDelayMs

const int v8::internal::MemoryReducer::kLongDelayMs = 8000
static

Definition at line 170 of file memory-reducer.h.

◆ kShortDelayMs

const int v8::internal::MemoryReducer::kShortDelayMs = 500
static

Definition at line 171 of file memory-reducer.h.

◆ kWatchdogDelayMs

const int v8::internal::MemoryReducer::kWatchdogDelayMs = 100000
static

Definition at line 172 of file memory-reducer.h.

◆ start_delay_ms_

int v8::internal::MemoryReducer::start_delay_ms_ = false
private

Definition at line 210 of file memory-reducer.h.

◆ state_

State v8::internal::MemoryReducer::state_
private

Definition at line 207 of file memory-reducer.h.

◆ taskrunner_

std::shared_ptr<v8::TaskRunner> v8::internal::MemoryReducer::taskrunner_
private

Definition at line 206 of file memory-reducer.h.


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