OSDN Git Service

Make allocation tracker use less memory
authorMan Cao <manc@google.com>
Tue, 23 Jun 2015 23:38:25 +0000 (16:38 -0700)
committerMan Cao <manc@google.com>
Thu, 25 Jun 2015 21:10:48 +0000 (14:10 -0700)
commit42c3c33df8b6eefc4ba532f1981282510f109928
tree4526fe0a718f2e8ead36907aa9984c402d5a1888
parentbb3dabaf804e0d0bd2bf34e69091b2f86fd4e78b
Make allocation tracker use less memory

The allocation tracker no longer keeps recently allocated objects live.
Instead it just keeps their class objects live as strong roots. This fixed
the gc-stress test failure for 098-ddmc.

Also fixed the issue in DisableNewSystemWeak() for allocation tracker,
by making new allocation to wait until GC's sweeping to complete. I didn't
feel any significant slowdown with this wait.

Bug: 20037135
Change-Id: I6a98188832cf7ee478007e3788e742dc6e18f7b8
runtime/debugger.cc
runtime/gc/allocation_record.cc
runtime/gc/allocation_record.h
runtime/gc/heap-inl.h
runtime/gc/heap.cc
runtime/gc/heap.h
runtime/hprof/hprof.cc
runtime/runtime.cc
test/Android.run-test.mk