Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::ForceGrowthSafepointOperationScope Class Reference

#include <safepoint.h>

Inheritance diagram for dart::ForceGrowthSafepointOperationScope:
dart::ThreadStackResource dart::StackResource

Public Member Functions

 ForceGrowthSafepointOperationScope (Thread *T, SafepointLevel level)
 
 ~ForceGrowthSafepointOperationScope ()
 
- Public Member Functions inherited from dart::ThreadStackResource
 ThreadStackResource (Thread *T)
 
 ~ThreadStackResource ()
 
Threadthread () const
 
Isolateisolate () const
 
IsolateGroupisolate_group () const
 
- Public Member Functions inherited from dart::StackResource
 StackResource (ThreadState *thread)
 
virtual ~StackResource ()
 
ThreadStatethread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::StackResource
static void Unwind (ThreadState *thread)
 
static void UnwindAbove (ThreadState *thread, StackResource *new_top)
 

Detailed Description

Definition at line 67 of file safepoint.h.

Constructor & Destructor Documentation

◆ ForceGrowthSafepointOperationScope()

dart::ForceGrowthSafepointOperationScope::ForceGrowthSafepointOperationScope ( Thread T,
SafepointLevel  level 
)

Definition at line 32 of file safepoint.cc.

35 : ThreadStackResource(T), level_(level) {
36 ASSERT(T != nullptr);
37 IsolateGroup* IG = T->isolate_group();
38 ASSERT(IG != nullptr);
39
40 T->IncrementForceGrowthScopeDepth();
41
42 auto handler = IG->safepoint_handler();
43 handler->SafepointThreads(T, level_);
44}
#define IG
#define ASSERT(E)
#define T

◆ ~ForceGrowthSafepointOperationScope()

dart::ForceGrowthSafepointOperationScope::~ForceGrowthSafepointOperationScope ( )

Definition at line 46 of file safepoint.cc.

46 {
47 Thread* T = thread();
48 ASSERT(T != nullptr);
49 IsolateGroup* IG = T->isolate_group();
50 ASSERT(IG != nullptr);
51
52 auto handler = IG->safepoint_handler();
53 handler->ResumeThreads(T, level_);
54
55 T->DecrementForceGrowthScopeDepth();
56 if (!T->force_growth()) {
57 // Check if we passed the growth limit during the scope.
58 T->heap()->CheckCatchUp(T);
59 }
60}

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