Home | History | Annotate | Download | only in gc

Lines Matching refs:gc

32 #include "gc/accounting/atomic_stack.h"
33 #include "gc/accounting/card_table-inl.h"
34 #include "gc/accounting/heap_bitmap-inl.h"
35 #include "gc/accounting/mod_union_table.h"
36 #include "gc/accounting/mod_union_table-inl.h"
37 #include "gc/accounting/remembered_set.h"
38 #include "gc/accounting/space_bitmap-inl.h"
39 #include "gc/collector/concurrent_copying.h"
40 #include "gc/collector/mark_compact.h"
41 #include "gc/collector/mark_sweep-inl.h"
42 #include "gc/collector/partial_mark_sweep.h"
43 #include "gc/collector/semi_space.h"
44 #include "gc/collector/sticky_mark_sweep.h"
45 #include "gc/reference_processor.h"
46 #include "gc/space/bump_pointer_space.h"
47 #include "gc/space/dlmalloc_space-inl.h"
48 #include "gc/space/image_space.h"
49 #include "gc/space/large_object_space.h"
50 #include "gc/space/rosalloc_space-inl.h"
51 #include "gc/space/space-inl.h"
52 #include "gc/space/zygote_space.h"
74 namespace gc {
78 // Minimum amount of remaining bytes before a concurrent GC is triggered.
81 // Sticky GC throughput adjustment, divided by 4. Increasing this causes sticky GC to occur more
82 // relative to partial/full GC. This may be desirable since sticky GCs interfere less with mutator
107 // GC alot mode uses a small allocation stack to stress test a lot of GC.
175 /* For GC a lot mode, we limit the allocations stacks to be kGcAlotInterval allocations. This
176 * causes a lot of GC since we do a GC for alloc whenever the stack is full. When heap
256 background_collector_type_ == gc::kCollectorTypeHomogeneousSpaceCompact ||
315 // Create other spaces based on whether or not we have a moving GC.
318 // We only to create the bump pointer if the foreground collector is a compacting GC.
374 // Remove the main backup space since it slows down the GC to have unused extra spaces.
407 gc_complete_lock_ = new Mutex("GC complete lock");
408 gc_complete_cond_.reset(new ConditionVariable("GC complete condition variable",
544 // The allocation stack may have non movable objects in it. We need to flush it since the GC
657 // Need to do this holding the lock to prevent races where the GC is about to run / running when
687 // Don't delay for debug builds since we may want to stress test the GC.
818 os << "Dumping cumulative Gc timings\n";
820 // Dump cumulative loggers for each GC type.
851 os << "Total time spent in GC: " << PrettyDuration(total_duration) << "\n";
852 os << "Mean GC size throughput: "
854 os << "Mean GC object throughput: "
862 os << "Free memory until GC " << PrettySize(GetFreeMemoryUntilGC()) << "\n";
872 os << "Total time waiting for GC to complete: " << PrettyDuration(total_wait_time_) << "\n";
1033 // Pretend we are doing a GC to prevent background compaction from deleting the space we are
1036 // Ensure there is only one GC at a time.
1063 gc::space::MallocSpace* malloc_space = space->AsMallocSpace();
1079 // We never move things in the native heap, so we can finish the GC at this point.
1141 // a GC). When a GC isn't running End() - Begin() is 0 which means no objects are contained.
1269 space::RosAllocSpace* Heap::GetRosAllocSpace(gc::allocator::RosAlloc* rosalloc) const {
1291 // The allocation failed. If the GC is running, block until it completes, and then retry the
1300 // A GC was in progress and we blocked, retry allocation now that memory has been freed.
1322 // Loop through our different Gc types and try to Gc until we get enough free memory.
1350 // or the requested size is really big. Do another GC, collecting SoftReferences this time. The
1353 VLOG(gc) << "Forcing collection of SoftReferences for " << PrettySize(alloc_size)
1384 // Reject due to disabled moving GC.
1413 // If we are still a moving GC then something must have caused the transition to fail.
1416 // If we couldn't disable moving GC, just throw OOME and return null.
1417 LOG(WARNING) << "Couldn't disable moving GC with disable GC count "
1420 LOG(WARNING) << "Disabled moving GC due to the non moving space being full";
1492 // Can't do any GC in this function since this may move classes.
1529 // Can't do any GC in this function since this may move classes.
1576 // Can't do any GC in this function since this may move the object o.
1586 // Even if we waited for a GC we still need to do another GC since weaks allocated during the
1587 // last GC will not have necessarily been cleared.
1602 // Ensure there is only one GC at a time.
1604 // Homogeneous space compaction is a copying transition, can't run it if the moving GC disable count
1649 // Finish GC.
1670 // Busy wait until we can GC (StartGC can fail if we have a non-zero
1676 // Ensure there is only one GC at a time.
1688 // GC can be disabled if someone has a used GetPrimitiveArrayCritical but not yet released.
1710 // We are transitioning from non moving GC -> moving GC, since we copied from the bump
1850 explicit ZygoteCompactingCollector(gc::Heap* heap) : SemiSpace(heap, false, "zygote collector"),
2127 // If the heap can't run the GC, silently fail and return that no GC was run.
2136 // Other GC types don't have any special cases which makes them not runnable. The main case
2137 // here is full GC.
2143 LOG(WARNING) << "Performing GC on a thread that is handling a stack overflow.";
2150 // Ensure there is only one GC at a time.
2153 // GC can be disabled if someone has a used GetPrimitiveArrayCritical.
2155 LOG(WARNING) << "Skipping GC due to disable moving GC count " << disable_moving_gc_count_;
2169 // Back to back GCs can cause 0 ms of wait time in between GC invocations.
2215 // Disable concurrent GC check so that we don't have spammy JNI requests.
2230 // Grow the heap so that we know when to perform the next GC.
2234 // Print the GC if it is an explicit GC (e.g. Runtime.gc()) or a slow GC
2238 // GC for alloc pauses the allocating thread, so consider it as a pause.
2255 << " GC freed " << current_gc_iteration_.GetFreedObjects() << "("
2265 // Inform DDMS that a GC completed.
2276 // Wake anyone who may have been waiting for the GC to complete.
2515 // 1. Allocated prior to the GC (pre GC verification).
2516 // 2. Allocated during the GC (pre sweep GC verification).
2711 // No mod union table for the AllocSpace. Age the cards so that the GC knows that these cards
2712 // were dirty before the GC started.
2727 void Heap::PreGcVerificationPaused(collector::GarbageCollector* gc) {
2736 LOG(FATAL) << "Pre " << gc->GetName() << " heap verification failed with " << failures
2746 CHECK(VerifyMissingCardMarks()) << "Pre " << gc->GetName()
2761 void Heap::PreGcVerification(collector::GarbageCollector* gc) {
2763 collector::GarbageCollector::ScopedPause pause(gc);
2764 PreGcVerificationPaused(gc);
2768 void Heap::PrePauseRosAllocVerification(collector::GarbageCollector* gc) {
2775 void Heap::PreSweepingGcVerification(collector::GarbageCollector* gc) {
2786 gc->SwapBitmaps();
2791 LOG(FATAL) << "Pre sweeping " << gc->GetName() << " GC verification failed with " << failures
2794 gc->SwapBitmaps();
2801 void Heap::PostGcVerificationPaused(collector::GarbageCollector* gc) {
2808 collector::MarkSweep* mark_sweep = down_cast<collector::MarkSweep*>(gc);
2819 LOG(FATAL) << "Pre " << gc->GetName() << " heap verification failed with " << failures
2825 void Heap::PostGcVerification(collector::GarbageCollector* gc) {
2827 collector::GarbageCollector::ScopedPause pause(gc);
2828 PostGcVerificationPaused(gc);
2852 ATRACE_BEGIN("GC: Wait For Completion");
2879 VLOG(gc) << "Clamp target GC heap from " << PrettySize(max_allowed_footprint) << " to "
2936 // Grow the heap for non sticky GC.
2953 // If the throughput of the current sticky GC >= throughput of the non sticky collector, then
2957 // if the sticky GC throughput always remained >= the full/partial throughput.
2977 // Calculate the estimated GC duration.
2979 GC.
2986 // another GC nearly straight away.
2991 // Start a concurrent GC when we get close to the estimated remaining bytes. When the
2992 // allocation rate is very high, remaining_bytes could tell us that we should start a GC
3004 gc::space::MallocSpace* malloc_space = space->AsMallocSpace();
3033 // Make sure that we can do a concurrent GC.
3053 // If the we can't run the GC type we wanted to run, find the next appropriate one and try that
3083 // GC completed and now we must decide whether to request a heap trim (advising pages back to the
3189 // The second watermark is higher than the gc watermark. If you hit this it means you are
3190 // allocating native objects faster than the GC can keep up with.
3193 // Just finished a GC, attempt to run finalizers.
3197 // If we still are over the watermark, attempt a GC for alloc and run finalizers.
3279 } // namespace gc