| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now avoid running GC if we are handling a stack overflow, this
helps prevent running past the end of the stack overflow reserved
bytes.
Added logic in ThrowStackOverflowError to use a stack overflow
exception without a stack trace if we fail to allocate the stack
trace.
Bug: 16406852
Change-Id: Ib34e235cd0af6d7c4c93c9705fa822f2b9b23b38
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The heap task processor processes async tasks which may be delayed.
The motivation for this change is preventing deadlocks which
can occur when the daemon threads get suspended by GetThreadStack.
Other improvements, reduces daemon thread count by one.
Cleaner pending transition VS heap trimming logic.
Bug: 18739541
Change-Id: Idab52b2d9661a6385cada74b93ff297ddc55fc78
|
|/
|
|
|
| |
Bug: 18808732
Change-Id: Id563eb22e8d571c0ef032628b6ba2f3d357fd002
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed a race with the gc_request_pending_ boolean which would cause
two concurrent GCs to start in a row in most cases. This broke sticky
CMS ergonomics since the second GC was a sticky CMS which started way
too early resulting in low throughput. Since the throughput was low,
it switch to partial / full for the next iteration.
The race happened as follows, allocating thread would request
concurrent GC which woke up the daemon thread. The daemon thread
cleared the gc_request_pending_ boolean, but before we set the
concurrent_start_bytes_ to max in to prevent more request, the
allocating thread would call RequestConcurrentGC again. This caused
the next WaitForConcurrentGCRequest to return right away and a
concurrent GC to occur earlier than necessary.
Changed the allocation rate ergonomics to use allocation rate
during the GC instead of allocation rate inbetween GCs, this is
better since the allocation rate may become slower if the GC steals
mutator time, resulting in concurrent GCs starting a bit earlier
than they need to.
Fixed a bug in GrowForUtilization where we didn't use the adjusted
max_free when we shrank down the heap, this caused the sticky CMS to
occasionally shrink the heap more than necessary.
EvaluateAndApplyChanges:
Before: ~12.6s GC time
After: ~7.75s GC time
Change-Id: I354bc825b3c44ccfbfe867af0d437b17fe1fe022
|
|/
|
|
|
|
|
|
| |
Helps measure time to suspend.
Example output (maps after a few seconds):
suspend all histogram: Sum: 2.806ms 99% C.I. 2us-1090.560us Avg: 43.843us Max: 1126us
Change-Id: I7bd9dd3b401fb3e3059e8718556d60910e541611
|
|
|
|
|
|
| |
Fixes valgrind tests.
Change-Id: I763e5709fffb002b14615ed5d08236970643e520
|
|
|
|
|
|
|
|
| |
Fixes deadlock caused by acquirng the mutator lock while
synchronizing on the daemon thread.
Bug: 18739541
Change-Id: I925b8f0f3b58178da6eff17b9c073f655c39597b
|
|
|
|
|
|
|
|
|
|
| |
The caller may be holding mutator_lock_, so we must use WaitHoldingLocks.
Otherwise we get 'bad_mutexes_held' error with debug build.
See also https://android-review.googlesource.com/#/c/93892.
Change-Id: I87b1119e22a9934fdc622c4c4e2690b8b552b539
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
HomogeneousSpaceCompact is not suitable when GSS is forground collector.
This will fix issue that device can not boot with GSS collecor.
Change-Id: Iafdf431c207351571f41bbc9196dff02ba674ab4
Signed-off-by: Lin Zang <lin.zang@intel.com>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Also cleaned up reference queue.
TODO: Add tests for missing functionality.
Bug: 10808403
Change-Id: I182f9cb69022fe542ea9e53d4c6d35cff90af332
|
|/
|
|
| |
Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
|
|
|
|
|
|
|
|
|
|
|
| |
Prevents some GC for alloc which can occur if the allocation stack
overflows.
Bug: 18707404
(cherry picked from commit 4911153db37264de407b2a08c2e4c9bb6aef3545)
Change-Id: I4748485dd495526ab1a313f366d93dbb3ee8112b
|
|
|
|
|
|
|
|
|
|
| |
If a large object allocation fails, we now try the normal allocators.
Bug: 18124612
(cherry picked from commit f1c4d0e3a27e9b39916750147ecdea1418fcc231)
Change-Id: Ib83ebe53fbdd83aa2d23fd10a8bb10e149f8918f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now properly clear the growth limit of all the spaces when
ClearGrowthLimit is called. Previously we didn't clear the growth
limit of the background space.
This wasn't caught by heap test since it only manifested itself
when we had a zygote space.
Bug: 18504942
(cherry picked from commit d59c170057dcc213a858652abc71eec710898a41)
Change-Id: I6e4394b9c9f7f22aabc5f5955adb8dd4511c2617
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
System server:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
2200 300 229 0 80 0 220 77 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
1896 128 102 0 28 0 100 39 /dev/ashmem/dalvik-indirect ref table (deleted)
After:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
System server:
2216 64 64 0 0 0 64 79 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
2120 48 48 0 0 0 48 67 /dev/ashmem/dalvik-indirect ref table (deleted)
No pause time regression measured in memalloc test.
(cherry picked from commit 84dc99d2fa67e5dff018685661cb2bff62132989)
Change-Id: I80d9bd3b98e888fa8f77d03df69f8479ed209986
|
|
|
|
|
|
|
| |
This needs to be wrapped as it is being used during compaction.
Bug: 18481268
Change-Id: I85ecccc7de8be8eb70a5cb0420817583be9b7999
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now use one-page buffers for size brackets 4-7, instead of two-page
buffers, and the first 8 size brackets for thread-local allocations,
instead of 11.
No slowdown observed with MemAllocTest, EvaluateAndApplyChanges, and
BinaryTrees.
(cherrypick commit c4cd95fa37b7138a0fa26d07c235aa409542aecd)
Bug: 18377775
Change-Id: I311f3adf9cab660d258833b17df7e6d905f73c72
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We place a marker in each isa cache dir and have the framework
delete it for us.
This seems like a convenient place to do it given all the other
dalvik-cache related code that hooks in here, and also because
this is the first point where we try to access the cache.
TODO: Add a timeout to the (higher level) zygote code to correctly
kill the surviving zygote if one of them never comes up.
bug: 18280671
(cherry picked from commit c38276177aeeda4326a54f1121790c154df04300)
(partial cherry-pick of 9433ec60b325b708b9fa87e699ab4a6565741494)
Change-Id: I5dbea21b4bf9ca4106a13225946d3f35f8060a43
|
|/
|
|
|
|
|
|
|
|
| |
Space names:
"non moving space" -> "zygote space"
"alloc space" -> "non moving space"
Bug: 18447855
Change-Id: Ia937b6d046ccf7f66bf1f6bbb9f17a5e0d00c016
(cherry picked from commit c5d085c955244be1743c33227384e5b62076b8bd)
|
|
|
|
|
|
|
| |
(cherrypick commit d3f228062a1d71ce6ace2f31ecf369ae247633c2)
Bug: 18377775
Change-Id: I4a0998c7f35b6418004e92bc07926abc9b74962a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, refactor how feature strings are handled so they are additive or
subtractive.
Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler
rather than #ifdefs that wouldn't have worked in cross-compilation.
Add SIMD features for x86/x86-64 proposed in:
https://android-review.googlesource.com/#/c/112370/
Bug: 18056890
Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666
|
|
|
|
|
|
|
|
|
|
| |
When pruning the isa-specific directory of the cache, also remove
symbolic links.
Bug: 18035729
Bug: 18153744
Change-Id: I40347ee77e95ff9fc8e6107ba661338f5c7b1db9
(cherry picked from commit de5ed50940452f06b00514af0667972542ee5d59)
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow ValgrindMallocSpace wrapper for RosAlloc.Requires refactoring,
as ValgrindMallocSpace was bound to the signature of DlMallocSpace.
Also turn of native stack dumping when running under Valgrind to
work around b/18119146.
Ritzperf before and after
Mean 3190.725 3082.475
Standard Error 11.68407 10.37911
Mode 3069 2980
Median 3182.5 3051.5
Variance 16382.117 12927.125
Standard Deviation 127.99264 113.69751
Kurtosis 1.1065632 0.3657799
Skewness 0.9013805 0.9117792
Range 644 528
Minimum 2991 2928
Maximum 3635 3456
Count 120 120
Bug: 18119146
Change-Id: I25558ea7cb578406011dede9d3d0bdbfee4ff4d5
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More memory efficient than libcxx since we do not box the values.
Change intern table to use new hash set. Clean up intern table by
removing const casts and deleting unnecessary code.
Changed the class linker to use a hash set, also added a pre-zygote
class table.
5 samples of:
adb shell stop && adb shell start && sleep 60 && adb shell dumpsys meminfo
Before:
165929 kB: Native
175859 kB: Native
168434 kB: Native
166559 kB: Native
169958 kB: Native
After:
160972 kB: Native
159439 kB: Native
157204 kB: Native
165093 kB: Native
163039 kB: Native
TODO: Add HashTable which is implemented by using a HashSet.
TODO: Use for DexFile::find_class_def_misses_.
TODO: Investigate using mem maps instead of native heap.
Bug: 17808975
Change-Id: I93e376cf6eb9628cf52f4aefdadb6157acfb799a
(cherry picked from commit e05d1d5fd86867afc7513b1c546375dba11eee50)
|
|
|
|
|
|
|
| |
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
and -Wunused-but-set-parameter for GCC builds.
Change-Id: I81bbdd762213444673c65d85edae594a523836e5
|
|
|
|
|
|
| |
Replace all occurrences of COMPILE_ASSERT in the runtime tree.
Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
|
|
|
|
|
|
|
|
|
|
|
| |
Fix associated errors about unused paramenters and implict sign conversions.
For sign conversion this was largely in the area of enums, so add ostream
operators for the effected enums and fix tools/generate-operator-out.py.
Tidy arena allocation code and arena allocated data types, rather than fixing
new and delete operators.
Remove dead code.
Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In case the available memory after image generation is low,
discard the image and continue in interpreted mode to mitigate
low-mem issues.
Bug: 17975190
(cherry picked from commit e059b778a6a471455659eb8c3616858eb189fda8)
Change-Id: I9bbb5e52ffbf3570f85510efb76bcd7654e6951c
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we create the runtime, we now add the image strings to the
intern table if we are the zygote. This caused some memory bloat,
so I added an extra unordered set to the intern table.
There is now two unordered sets (hash talbe). One for pre-zygote
interns and one for post-zygote interns. This helps since the
pre-zygote hash table doesn't get dirtied. Even with adding
the image strings, we get total memory savings of around 5-7 MB
native PSS after device boot.
FB launch Before:
2.20% art::DexFile::FindStringId(char const*) const
TotalTime: 2069
TotalTime: 1985
TotalTime: 2088
TotalTime: 2003
TotalTime: 2034
TotalTime: 2049
After boot native PSS: 175585 kB: Native
After:
0.27% art::DexFile::FindStringId(char const*) const
TotalTime: 1682
TotalTime: 1756
TotalTime: 1825
TotalTime: 1751
TotalTime: 1666
TotalTime: 1813
After boot native PSS: 167089 kB: Native
Bug: 18054905
Bug: 16828525
Bug: 17808975
(cherry picked from commit b6e292bf7eac9d73c6b79b1e9b7b87beb02436c9)
Change-Id: Ie367f3222f8c4db409ec49c3845276908b51e9c9
|
|
|
|
|
|
|
| |
Move to shared rather than static libraries. Avoids capture of all static
libraries library dependencies.
Change-Id: I2be96e92dad4ed1842d76b044745f2a2e15372eb
|
|
|
|
|
|
|
|
| |
Bug: 18143314
(cherry picked from commit 7dd7261845258b7c29b588829c80164b878f4424)
Change-Id: I70e708940663bf53ebe5320f53fd2dcebb0c623f
|
|\
| |
| |
| |
| |
| | |
* changes:
Remove extraneous fprintf args
Remove boot.art/boot.oat on failure to create
|
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 18143314
(cherry picked from commit a6b2affaf99e03f938f6f26e42606488d43f2efe)
Change-Id: Iac6d03d81997911f6707340487a26ee26a3aee27
|
|/
|
|
|
|
|
|
|
|
|
|
| |
* Images (.art) compiled with pic now have a new field added.
* isDexOptNeeded will now skip patch-ing for apps compiled PIC
* First-boot patching now only copies boot.art, boot.oat is linked
As a result, all system preopted dex files (with --compile-pic) no
longer take up any space in /data/dalvik-cache/<isa>.
Bug: 18035729
Change-Id: Ie1acad81a0fd8b2f24e1f3f07a06e6fdb548be62
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added more inlining, removed imt array allocation and replaced it
with a handle scope. Removed some un-necessary handle scopes.
Added logic to base interface method tables from the superclass so
that we dont need to reconstruct for every interface (large win).
Facebook launch Dalvik KK MR2:
TotalTime: 3165
TotalTime: 3652
TotalTime: 3143
TotalTime: 3298
TotalTime: 3212
TotalTime: 3211
Facebook launch TOT before:
WaitTime: 3702
WaitTime: 3616
WaitTime: 3616
WaitTime: 3687
WaitTime: 3742
WaitTime: 3767
After optimizations:
WaitTime: 2903
WaitTime: 2953
WaitTime: 2918
WaitTime: 2940
WaitTime: 2879
WaitTime: 2792
LinkInterfaceMethods no longer one of the hottest methods, new list:
4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
3.07% art::DexFile::FindClassDef(char const*) const
2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int)
2.90% art::DexFile::FindStringId(char const*) const
Bug: 18054905
Bug: 16828525
(cherry picked from commit 1fb463e42cf1d67595cff66d19c0f99e3046f4c4)
Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Use *error_msg instead of error_msg.
Change-Id: Idabee3e4a66effd9f6346a2640a3038c5448889e
|
|/
|
|
| |
Change-Id: I7a79c1671a6ff8b2040887133b3e0925ef9a3cfe
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: I15c33b23751f4c32cb40c9514b602845feb47f9f
Signed-off-by: Kyungmin Lee <snailee@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we set concurrent start bytes to max int when we
requested a concurrent GC, but there was a race if another thread
was doing another GC and had already completed GrowForUtilization
but had not yet finished the GC. This meant that the thread doing
the GC would update the concurrent start bytes properly, but the
allocating thread would re-update it to max int. Then when the
concurrent GC thread woke up, it would call WaitForGcToComplete
and see that there was a collector running and avoid doing the
concurrent GC, leaving the concurrent start bytes set to max int.
This meant that there would be no more concurrent GC until either
the next explicit GC or the next GC for alloc.
The fix is to only set concurrent start bytes to max int inside of
the CollectGarbageInternal code such that there isn't any way for
two threads to race.
Bug: 17942071
(cherry picked from commit 0133ec454d8dd3fa5ffe35649b5704aa18f15a49)
Change-Id: Ibc23dd2f937a2b5fda51ed064634c034dbb6e668
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move DISALLOW_COPY_AND_ASSIGN to delete functions. By no having declarations
with no definitions this prompts better warning messages so deal with these
by correcting the code.
Add a DISALLOW_ALLOCATION and use for ValueObject and mirror::Object.
Make X86 assembly operand types ValueObjects to fix compilation errors.
Tidy the use of iostream and ostream.
Avoid making cutils a dependency via mutex-inl.h for tests that link against
libart. Push tracing dependencies into appropriate files and mutex.cc.
x86 32-bit host symbols size is increased for libarttest, avoid copying this
in run-test 115 by using symlinks and remove this test's higher than normal
ulimit.
Fix the RunningOnValgrind test in RosAllocSpace to not use GetHeap as it
returns NULL when the heap is under construction by Runtime.
Change-Id: Ia246f7ac0c11f73072b30d70566a196e9b78472b
|