bb87e0f1a52de656bc77cb01cb887e51a0e5198b |
|
03-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Refactor and improve GC root handling Changed GcRoot to use compressed references. Changed root visiting to use virtual functions instead of function pointers. Changed root visting interface to be an array of roots instead of a single root at a time. Added buffered root marking helper to avoid dispatch overhead. Root marking seems a bit faster on EvaluateAndApplyChanges due to batch marking. Pause times unaffected. Mips64 is untested but might work, maybe. Before: MarkConcurrentRoots: Sum: 67.678ms 99% C.I. 2us-664.999us Avg: 161.138us Max: 671us After: MarkConcurrentRoots: Sum: 54.806ms 99% C.I. 2us-499.986us Avg: 136.333us Max: 602us Bug: 19264997 Change-Id: I0a71ebb5928f205b9b3f7945b25db6489d5657ca
|
12d625f87bcd6c4059a205bb39007a255f57f382 |
|
13-Mar-2015 |
Mathieu Chartier <mathieuc@google.com> |
Change method verifiers to be thread local roots Bug: 10921004 Change-Id: I3a1425d76cd380587ba67ef6d5ec1227564e55bf
|
2435a43f6c851c23922d8508fb17c6079248201c |
|
13-Mar-2015 |
bowen_lai <bowen_lai@htc.com> |
ART: Add entries_ lock for race condition GCDaemon thread would visit incorrect RegType content when there is another thread initializing classes. Add a lock to protect entries_. https://code.google.com/p/android/issues/detail?id=159849 Change-Id: Iabaa1c7f5cc5106b60a6e3856152e0797e8a5d6d
|
7f590e25c76891c3839a282635b5932af23812df |
|
13-Sep-2014 |
Mathieu Chartier <mathieuc@google.com> |
Restore some aosp/master changes lost in cherry-pick 7c438b19b71932ac8a44eff44f20744a01559c8d Change-Id: Ic9fe8a235baac85efbdf748aeaddf98139558c4e
|
7c438b19b71932ac8a44eff44f20744a01559c8d |
|
13-Sep-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix stale root error in verifier There was a stale root error caused by the static roots from the reg types. These were visitied if there was an active verifier in the method_verifiers_ but this is not always the case when a GC is run. The fix is to always visit the static method verifier roots. This only showed up as a bug without an image since these roots were primitive classes and always in the image, and therefore didn't ever need to be updated due to moving GC. (cherry picked from commit 6167864e28e4e12658ebdbaf1d5239acdaf4aaa4) Change-Id: I592f2770570de97b431671cfbd409f63697892f1
|
6167864e28e4e12658ebdbaf1d5239acdaf4aaa4 |
|
13-Sep-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix stale root error in verifier There was a stale root error caused by the static roots from the reg types. These were visitied if there was an active verifier in the method_verifiers_ but this is not always the case when a GC is run. The fix is to always visit the static method verifier roots. This only showed up as a bug without an image since these roots were primitive classes and always in the image, and therefore didn't ever need to be updated due to moving GC. Bug: 17262039 Change-Id: I592f2770570de97b431671cfbd409f63697892f1
|
7b078e8c04f3e1451dbdd18543c8b9692b5b067e |
|
10-Sep-2014 |
Ian Rogers <irogers@google.com> |
Compile time performance improvements focusing on interpret-only. Reduce virtual method dispatch in the method verifier and make more code inline-able. Add a StringPiece with const char* equality operator to avoid redundant StringPieces and strlens. Remove back link from register line to verifier and pass as argument to reduce size of RegisterLine. Remove instruction length from instruction flags and compute from the instruction, again to reduce size. Add suspend checks to resolve and verify to allow for more easy monitor inflation and reduce contention on Locks::thread_list_suspend_thread_lock_. Change ThrowEarlierClassFailure to throw pre-allocated exception. Avoid calls to Thread::Current() by passing self. Template specialize IsValidClassName. Make ANR reporting with SIGQUIT run using checkpoints rather than suspending all threads. This makes the stack/lock analysis less lock error prone. Extra Barrier assertions and condition variable time out is now returned as a boolean both from Barrier and ConditionVariable::Wait. 2 threaded host x86-64 interpret-only numbers from 341 samples: Before change: Avg 176.137ms 99% CI 3.468ms to 1060.770ms After change: Avg 139.163% 99% CI 3.027ms to 838.257ms Reduction in average compile time after change is 20.9%. Slow-down without change is 26.5%. Bug: 17471626 - Fix bug where RegTypeCache::JavaLangObject/String/Class/Throwable could return unresolved type when class loading is disabled. Bug: 17398101 Change-Id: Id59ce3cc520701c6ecf612f7152498107bc40684
|
d8f69b086baf6717ce949d1c4de90d73b91083b0 |
|
10-Sep-2014 |
Ian Rogers <irogers@google.com> |
Revert "Add read barriers for the roots in the verifier." This reverts commit 7da9586b559290e1c16207c6513ffe485de61655. Bug: 17398101 Change-Id: I1d6110fdf0d3a3c9241c8e7e7f4b85a298f9dd8e
|
cb6b0f31ede2275e79e6199ec391147585a37a2a |
|
12-Aug-2014 |
Ian Rogers <irogers@google.com> |
Avoid use of std::string where we have const char*. Removing the ClassHelper caused std::string creation for all calls to Class::GetDescriptor and a significant performance regression. Make the std::string an out argument so the caller can maintain it and its life time while allowing GetDescriptor to return the common const char* case. Don't generate GC maps when compilation is disabled. Remove other uses of std::string that are occuring on critical paths. Use the cheaper SkipClass in CompileMethod in CompilerDriver. Specialize the utf8 as utf16 comparison code for the common shorter byte encoding. Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing code), add some LIKELYs. x86-64 host 1-thread interpret-only of 57 apks: Before: 29.539s After: 23.467s Regular compile: Before: 1m35.347s After: 1m20.056s Bug: 16853450 Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad Conflicts: runtime/utils.cc
|
1ff3c98775a4577cf053dba9a0c2d5c21c07b298 |
|
12-Aug-2014 |
Ian Rogers <irogers@google.com> |
Avoid use of std::string where we have const char*. Removing the ClassHelper caused std::string creation for all calls to Class::GetDescriptor and a significant performance regression. Make the std::string an out argument so the caller can maintain it and its life time while allowing GetDescriptor to return the common const char* case. Don't generate GC maps when compilation is disabled. Remove other uses of std::string that are occuring on critical paths. Use the cheaper SkipClass in CompileMethod in CompilerDriver. Specialize the utf8 as utf16 comparison code for the common shorter byte encoding. Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing code), add some LIKELYs. x86-64 host 1-thread interpret-only of 57 apks: Before: 29.539s After: 23.467s Regular compile: Before: 1m35.347s After: 1m20.056s Bug: 16853450 Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad
|
b99b8d6cffe08d8c9d30175c936e5c88d3101802 |
|
31-Jul-2014 |
Andreas Gampe <agampe@google.com> |
ART: Fix verifier mishandling erroneous array component types The verifier must not assume that component types are not erroneous. Bug: 16661259 (cherry picked from commit aa910d5ef43256102809e397de305c23f1c315e6) Change-Id: I6d607310593ac337616581bfdff5eb29a8dd1b9d
|
aa910d5ef43256102809e397de305c23f1c315e6 |
|
31-Jul-2014 |
Andreas Gampe <agampe@google.com> |
ART: Fix verifier mishandling erroneous array component types The verifier must not assume that component types are not erroneous. Bug: 16661259 Change-Id: I23b2f517259ca9c0b8a1aa38f6348fcd61e0b22e
|
7da9586b559290e1c16207c6513ffe485de61655 |
|
30-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add read barriers for the roots in the verifier. Note: Because the roots (the class references in RegType objects) can be updated by the read barriers, a lot of uses of type "const RegType" were replaced with "RegType". Bug: 12687968 Change-Id: I6cf37a87f352938d43fb51560a8d927ada104f50
|
639815628cf52a4a944a4322cb09da37cded2de9 |
|
17-Apr-2014 |
Andreas Gampe <agampe@google.com> |
Fix a class-loading bug in the verifier when throwing NPE When throwing an NPE for invocation, we try to resolve the class of the method being called. When in the interpreter and having quickened code, that failed. Bug: 14133618 Change-Id: I4964b908bb26a82a12263fb86f5dc39c9042479b
|
83c8ee000d525017ead8753fce6bc1020249b96a |
|
28-Jan-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add root types and thread id to root visiting. Enables us to pass the root type and thread id to hprof. Bug: 12680863 Change-Id: I6a0f1f9e3aa8f9b4033d695818ae7ca3460d67cb
|
849600bb5cfc02bf5ab4aa9a810667ebd3b53328 |
|
20-Dec-2013 |
Sebastien Hertz <shertz@google.com> |
Use imprecise constants at compilation time. During veriifcation, we create constant types for the following instructions: const/4, const/16, const and const/high16. We used to create "precise" constant types for each constant we process in the method being verified. Though precise constants are only useful for deoptimization which happens at runtime. This CL now creates "imprecise" constant types at compilation time. Since it reduces the number of constant types we create during verification, it should also reduce the amount of time spent in verification at compilation time. Bug: 12167380 Bug: 12126841 Change-Id: I70522c4133a74a533fc2d2cb8d4f49888e590828
|
c528dba35b5faece51ca658fc008b688f8b690ad |
|
26-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Enable moving classes. Slight reduction in Zygote size, memory savings are in the noise. Before: Zygote size: 8739224 After: Zygote size: 8733568 Fixed a bug where we didn't set the concurrent start bytes after switching the allocator from bump pointer to ROSAlloc in the zygote. This caused excessive memory usage. Added the method verifiers as roots to fix an issue caused by RegTypes holding a Class*. Added logic to clear card table in the SemiSpace collector, this reduces DalvikOther from ~2400k -> ~1760k when using the SemiSpace collector. Added a missing lock to the timing loggers which caused a rare one time crash in std::set. Bug: 11771255 Bug: 8499494 Bug: 10802951 Change-Id: I99d2b528cd51c1c5ed7012e3220b3aefded680ae
|
41c65c19c15ffac41089fa9f37502f94c046960d |
|
06-Sep-2013 |
Ian Rogers <irogers@google.com> |
Add a pool of small cat1 constants to the verifier. This avoids creating constants in roughly half the cases seen in boot/core. Also, strengthen the types on a few of the RegTypeCache routines, add some documentation and move methods to the appropriate location and out of being public when possible. Change-Id: I384189d51d8f097bb7f744c0f6275dee4bb11302
|
3e79aadc447dcdb9e52368baced9405667e68e6a |
|
19-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fixing cpplint readability/constructors issues Change-Id: Idea2685007de2051f2be51a84d8956a142804402
|
df62950e7a32031b82360c407d46a37b94188fbb |
|
18-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fix cpplint whitespace/parens issues Change-Id: Ifc678d59a8bed24ffddde5a0e543620b17b0aba9
|
fc0e3219edc9a5bf81b166e82fd5db2796eb6a0d |
|
17-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fix multiple inclusion guards to match new pathnames Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
|
7940e44f4517de5e2634a7e07d58d0fb26160513 |
|
12-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Create separate Android.mk for main build targets The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81
|