Home | History | Annotate | Download | only in gc

Lines Matching full:heap

17 #include "heap.h"
69 Heap::Heap(size_t initial_size, size_t growth_limit, size_t min_free, size_t max_free,
122 * causes a lot of GC since we do a GC for alloc whenever the stack is full. When heap
140 if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
141 LOG(INFO) << "Heap() entering";
183 // Compute heap capacity. Continuous spaces are sorted in order of Begin().
212 // now. We don't create it earlier to make it clear that you can't use locks during heap
241 if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
242 LOG(INFO) << "Heap() exiting";
246 void Heap::CreateThreadPool() {
253 void Heap::DeleteThreadPool() {
268 void Heap::ListenForProcessStateChange() {
269 VLOG(heap) << "Heap notified of process state change";
323 VLOG(heap) << "Adding process state " << process_state
370 VLOG(heap) << "New process state " << process_state
375 void Heap::AddContinuousSpace(space::ContinuousSpace* space) {
409 void Heap::RegisterGCAllocation(size_t bytes) {
415 void Heap::RegisterGCDeAllocation(size_t bytes) {
421 void Heap::AddDiscontinuousSpace(space::DiscontinuousSpace* space) {
431 void Heap::DumpGcPerformanceInfo(std::ostream& os) {
480 Heap::~Heap() {
491 VLOG(heap) << "~Heap()";
492 // We can't take the heap lock here because there might be a daemon thread suspended with the
493 // heap lock held. We know though that no non-daemon threads are executing, and we know that
505 space::ContinuousSpace* Heap::FindContinuousSpaceFromObject(const mirror::Object* obj,
518 space::DiscontinuousSpace* Heap::FindDiscontinuousSpaceFromObject(const mirror::Object* obj,
531 space::Space* Heap::FindSpaceFromObject(const mirror::Object* obj, bool fail_ok) const {
539 space::ImageSpace* Heap::GetImageSpace() const {
557 mirror::Object* Heap::AllocObject(Thread* self, mirror::Class* c, size_t byte_count) {
634 bool Heap::IsHeapAddress(const mirror::Object* obj) {
646 bool Heap::IsLiveObjectLocked(const mirror::Object* obj, bool search_allocation_stack,
707 void Heap::VerifyObjectImpl(const mirror::Object* obj) {
715 void Heap::DumpSpaces() {
728 void Heap::VerifyObjectBody(const mirror::Object* obj) {
764 void Heap::VerificationCallback(mirror::Object* obj, void* arg) {
766 reinterpret_cast<Heap*>(arg)->VerifyObjectBody(obj);
769 void Heap::VerifyHeap() {
771 GetLiveBitmap()->Walk(Heap::VerificationCallback, this);
774 inline void Heap::RecordAllocation(size_t size, mirror::Object* obj) {
797 void Heap::RecordFree(size_t freed_objects, size_t freed_bytes) {
813 inline bool Heap::IsOutOfMemoryOnAllocation(size_t alloc_size, bool grow) {
830 inline mirror::Object* Heap::TryToAllocate(Thread* self, space::AllocSpace* space, size_t alloc_size,
839 inline mirror::Object* Heap::TryToAllocate(Thread* self, space::DlMallocSpace* space, size_t alloc_size,
852 inline mirror::Object* Heap::Allocate(Thread* self, T* space, size_t alloc_size,
866 mirror::Object* Heap::AllocateInternalWithGc(Thread* self, space::AllocSpace* space,
918 // Try harder, growing the heap if necessary.
924 // Most allocations should have succeeded by now, so the heap is really full, really fragmented,
937 void Heap::SetTargetHeapUtilization(float target) {
943 size_t Heap::GetObjectsAllocated() const {
960 size_t Heap::GetObjectsAllocatedEver() const {
977 size_t Heap::GetBytesAllocatedEver() const {
1024 void Heap::CountInstances(const std::vector<mirror::Class*>& classes, bool use_is_assignable_from,
1062 void Heap::GetInstances(mirror::Class* c, int32_t max_count,
1107 void Heap::GetReferringObjects(mirror::Object* o, int32_t max_count,
1121 void Heap::CollectGarbage(bool clear_soft_references) {
1129 void Heap::PreZygoteFork() {
1141 VLOG(heap) << "Starting PreZygoteFork with alloc space size " << PrettySize(alloc_space_->Size());
1150 // of the remaining available heap memory.
1166 void Heap::FlushAllocStack() {
1172 void Heap::MarkAllocStack(accounting::SpaceBitmap* bitmap, accounting::SpaceSetMap* large_objects,
1192 collector::GcType Heap::CollectGarbageInternal(collector::GcType gc_type, GcCause gc_cause,
1237 VLOG(heap) << "Allocation rate: " << PrettySize(allocation_rate_) << "/s";
1295 if (VLOG_IS_ON(heap)) {
1316 void Heap::UpdateAndMarkModUnion(collector::MarkSweep* mark_sweep, base::TimingLogger& timings,
1360 explicit VerifyReferenceVisitor(Heap* heap)
1362 : heap_(heap), failed_(false) {}
1381 LOG(ERROR) << "!!!!!!!!!!!!!!Heap corruption detected!!!!!!!!!!!!!!!!!!!";
1391 LOG(ERROR) << "Object " << obj << " class(" << obj->GetClass() << ") not a heap address";
1412 << ") is not a valid heap address";
1468 Heap* const heap_;
1475 explicit VerifyObjectVisitor(Heap* heap) : heap_(heap), failed_(false) {}
1493 Heap* const heap_;
1498 bool Heap::VerifyHeapReferences() {
1527 VerifyReferenceCardVisitor(Heap* heap, bool* failed)
1530 : heap_(heap), failed_(failed) {
1592 Heap* const heap_;
1598 explicit VerifyLiveStackReferences(Heap* heap)
1599 : heap_(heap),
1613 Heap* const heap_;
1617 bool Heap::VerifyMissingCardMarks() {
1637 void Heap::SwapStacks() {
1641 void Heap::ProcessCards(base::TimingLogger& timings) {
1659 void Heap::PreGcVerification(collector::GarbageCollector* gc) {
1668 LOG(FATAL) << "Pre " << gc->GetName() << " heap verification failed";
1700 void Heap::PreSweepingGcVerification(collector::GarbageCollector* gc) {
1718 void Heap::PostGcVerification(collector::GarbageCollector* gc) {
1727 collector::GcType Heap::WaitForConcurrentGcToComplete(Thread* self) {
1760 void Heap::DumpForSigQuit(std::ostream& os) {
1761 os << "Heap: " << GetPercentFree() << "% free, " << PrettySize(GetBytesAllocated()) << "/"
1766 size_t Heap::GetPercentFree() {
1770 void Heap::SetIdealFootprint(size_t max_allowed_footprint) {
1772 VLOG(gc) << "Clamp target GC heap from " << PrettySize(max_allowed_footprint) << " to "
1779 void Heap::UpdateMaxNativeFootprint() {
1781 // TODO: Tune the native heap utilization to be a value other than the java heap utilization.
1792 void Heap::GrowForUtilization(collector::GcType gc_type, uint64_t gc_duration) {
1794 // This doesn't actually resize any memory. It just lets the heap grow more when necessary.
1801 // Grow the heap for non sticky GC.
1810 // Based on how close the current heap size is to the target size, decide
1818 // If we have freed enough memory, shrink the heap back down.
1856 void Heap::ClearGrowthLimit() {
1861 void Heap::SetReferenceOffsets(MemberOffset reference_referent_offset,
1878 mirror::Object* Heap::GetReferenceReferent(mirror::Object* reference) {
1884 void Heap::ClearReferenceReferent(mirror::Object* reference) {
1891 bool Heap::IsEnqueuable(const mirror::Object* ref) {
1900 void Heap::EnqueueReference(mirror::Object* ref, mirror::Object** cleared_reference_list) {
1907 bool Heap::IsEnqueued(mirror::Object* ref) {
1913 void Heap::EnqueuePendingReference(mirror::Object* ref, mirror::Object** list) {
1928 mirror::Object* Heap::DequeuePendingReference(mirror::Object** list) {
1950 void Heap::AddFinalizerReference(Thread* self, mirror::Object* object) {
1959 void Heap::EnqueueClearedReferences(mirror::Object** cleared) {
1975 void Heap::RequestConcurrentGC(Thread* self) {
2005 void Heap::ConcurrentGC(Thread* self) {
2019 void Heap::RequestHeapTrim() {
2020 // GC completed and now we must decide whether to request a heap trim (advising pages back to the
2021 // kernel) or not. Issuing a request will also cause trimming of the libc heap. As a trim scans
2037 // not enabled, or if a heap trim occurred in the last two seconds.
2046 // Heap trimming isn't supported without a Java runtime or Daemons (such as at dex2oat time)
2047 // Also: we do not wish to start a heap trim if the runtime is shutting down (a racy check
2067 size_t Heap::Trim() {
2068 // Handle a requested heap trim on a thread outside of the main GC thread.
2072 bool Heap::IsGCRequestPending() const {
2076 void Heap::RegisterNativeAllocation(int bytes) {
2118 void Heap::RegisterNativeFree(int bytes) {
2131 int64_t Heap::GetTotalMemory() const {