23 Heap*
heap, std::shared_ptr<v8::TaskRunner> foreground_task_runner)
24 :
heap_(
heap), foreground_task_runner_(foreground_task_runner) {}
35 if (!was_already_requested) {
112 isolate->stack_guard()->RequestGC();
115 std::make_unique<BackgroundCollectionInterruptTask>(
heap_));
118 bool collection_performed =
false;
124 collection_performed =
false;
134 return collection_performed;
146 "V8.GC.TimeToCollectionOnBackground",
151 ->gc_time_to_collection_on_background()
152 ->AddTimedSample(delta);
void PostTask(std::unique_ptr< Task > task, const SourceLocation &location=SourceLocation::Current())
TimeDelta Elapsed() const
double InMillisecondsF() const
BackgroundCollectionInterruptTask(Heap *heap)
~BackgroundCollectionInterruptTask() override=default
void RunInternal() override
BackgroundCollectionInterruptTask & operator=(const BackgroundCollectionInterruptTask &)=delete
BackgroundCollectionInterruptTask(const BackgroundCollectionInterruptTask &)=delete
bool block_for_collection_
std::shared_ptr< v8::TaskRunner > foreground_task_runner_
void ResumeThreadsAwaitingCollection()
base::ElapsedTimer timer_
CollectionBarrier(Heap *heap, std::shared_ptr< v8::TaskRunner > foreground_task_runner)
bool collection_performed_
void StopTimeToCollectionTimer()
base::ConditionVariable cv_wakeup_
void CancelCollectionAndResumeThreads()
bool AwaitCollectionBackground(LocalHeap *local_heap)
void NotifyShutdownRequested()
std::atomic< bool > collection_requested_
void CheckCollectionRequested()
Isolate * isolate() const
V8_INLINE void ExecuteWhileParked(Callback callback)
#define DCHECK(condition)
#define TRACE_EVENT_INSTANT1(category_group, name, scope, arg1_name, arg1_val)
#define TRACE_EVENT_SCOPE_THREAD
#define TRACE_DISABLED_BY_DEFAULT(name)