Lines Matching refs:collector
345 last_gc_type_(collector::kGcTypeNone), in Heap()
346 next_gc_type_(collector::kGcTypePartial), in Heap()
448 auto [uffd_supported, minor_fault_supported] = collector::MarkCompact::GetUffdAndMinorFault(); in Heap()
748 if (collector::SemiSpace::kUseRememberedSet && non_moving_space_ != main_space_) { in Heap()
786 garbage_collectors_.push_back(new collector::MarkSweep(this, concurrent)); in Heap()
787 garbage_collectors_.push_back(new collector::PartialMarkSweep(this, concurrent)); in Heap()
788 garbage_collectors_.push_back(new collector::StickyMarkSweep(this, concurrent)); in Heap()
795 semi_space_collector_ = new collector::SemiSpace(this); in Heap()
799 mark_compact_ = new collector::MarkCompact(this); in Heap()
803 concurrent_copying_collector_ = new collector::ConcurrentCopying(this, in Heap()
809 young_concurrent_copying_collector_ = new collector::ConcurrentCopying( in Heap()
923 if (collector::SemiSpace::kUseRememberedSet) { in CreateMallocSpaceFromMemMap()
950 if (collector::SemiSpace::kUseRememberedSet && main_space_ != nullptr) { in CreateMainMallocSpace()
1267 for (auto* collector : garbage_collectors_) { in GetTotalGcCpuTime() local
1268 sum += collector->GetTotalCpuTime(); in GetTotalGcCpuTime()
1279 for (auto* collector : garbage_collectors_) { in DumpGcPerformanceInfo() local
1280 total_duration += collector->GetCumulativeTimings().GetTotalNs(); in DumpGcPerformanceInfo()
1281 total_paused_time += collector->GetTotalPausedTimeNs(); in DumpGcPerformanceInfo()
1282 collector->DumpPerformanceInfo(os); in DumpGcPerformanceInfo()
1339 for (auto* collector : garbage_collectors_) { in ResetGcPerformanceInfo() local
1340 collector->ResetMeasurements(); in ResetGcPerformanceInfo()
1370 for (auto* collector : garbage_collectors_) { in GetGcCount() local
1371 gc_count += collector->GetCumulativeTimings().GetIterations(); in GetGcCount()
1378 for (auto* collector : garbage_collectors_) { in GetGcTime() local
1379 gc_time += collector->GetCumulativeTimings().GetTotalNs(); in GetGcTime()
1585 CollectGarbageInternal(collector::kGcTypeFull, in DoPendingCollectorTransition()
1733 FinishGC(self, collector::kGcTypeNone); in TrimSpaces()
1971 collector::GcType last_gc = in AllocateInternalWithGc()
1980 if (last_gc != collector::kGcTypeNone) { in AllocateInternalWithGc()
2017 collector::GcType tried_type = next_gc_type_; in AllocateInternalWithGc()
2021 != collector::kGcTypeNone); in AllocateInternalWithGc()
2228 FinishGC(self, collector::kGcTypeNone); in PerformHomogeneousSpaceCompact()
2231 collector::GarbageCollector* collector; in PerformHomogeneousSpaceCompact() local
2243 collector = Compact(to_space, from_space, kGcCauseHomogeneousSpaceCompact); in PerformHomogeneousSpaceCompact()
2263 LogGC(kGcCauseHomogeneousSpaceCompact, collector); in PerformHomogeneousSpaceCompact()
2264 FinishGC(self, collector::kGcTypeFull); in PerformHomogeneousSpaceCompact()
2304 gc_plan_.push_back(collector::kGcTypeSticky); in ChangeCollector()
2306 gc_plan_.push_back(collector::kGcTypeFull); in ChangeCollector()
2315 gc_plan_.push_back(collector::kGcTypeFull); in ChangeCollector()
2324 gc_plan_.push_back(collector::kGcTypeFull); in ChangeCollector()
2333 gc_plan_.push_back(collector::kGcTypeSticky); in ChangeCollector()
2334 gc_plan_.push_back(collector::kGcTypePartial); in ChangeCollector()
2335 gc_plan_.push_back(collector::kGcTypeFull); in ChangeCollector()
2340 gc_plan_.push_back(collector::kGcTypeSticky); in ChangeCollector()
2341 gc_plan_.push_back(collector::kGcTypePartial); in ChangeCollector()
2342 gc_plan_.push_back(collector::kGcTypeFull); in ChangeCollector()
2356 class ZygoteCompactingCollector final : public collector::SemiSpace {
2485 CollectGarbageInternal(collector::kGcTypeFull, kGcCauseBackground, false, GC_NUM_ANY); in PreZygoteFork()
2576 if (collector::SemiSpace::kUseRememberedSet) { in PreZygoteFork()
2600 && gc::collector::ConcurrentCopying::kGrayDirtyImmuneObjects; in PreZygoteFork()
2637 if (collector::SemiSpace::kUseRememberedSet) { in PreZygoteFork()
2682 collector::GarbageCollector* Heap::Compact(space::ContinuousMemMapAllocSpace* target_space, in Compact()
2756 collector::GcType Heap::CollectGarbageInternal(collector::GcType gc_type, in CollectGarbageInternal()
2764 case collector::kGcTypePartial: { in CollectGarbageInternal()
2767 return collector::kGcTypeNone; in CollectGarbageInternal()
2789 return collector::kGcTypeNone; in CollectGarbageInternal()
2802 return collector::kGcTypeNone; in CollectGarbageInternal()
2810 return collector::kGcTypeNone; in CollectGarbageInternal()
2814 return collector::kGcTypeNone; in CollectGarbageInternal()
2825 DCHECK_LT(gc_type, collector::kGcTypeMax); in CollectGarbageInternal()
2826 DCHECK_NE(gc_type, collector::kGcTypeNone); in CollectGarbageInternal()
2828 collector::GarbageCollector* collector = nullptr; in CollectGarbageInternal() local
2840 collector = semi_space_collector_; in CollectGarbageInternal()
2843 collector = mark_compact_; in CollectGarbageInternal()
2846 collector::ConcurrentCopying* active_cc_collector; in CollectGarbageInternal()
2850 active_cc_collector = (gc_type == collector::kGcTypeSticky) ? in CollectGarbageInternal()
2856 collector = active_cc_collector; in CollectGarbageInternal()
2858 collector = active_concurrent_copying_collector_.load(std::memory_order_relaxed); in CollectGarbageInternal()
2866 collector != active_concurrent_copying_collector_.load(std::memory_order_relaxed)) { in CollectGarbageInternal()
2877 collector = FindCollectorByGcType(gc_type); in CollectGarbageInternal()
2882 CHECK(collector != nullptr) << "Could not find garbage collector with collector_type=" in CollectGarbageInternal()
2885 collector->Run(gc_cause, clear_soft_references || runtime->IsZygote()); in CollectGarbageInternal()
2891 GrowForUtilization(collector, bytes_allocated_before_gc); in CollectGarbageInternal()
2893 LogGC(gc_cause, collector); in CollectGarbageInternal()
2913 void Heap::LogGC(GcCause gc_cause, collector::GarbageCollector* collector) { in LogGC() argument
2946 LOG(INFO) << gc_cause << " " << collector->GetName() in LogGC()
2959 void Heap::FinishGC(Thread* self, collector::GcType gc_type) { in FinishGC()
2962 if (gc_type != collector::kGcTypeNone) { in FinishGC()
2980 if (gc_type != collector::kGcTypeNone) { in FinishGC()
3244 CollectGarbageInternal(collector::kGcTypeSticky, in PushOnAllocationStackWithInternalGC()
3267 CollectGarbageInternal(collector::kGcTypeSticky, in PushOnThreadLocalAllocationStackWithInternalGC()
3496 DCHECK(collector::SemiSpace::kUseRememberedSet) << static_cast<int>(collector_type_); in ProcessCards()
3532 void Heap::PreGcVerificationPaused(collector::GarbageCollector* gc) { in PreGcVerificationPaused()
3566 void Heap::PreGcVerification(collector::GarbageCollector* gc) { in PreGcVerification()
3568 collector::GarbageCollector::ScopedPause pause(gc, false); in PreGcVerification()
3573 void Heap::PrePauseRosAllocVerification([[maybe_unused]] collector::GarbageCollector* gc) { in PrePauseRosAllocVerification()
3580 void Heap::PreSweepingGcVerification(collector::GarbageCollector* gc) { in PreSweepingGcVerification()
3611 void Heap::PostGcVerificationPaused(collector::GarbageCollector* gc) { in PostGcVerificationPaused()
3618 collector::MarkSweep* mark_sweep = down_cast<collector::MarkSweep*>(gc); in PostGcVerificationPaused()
3634 void Heap::PostGcVerification(collector::GarbageCollector* gc) { in PostGcVerification()
3636 collector::GarbageCollector::ScopedPause pause(gc, false); in PostGcVerification()
3651 collector::GcType Heap::WaitForGcToComplete(GcCause cause, Thread* self) { in WaitForGcToComplete()
3657 collector::GcType Heap::WaitForGcToCompleteLocked(GcCause cause, Thread* self) { in WaitForGcToCompleteLocked()
3659 collector::GcType last_gc_type = collector::kGcTypeNone; in WaitForGcToCompleteLocked()
3738 collector::GarbageCollector* Heap::FindCollectorByGcType(collector::GcType gc_type) { in FindCollectorByGcType()
3739 for (auto* collector : garbage_collectors_) { in FindCollectorByGcType() local
3740 if (collector->GetCollectorType() == collector_type_ && in FindCollectorByGcType()
3741 collector->GetGcType() == gc_type) { in FindCollectorByGcType()
3742 return collector; in FindCollectorByGcType()
3756 void Heap::GrowForUtilization(collector::GarbageCollector* collector_ran, in GrowForUtilization()
3769 collector::GcType gc_type = collector_ran->GetGcType(); in GrowForUtilization()
3773 if (gc_type != collector::kGcTypeSticky) { in GrowForUtilization()
3781 next_gc_type_ = collector::kGcTypeSticky; in GrowForUtilization()
3783 collector::GcType non_sticky_gc_type = NonStickyGcType(); in GrowForUtilization()
3785 collector::GarbageCollector* non_sticky_collector = FindCollectorByGcType(non_sticky_gc_type); in GrowForUtilization()
3788 non_sticky_collector = FindCollectorByGcType(collector::kGcTypePartial); in GrowForUtilization()
3805 next_gc_type_ = collector::kGcTypeSticky; in GrowForUtilization()
4001 collector::GcType next_gc_type = next_gc_type_; in ConcurrentGC()
4003 if (force_full && next_gc_type == collector::kGcTypeSticky) { in ConcurrentGC()
4012 == collector::kGcTypeNone) { in ConcurrentGC()
4013 for (collector::GcType gc_type : gc_plan_) { in ConcurrentGC()
4021 != collector::kGcTypeNone) { in ConcurrentGC()
4236 || WaitForGcToComplete(kGcCauseForNativeAlloc, self) != collector::kGcTypeNone) { in CheckGCForNative()