| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The max allowed footprint is only updated after the GC. But we can
still allocate even if bytes_allocated > max_allowed_footprint_.
This means that we used to be able to get a negative value if
bytes_allocated > max_allowed_footprint_.
External bug:
https://code.google.com/p/android/issues/detail?id=72221
Change-Id: I4ef9a534e29211786e82cdcb2582c11ab37a348a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new timing loggers have lower overhead since they only push into
a vector. The new format has two types, a start timing and a stop
timing. You can thing of these as brackets associated with a
timestamp. It uses these to construct various statistics when needed,
such as: Total time, exclusive time, and nesting depth.
Changed PrettyDuration to have a default of 3 digits after the decimal
point.
Exaple of a GC dump with exclusive / total times and indenting:
I/art (23546): GC iteration timing logger [Exclusive time] [Total time]
I/art (23546): 0ms InitializePhase
I/art (23546): 0.305ms/167.746ms MarkingPhase
I/art (23546): 0ms BindBitmaps
I/art (23546): 0ms FindDefaultSpaceBitmap
I/art (23546): 0ms/1.709ms ProcessCards
I/art (23546): 0.183ms ImageModUnionClearCards
I/art (23546): 0.916ms ZygoteModUnionClearCards
I/art (23546): 0.610ms AllocSpaceClearCards
I/art (23546): 1.373ms AllocSpaceClearCards
I/art (23546): 0.305ms/6.318ms MarkRoots
I/art (23546): 2.106ms MarkRootsCheckpoint
I/art (23546): 0.153ms MarkNonThreadRoots
I/art (23546): 4.287ms MarkConcurrentRoots
I/art (23546): 43.461ms UpdateAndMarkImageModUnionTable
I/art (23546): 0ms/112.712ms RecursiveMark
I/art (23546): 112.712ms ProcessMarkStack
I/art (23546): 0.610ms/2.777ms PreCleanCards
I/art (23546): 0.305ms/0.855ms ProcessCards
I/art (23546): 0.153ms ImageModUnionClearCards
I/art (23546): 0.610ms ZygoteModUnionClearCards
I/art (23546): 0.610ms AllocSpaceClearCards
I/art (23546): 0.549ms AllocSpaceClearCards
I/art (23546): 0.549ms MarkRootsCheckpoint
I/art (23546): 0.610ms MarkNonThreadRoots
I/art (23546): 0ms MarkConcurrentRoots
I/art (23546): 0.610ms ScanGrayImageSpaceObjects
I/art (23546): 0.305ms ScanGrayZygoteSpaceObjects
I/art (23546): 0.305ms ScanGrayAllocSpaceObjects
I/art (23546): 1.129ms ScanGrayAllocSpaceObjects
I/art (23546): 0ms ProcessMarkStack
I/art (23546): 0ms/0.977ms (Paused)PausePhase
I/art (23546): 0.244ms ReMarkRoots
I/art (23546): 0.672ms (Paused)ScanGrayObjects
I/art (23546): 0ms (Paused)ProcessMarkStack
I/art (23546): 0ms/0.610ms SwapStacks
I/art (23546): 0.610ms RevokeAllThreadLocalAllocationStacks
I/art (23546): 0ms PreSweepingGcVerification
I/art (23546): 0ms/10.621ms ReclaimPhase
I/art (23546): 0.610ms/0.702ms ProcessReferences
I/art (23546): 0.214ms/0.641ms EnqueueFinalizerReferences
I/art (23546): 0.427ms ProcessMarkStack
I/art (23546): 0.488ms SweepSystemWeaks
I/art (23546): 0.824ms/9.400ms Sweep
I/art (23546): 0ms SweepMallocSpace
I/art (23546): 0.214ms SweepZygoteSpace
I/art (23546): 0.122ms SweepMallocSpace
I/art (23546): 6.226ms SweepMallocSpace
I/art (23546): 0ms SweepMallocSpace
I/art (23546): 2.144ms SweepLargeObjects
I/art (23546): 0.305ms SwapBitmaps
I/art (23546): 0ms UnBindBitmaps
I/art (23546): 0.275ms FinishPhase
I/art (23546): GC iteration timing logger: end, 178.971ms
Change-Id: Ia55b65609468f212b3cd65cda66b843da42be645
|
|/
|
|
| |
Change-Id: I0251ff19e0a3c3b9edc7c7e296f15eb3229f8f7c
|
|
|
|
|
|
| |
Should help reduce contention observed in systrace.
Change-Id: Iadb81728d4ba797c3a68acea795b15d7f212e89b
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, each garbage collector had data that was only used
during collection. Since only one collector can be running at any
given time, we can make this data be shared between all collectors.
This reduces memory usage since we don't need to have redundant
information for each GC types. Also reduced how much code is required
to sweep spaces.
Bug: 9969166
Change-Id: I31caf0ee4d572f75e0c66863fe7db12c08ae08e7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mark compact collector is a 4 phase collection, doing a normal
full mark_sweep, calculating forwarding addresses of objects in the
from space, updating references of objects in the from space, and
moving the objects in the from space.
Support is diabled by default since it needs to have non movable
classes and field arrays. Performance numbers is around 50% as fast.
The main advantage that this has over semispace is that the worst
case memory usage is 50% since we only need one space isntead of two.
TODO: Make field arrays and classes movable. This causes complication
since Object::VisitReferences relies on these, so if we update the
fields of an object but another future object uses this object to
figure out what fields are reference fields it doesn't work.
Bug: 14059466
Change-Id: I661ed3b71ad4dde124ef80312c95696b4a5665a1
|
|
|
|
|
|
|
|
|
|
|
| |
Moved the GC top level systrace logging to be inside of Collector::Run.
This prevents cases where we forgot to call it such as background
compaction. Fixed a unit error regarding total pause time. Fixed
negative bytes saved to use the word "expanded".
Bug: 15702709
Change-Id: Ic2991ecad2daa000d0aee9d559b8bc77d8c160aa
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was an error where we were not re-creating the remembered sets
in PreZygoteFork. This caused a rare check failure due to the
stale remembered set occasionally having the same space as the newly
created one.
Bug: 15680452
Change-Id: Ibfa569e67ad0ff032f3e9696a99b992a18583243
|
|/
|
|
|
|
|
| |
Removes several SetReferents for updating moved referents. Cleaned
up other aspects of the code.
Change-Id: Ibcb4d713fadea617efee7e936352ddf77ff4c370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 13751317
Fix the Mac build:
- disable x86 selector removal that causes OS/X 10.9 kernel panics,
- madvise don't need does zero memory on the Mac, factor into MemMap
routine,
- switch to the elf.h in elfutils to avoid Linux kernel dependencies,
- we can't rely on exclusive_owner_ being available from other pthread
libraries so maintain our own when futexes aren't available (we
can't rely on the OS/X 10.8 hack any more),
- fix symbol naming in assembly code,
- work around C library differences,
- disable backtrace in DumpNativeStack to avoid a broken libbacktrace
dependency,
- disable main thread signal handling logic,
- align the stack in stub_test,
- use $(HOST_SHLIB_SUFFIX) rather than .so in host make file variables.
Not all host tests are passing on the Mac with this change. dex2oat
works as does running HelloWorld.
Change-Id: I5a232aedfb2028524d49daa6397a8e60f3ee40d3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Immediately return for references that are marked before reference
processing without blocking. Soft references are kept in the queue until
the reference processor stops preserving, after which, all marked
references are removed. Finalizer references will still block on get().
Bug: 15471830
Change-Id: I588fcaef40b79ed7c95a4aa7f4fc2e17ee0c288f
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If zygote aborts due to an error, it will restart and
spawn another dex2oat process while the old one is still
running. If this happens fast enough, the system will
eventually need a kernel reboot since neither the zygote
nor dex2oat are killable.
This brings boot image generation in line with dex2oat
generation, which uses a similar pattern of advisory
locking.
bug: 15415316
Change-Id: Iaccd274d3d96ab002b04e246ec4b3ef9a422ff7c
|
|/
|
|
|
|
|
|
| |
Based on definitions in:
http://developer.android.com/reference/java/lang/Runtime.html
Bug: 15507122
Change-Id: I02f34682d7ac2d379a07631b5207b6cfb224da6b
|
|
|
|
|
|
|
| |
Fixes some valgrind warnings.
Bug: 15426766
Change-Id: Ibaa78465739bf6919509cf87c72b25c84ed1d12c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed compaction bugs related to FieldHelper::GetType in:
artSet32InstanceFromCode
SetFieldValueImpl
CheckReceiver
Field_set
interpreter::DoFieldPut
MethodVerifier::VerifyISGet
MethodVerifier::VerifyISPut
MethodVerifier::VerifyIGetQuick
Bug: 13077697
Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
|
|/
|
|
|
|
| |
Main focus is getting heap.h out of runtime.h.
Change-Id: I8d13dce8512816db2820a27b24f5866cc871a04b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds code that verifies that there's no memory map gap between
the image space and the main space so that the immune region
functionality won't silently break. For example, if there's a gap and
a large object is allocated in that gap, the large object is
incorrectly part of the immune region and the marking breaks.
Bug: 14059466
Change-Id: Ie6ed82988d74b6d0562ebbbaac96ee43c15b14a6
|
| |
| |
| |
| |
| |
| |
| |
| | |
The stack frame size will be above our limit if we stack-allocate
a buffer.
Bug: 15278350
Change-Id: Ie1a31370538410d47c177f0a6e51879a1fc0752c
|
| |
| |
| |
| |
| |
| |
| | |
Should help finding and fixing thread suspend timeout issues.
Bug: 15328839
Change-Id: I30a10529cec0716c7571a0318e9f66be54734fd8
|
| |
| |
| |
| |
| |
| |
| | |
Add a test that just calls Alloc and Free repeatedly with multiple
threads, checking whether things are really race-free.
Change-Id: I39ea9e7449e3354b49c3aa11c27fcfeb07acff9f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes more sense since it is what the allocator uses. Also fixed
somewhere where we were not properly passing in whether or not it was
a large object allocation.
Bug: 15327879
Change-Id: Ieab7af5427f5cdc2760390186b67e2c96d4bafa7
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
This is for avoiding a large stack frame size.
Bug: 15278350
Change-Id: I63e92c2dd0ad7078fd74ee2392717dc44b431e9a
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now only create these spaces if the foreground or background
collector is a moving collector.
Bug: 13564922
Bug: 14059466
Change-Id: I9f83c7881bc28423b78d5249c8e8854add91b60c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix a bug that we don't allocate space bitmaps for a malloc space that
are large enough to cover the non-growth-limited capacity.
Change-Id: I2e99a70eb8cddc284dffafa2d2afcc2f0c9074c7
|
| |/
|/|
| |
| | |
Change-Id: I973da5e74be5a62461caacbc708288fb95e1b99b
|
| |
| |
| |
| |
| | |
Bug: 14974497
Change-Id: I30f99d693151ee5ae1f7b3d420519a0b1b21b2f4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue with heap verification which was caused when
the allocation stack overflowed. This resulted in heap verification
failures since we were storing the newly allocated object in a
handle scope without having it be live either in the live bitmap
or allocation stack. We now push the object in the reserve area
before we do a GC due to allocation stack overflow.
Change-Id: I83b42c4b3250d7eaab1b49e53066e21c8656a740
|
|/
|
|
|
| |
Bug: 981363
Change-Id: I226ce3249c0d982eb1a9fdb9d04b25737f77345d
|
|
|
|
|
|
| |
Old Atomic things were rebased over.
Change-Id: I437041af3247c316f2a75f5ef4bd35286fc8e2b1
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
|
| |
| |
| |
| |
| |
| |
| |
| | |
Static variables aren't thread safe and could cause the zygote to be
created twice.
Bug: 15133494
Change-Id: I65c8f089bed8de93f895b62b3dcff4c936931860
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the slight glitch that when ImageSpace::VerifyImageAllocations()
called in ImageSpace::Create(), the ArtField and ArtMethod class roots
weren't set, which were used by DCHECKs in Object::Size(), which
VerifyImageAllocations() calls, by delaying the point of the
VerifyImageAllocations() call to Runtime::Init() at which point the
class linker has set the class roots.
To completely disable read barriers from Object::SizeOf(), the
ReadBarrierOption template parameter should have been added to
Class::GetInstanceField(), which calls GetFieldObject(), when it's
called from Class::IsArtFieldClass(). This change fixes this by
removing the need for the call, instead of adding the
ReadBarrierOption parameter.
Bug: 12687968
Change-Id: Ibbecc08f4e3b898851805d690dff8ccac55e94f2
|
|/
|
|
|
|
|
|
|
|
|
| |
The new root verification prints the root type and owner thread id as
well as the type of the object.
Also a bit of work for planned multi-threaded verification.
Bug: 14289301
Change-Id: Ia73c517dc11ec6dd82f3d945604ee3836b3db536
|
|
|
|
|
|
|
| |
Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.
Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
|
|
|
|
|
|
|
| |
Measured no noticeable performance regression with Ritzperf
EvaluateAndApplyChanges and -Xgc:SS on Mako.
Change-Id: Ib5ab934b867f91789a82ae771b45c95e9d01390c
|
|
|
|
| |
Change-Id: I7f08cc3052fbed93a56ccf1ab7675ae8bc129da9
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug: 14882223
Bug: 14694978
Change-Id: Ic1b5ae836b8e91ea461dcd4f3da8e38dc3bec00f
|
|/
|
|
|
|
|
|
|
|
|
| |
Cleanup helps to prevent compaction bugs. Fixed a fairly serious
compaction error caused by calling ClassHelper::GetDirectInterface
without handling the case where it causes thread suspension due to
ResolveType.
Bug: 8981901
Change-Id: I82b3bb6dd48d21eb6ece7aae0733c4a23c2bc408
|