421 {
422#ifdef SUPPORT_TIMELINE
424#endif
425 {
427
428 while (true) {
429 intptr_t planning_task = next_planning_task_->
fetch_add(1u);
430 if (planning_task >= num_tasks_) break;
431
433 Page*
head = partitions_[planning_task].
head;
435 free_current_ =
head->object_start();
436 free_end_ =
head->object_end();
437
440 }
441 }
442
444
445 if (next_setup_task_->
fetch_add(1u) == 0) {
446 compactor_->SetupLargePages();
447 }
448
450
451 while (true) {
452 intptr_t sliding_task = next_sliding_task_->
fetch_add(1u);
453 if (sliding_task >= num_tasks_) break;
454
456 Page*
head = partitions_[sliding_task].
head;
458 free_current_ =
head->object_start();
459 free_end_ =
head->object_end();
460
463 }
464
465
466
467 intptr_t free_remaining = free_end_ - free_current_;
468 if (free_remaining != 0) {
469 freelist_->
Free(free_current_, free_remaining);
470 }
471
472 ASSERT(free_page_ !=
nullptr);
473 partitions_[sliding_task].
tail = free_page_;
474
475 {
477 compactor_->ForwardLargePages();
478 }
479 }
480
481
482
483
484 bool more_forwarding_tasks = true;
485 while (more_forwarding_tasks) {
486 intptr_t forwarding_task = next_forwarding_task_->
fetch_add(1u);
487 switch (forwarding_task) {
488 case 0: {
491 break;
492 }
493 case 1: {
496 break;
497 }
498 case 2: {
501 break;
502 }
503 case 3: {
506 break;
507 }
508#ifndef PRODUCT
509 case 4: {
512 [&](Isolate* isolate) {
513 ObjectIdRing* ring = isolate->object_id_ring();
514 if (ring != nullptr) {
515 ring->VisitPointers(compactor_);
516 }
517 },
518 true);
519 break;
520 }
521#endif
522 default:
523 more_forwarding_tasks = false;
524 }
525 }
526 }
527}
void VisitObjectPointers(ObjectPointerVisitor *visitor)
void Free(uword addr, intptr_t size)
void ForwardWeakTables(ObjectPointerVisitor *visitor)
StoreBuffer * store_buffer() const
void ForEachIsolate(std::function< void(Isolate *isolate)> function, bool at_safepoint=false)
void VisitWeakPersistentHandles(HandleVisitor *visitor)
T fetch_add(T arg, std::memory_order order=std::memory_order_relaxed)
void VisitObjectPointers(ObjectPointerVisitor *visitor) const
static Thread * Current()
#define TIMELINE_FUNCTION_GC_DURATION(thread, name)