8f4b056427a9d2321e3aa4f21ca8ffb18b3e5ae6 |
|
02-Mar-2018 |
David Sehr <sehr@google.com> |
Move most of runtime/base to libartbase/base Enforce the layering that code in runtime/base should not depend on runtime by separating it into libartbase. Some of the code in runtime/base depends on the Runtime class, so it cannot be moved yet. Also, some of the tests depend on CommonRuntimeTest, which itself needs to be factored (in a subsequent CL). Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2 Merged-In: c431b9dc4b23cc950eb313695258df5d89f53b22 (cherry picked from commit c431b9dc4b23cc950eb313695258df5d89f53b22)
|
b2ec9f5c128673c43f776cbe12c8eeb0a6884ebb |
|
21-Feb-2018 |
David Sehr <sehr@google.com> |
Remove duplication, split tests The code move to libdexfile/dex/descriptors_names.cc apparently did not remove the original code from runtime/utils.cc. Fix that duplication and all the header mentions needed. Also, split the test files to go along with the new locations for the code to be tested. Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host-gtest flash & boot marlin Change-Id: Ie734672c4bca2c647d8016291f910b5608674545
|
7287c4d75e38e7a01c7ea3fdebb47d9cfe128a56 |
|
15-Feb-2018 |
Vladimir Marko <vmarko@google.com> |
Add Class.getPrimitiveClass(). Implement the native part in ART and remove the native parts of the previously needed workaround for java.lang.Void.TYPE. Companion libcore/ change: https://android-review.googlesource.com/619326 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Bug: 73346078 Change-Id: Icfb201a1f08d8ff2a65c58f7c0ec25aa2296db29
|
305c38b395eddff7ca001fa7bdb621397033184d |
|
14-Feb-2018 |
Vladimir Marko <vmarko@google.com> |
Disable bitstring type check runtime hooks. Introduce a build flag for the bitstring type check, put runtime hooks behind the flag and set the flag to false. Also add bitstring initialization for proxy classes, a test and a benchmark for the type checks. Test: m test-art-host-gtest Test: testrunner.py --host --interpreter Test: Repeat with kBitstringSubtypeCheckEnabled = true. Bug: 73299705 Change-Id: Ibcd88a828c7addc0473d8c428818734f80226b19
|
9e734c7ab4599d7747a05db0dc73c7b668cb6683 |
|
05-Jan-2018 |
David Sehr <sehr@google.com> |
Create dex subdirectory Move all the DexFile related source to a common subdirectory dex/ of runtime. Bug: 71361973 Test: make -j 50 test-art-host Change-Id: I59e984ed660b93e0776556308be3d653722f5223
|
2c64a837e62c2839521c89060b5bb0dcb237ddda |
|
04-Jan-2018 |
Vladimir Marko <vmarko@google.com> |
Change ClassStatus to fit into 4 bits. In preparation for extending the type check bit string from 24 to 28 bits, rewrite ClassStatus to fit into 4 bits. Also perform a proper cleanup of the ClassStatus, i.e. change it to an enum class, remove the "Status" word from enumerator names, replace "Max" with "Last" in line with other enumerations and remove aliases from mirror::Class. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: testrunner.py --target --optimizing Bug: 64692057 Bug: 65318848 Change-Id: Iec1610ba5dac2c527b36c12819f132e1a77f2d45
|
4557b3858a66aa20e42bce937e1f0620aad880a2 |
|
03-Jan-2018 |
Orion Hodson <oth@google.com> |
ART: Rename Atomic::CompareExchange methods Renames Atomic::CompareExchange methods to Atomic::CompareAndSet equivalents. These methods return a boolean and do not get the witness value. This makes space for Atomic::CompareAndExchange methods in a later commit that will return a boolean and get the witness value. This is pre-work for VarHandle accessors which require both forms. Bug: 65872996 Test: art/test.py --host -j32 Change-Id: I9c691250e5556cbfde7811381b06d2920247f1a1
|
666ee3d7c6039c80e75287e311895bd6a9b01e9f |
|
11-Dec-2017 |
Vladimir Marko <vmarko@google.com> |
Do not pass DexFile to ClassLinker::Lookup/ResolveType(). The DexFile can be easily retrieved from the DexCache, so reduce the number of arguments that need to be passed. Also refactor the code to avoid doing the DexCache lookup twice and avoid unnecessary read barriers in the initial DexCache lookup (also for Lookup/ResolveField()). Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Idea9aa42b6a5bade947e93e330b1abdb9d11b2da
|
170331f0e44a0e07fcfe0b5932517e0500f5cd1f |
|
08-Dec-2017 |
Andreas Gampe <agampe@google.com> |
ART: Remove base/logging from heap-inl.h Hide the single uncommon VLOG and remove the include. Fix up transitive includes. Test: m Change-Id: I917df597cb62c57040c1fb0e0079df4d95e5a658
|
b0a6aeee250945b1d156ebab94053380f2e5a3c5 |
|
27-Oct-2017 |
Vladimir Marko <vmarko@google.com> |
Record @{Fast,Critical}Native in method's access flags. Repurpose the old kAccFastNative flag (which wasn't actually used for some time) and define a new kAccCriticalNative flag to record the native method's annotation-based kind. This avoids repeated determination of the kind from GenericJNI. And making two transitions to runnable and back (using the ScopedObjectAccess) from GenericJniMethodEnd() for normal native methods just to determine that we need to transition to runnable was really weird. Since the IsFastNative() function now records the presence of the @FastNative annotation, synchronized @FastNative method calls now avoid thread state transitions. When initializing the Runtime without a boot image, the WellKnowClasses may not yet be initialized, so relax the DCheckNativeAnnotation() to take that into account. Also revert https://android-review.googlesource.com/509715 as the annotation checks are now much faster. Bug: 65574695 Bug: 35644369 Test: m test-art-host-gtest Test: testrunner.py --host Change-Id: I2fc5ba192b9ce710a0e9202977b4f9543e387efe
|
86083f7cd118f3d6c757191e83b4e4abaabdc5d7 |
|
27-Oct-2017 |
Igor Murashkin <iam@google.com> |
runtime: Bitstring implementation for subtype checking (4/4). Integrate the previous CLs into ART Runtime. Subsequent CLs to add optimizing compiler support. Use spare 24-bits from "Class#status_" field to implement faster subtype checking in the runtime. Does not incur any extra memory overhead, and (when in compiled code) this is always as fast or faster than the original check. The new subtype checking is O(1) of the form: src <: target := (*src).status >> #imm_target_mask == #imm_target_shifted Based on the original prototype CL by Zhengkai Wu: https://android-review.googlesource.com/#/c/platform/art/+/440996/ Test: art/test.py -b -j32 --host Bug: 64692057 Change-Id: Iec3c54af529055a7f6147eebe5611d9ecd46942b
|
ee5303f76ef167714a6a04d3abc502584ac5e103 |
|
01-Sep-2017 |
Andreas Gampe <agampe@google.com> |
ART: Move Class::Status to ClassStatus Move the enum to its own file to lower include burden on others. This is an intentionally small and localized change. Users will be cleaned up in a follow-up. Bug: 63467744 Bug: 65318848 Test: m test-art-host Change-Id: If3bfe6953973e24623e78a2a8dcc69b50117aa3c
|
e86a9c8c4134db3c1c9104d3801ef614f55295f8 |
|
01-Aug-2017 |
Alex Light <allight@google.com> |
Fix verifier checks on interface methods. We were disallowing interfaces in the IsInheritedMethod even though the function can be called with them. This could cause some failing DCHECKS if the verifier cannot find methods in some situations. We also fixed a small issue in the verifier where we allowed non-public java.lang.Object methods to be considered valid for interface dispatch. Test: ./test.py --host -j50 Test: Compile an app with bad bytecodes (See bug) Bug: 64158483 Bug: 64274113 Change-Id: Ia79f25be0001efc4069a411a0b34476bd0871803 (cherry picked from commit afb664701734c6edbea07431382ee33f1677d42b)
|
afb664701734c6edbea07431382ee33f1677d42b |
|
01-Aug-2017 |
Alex Light <allight@google.com> |
Fix verifier checks on interface methods. We were disallowing interfaces in the IsInheritedMethod even though the function can be called with them. This could cause some failing DCHECKS if the verifier cannot find methods in some situations. We also fixed a small issue in the verifier where we allowed non-public java.lang.Object methods to be considered valid for interface dispatch. Test: ./test.py --host -j50 Test: Compile an app with bad bytecodes (See bug) Bug: 64158483 Bug: 64274113 Change-Id: Ia79f25be0001efc4069a411a0b34476bd0871803
|
e5071cc58a3cdea4a88257be3c8fd4d012a64c74 |
|
12-Jun-2017 |
Vladimir Marko <vmarko@google.com> |
ART: Change method lookup to be more consistent to JLS and the RI. The method lookup for different invoke types was previously widely different and didn't work well with the dex cache method array where we have only a single slot for each MethodId. The new behavior is to perform the same lookup for all cases, distinguishing only between interface and non-interface referencing class, and to further align the behavior with the JLS and the RI. Where the JLS conflicts with the RI, we follow the JLS semantics. The new lookup for class methods first searches the methods declared in the superclass chain (ignoring "copied" methods) and only then looks in the "copied" methods. If the search in the superclass chain finds a method that has not been inherited (i.e. either a private method or a package-access method where one of the classes in the chain does not belong to the same package, see JLS 8.4.8), we still search the "copied" methods as there may actually be a method inherited from an interface. This follows the JLS semantics where inherited methods are included in the search (JLS 15.12.2.1) but conflicts with the RI where the private or package-access method takes precedence over methods inherited from interfaces. Note that this search can find an accessible method that is not inherited by the qualifying type, either for a package access method when the referrer is in the same package but the qualifying type is in another package, or for a private method where the referrer is in the same class but the qualifying type is actually a subclass. For the moment we allow such calls and we shall consider whether to throw an IncompatibleClassChangeError in this situation in future to comply with JLS 15.12.4.3. The new lookup for interface methods searches the interface class, then all the superinterfaces and then the java.lang.Object class, see implicitly declared methods in interfaces, JLS 9.2. The search for the maximally-specific non-abstract superinterface method is not yet implemented, but the difference should be difficult to observe as the usual subsequent call to FindVirtualMethodForInterface() should yield the same result for any matching method. The new test 162-method-idx-clash exposes several cases where we previously completely messed up due to the effects of the DexCache, or where we were out of line with the RI. It also tests a case where the JLS and the RI disagree and we follow the JLS. Test: art/test/run-test --host --jvm 162-method-resolution Test: m test-art-host-gtest Test: testrunner.py --host Test: testrunner.py --host --interp-ac Test: Nexus 6P boots. Test: testrunner.py --target Bug: 62855082 Bug: 30627598 (cherry picked from commit ba118827465d12177f3996e50133960087b1c916) Change-Id: Ic73e4adf02b5cd66b5a22a3b619dc781357db14c
|
8cf9cb386cd9286d67e879f1ee501ec00d72a4e1 |
|
19-Jul-2017 |
Andreas Gampe <agampe@google.com> |
ART: Include cleanup Let clang-format reorder the header includes. Derived with: * .clang-format: BasedOnStyle: Google IncludeIsMainRegex: '(_test|-inl)?$' * Steps: find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup' git-clang-format -style=file HEAD^ manual inspection git commit -a --amend Test: mmma art Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
|
ba118827465d12177f3996e50133960087b1c916 |
|
12-Jun-2017 |
Vladimir Marko <vmarko@google.com> |
ART: Change method lookup to be more consistent to JLS and the RI. The method lookup for different invoke types was previously widely different and didn't work well with the dex cache method array where we have only a single slot for each MethodId. The new behavior is to perform the same lookup for all cases, distinguishing only between interface and non-interface referencing class, and to further align the behavior with the JLS and the RI. Where the JLS conflicts with the RI, we follow the JLS semantics. The new lookup for class methods first searches the methods declared in the superclass chain (ignoring "copied" methods) and only then looks in the "copied" methods. If the search in the superclass chain finds a method that has not been inherited (i.e. either a private method or a package-access method where one of the classes in the chain does not belong to the same package, see JLS 8.4.8), we still search the "copied" methods as there may actually be a method inherited from an interface. This follows the JLS semantics where inherited methods are included in the search (JLS 15.12.2.1) but conflicts with the RI where the private or package-access method takes precedence over methods inherited from interfaces. Note that this search can find an accessible method that is not inherited by the qualifying type, either for a package access method when the referrer is in the same package but the qualifying type is in another package, or for a private method where the referrer is in the same class but the qualifying type is actually a subclass. For the moment we allow such calls and we shall consider whether to throw an IncompatibleClassChangeError in this situation in future to comply with JLS 15.12.4.3. The new lookup for interface methods searches the interface class, then all the superinterfaces and then the java.lang.Object class, see implicitly declared methods in interfaces, JLS 9.2. The search for the maximally-specific non-abstract superinterface method is not yet implemented, but the difference should be difficult to observe as the usual subsequent call to FindVirtualMethodForInterface() should yield the same result for any matching method. The new test 162-method-idx-clash exposes several cases where we previously completely messed up due to the effects of the DexCache, or where we were out of line with the RI. It also tests a case where the JLS and the RI disagree and we follow the JLS. Test: art/test/run-test --host --jvm 162-method-resolution Test: m test-art-host-gtest Test: testrunner.py --host Test: testrunner.py --host --interp-ac Test: Nexus 6P boots. Test: testrunner.py --target Bug: 62855082 Bug: 30627598 Change-Id: If450c8cff2751369011d649c25d28a482a2c61a3
|
6d3e76884710e639e79a46d505395bc83ad5ec7d |
|
11-Jul-2017 |
Chang Xing <chxing@google.com> |
Abstract SetField functions with Transaction check Abstracted several functions which set objects' fields with a check to test whether transaction is active to determine one template argument, this make more object modification operations support transaction. Replaced some function calls with transaction checking version to support clinit for app image to run under transaction. Tests shows not breaking anything, testcase cover this situation will be added shortly. Test: make test-art-host -j64 Change-Id: Ic15a4428a7c7cce6832651e1894eb760354de009
|
2722f380d6430be83a1c899a94999690a8ab26df |
|
09-Jun-2017 |
Andreas Gampe <agampe@google.com> |
ART: Fix old warnings Fix Wundefined-var-template warnings. Partially reverts commit df53be273509dd43725870fb20a2c7d71f7fbfd3. Bug: 28149048 Bug: 29823425 Test: m Test: m test-art-host Change-Id: Ib077312558f9e2f784859861c000fbac8375b3f5
|
c6ea7d00ad069a2736f603daa3d8eaa9a1f8ea11 |
|
02-Feb-2017 |
Andreas Gampe <agampe@google.com> |
ART: Clean up art_method.h Clean up the header. Fix up other headers including the -inl file, in an effort to prune the include graph. Fix broken transitive includes by making includes explicit. Introduce new -inl files for method handles and reference visiting. Test: source build/envsetup.sh && lunch aosp_angler-userdebug && mmma art Test: source build/envsetup.sh && lunch aosp_mips64-userdebug && mmma art Change-Id: I8f60f1160c2a702fdf3598149dae38f6fa6bc851
|
4f2e957b07c8b6e48bbd7593bb64f3c5214fa489 |
|
16-Mar-2017 |
Alex Light <allight@google.com> |
Ensure the GC visits Obsolete Methods We were previously not visiting obsolete methods during GCs. This could lead to the use of stale pointers. Bug: 36335999 Test: ./test/testrunner/testrunner.py --host --interp-ac --gcstress -j40 Change-Id: I2b5c7c75b29f9037204a860501fcdb78104b5e7a
|
6b2dc3156a2140a5bfd9cbbf5d7dad332ab5f5bd |
|
14-Mar-2017 |
Narayan Kamath <narayan@google.com> |
ART: Get rid of most of java.lang.DexCache. All remaining functionality is moved over to native. The DexCache object itself is allocated in the Java heap, even though there's no longer much of a reason to do so. It can be changed in a future change if needed. This also renames mirror::Class:GetInterfaces to GetProxyInterfaces since it's supposed to be called only for proxies. Test: test-art-host, cts -m CtsLibcoreTestCases Change-Id: Ie261f22a9f80c929f01d2b456f170c7a464ba21c
|
8d6768d47b66a688d35399d524ad5a5450e9d9d4 |
|
14-Mar-2017 |
Vladimir Marko <vmarko@google.com> |
Revert^6 "Hash-based dex cache type array." Fixed ImageWriter to write class table also if it contains only boot class loader classes. Added a regression test and added extra checks for debug-build to verify that dex cache types from app image are also in the class table. Removed some unnecessary debug output. Test: 158-app-image-class-table Bug: 34839984 Bug: 30627598 Bug: 34659969 This reverts commit 0b66d6174bf1f6023f9d36dda8538490b79c2e9f. Change-Id: I6a747904940c6ebc297f4946feef99dc0adf930c
|
0b66d6174bf1f6023f9d36dda8538490b79c2e9f |
|
13-Mar-2017 |
Vladimir Marko <vmarko@google.com> |
Revert^5 "Hash-based dex cache type array." For app images, ImageWriter does not add boot image classes to the app image class table even though it keeps them in the dex caches. The reason for that is unknown, the code looks OK. Bug: 34839984 Bug: 30627598 Bug: 34659969 Also reverts "Improve debugging output for a crash." This reverts commits bfb80d25eaeb7a604d5dd25a370e3869e96a33ab, 8dd56fcb3196f466ecaffd445397cb11ef85f89f. Test: testrunner.py --host Change-Id: Ic8db128207c07588c7f11563208ae1e85c8b0e84
|
bfb80d25eaeb7a604d5dd25a370e3869e96a33ab |
|
14-Feb-2017 |
Vladimir Marko <vmarko@google.com> |
Revert^4 "Hash-based dex cache type array." Added extra output to the abort message to collect more data when we hit the crash. Added extra check when loading an app image to verify that the class table isn't already broken. Test: testrunner.py --host Bug: 34839984 Bug: 30627598 Bug: 34659969 This reverts commit 5812e20ff7cbc8efa0b8d7486ada2f58840a6ad5. Change-Id: I9bb442a184c236dcb75b3e42a095f39cd6bee59d
|
fa4333dcb481e564f54726b4e6f8153612df835e |
|
14-Feb-2017 |
Andreas Gampe <agampe@google.com> |
ART: Add operator == and != with nullptr to Handle Get it in line with ObjPtr and prettify our code. Test: m Change-Id: I1322e2a9bc7a85d7f2441034a19bf4d807b81a0e
|
5812e20ff7cbc8efa0b8d7486ada2f58840a6ad5 |
|
14-Feb-2017 |
Mathieu Chartier <mathieuc@google.com> |
Revert^3 "Hash-based dex cache type array." Assert failing for "earchbox:search": F zygote64: class_linker.cc:4612] Check failed: handle_scope_iface.Get() != nullptr Test: m test-art-host Bug: 34839984 Bug: 30627598 Bug: 34659969 This reverts commit 85c0f2ac03417f5125bc2ff1dab8109859c67d5c. Change-Id: I39846c20295af5875b0f945be7035c73ded23135
|
85c0f2ac03417f5125bc2ff1dab8109859c67d5c |
|
02-Feb-2017 |
Vladimir Marko <vmarko@google.com> |
Revert^2 "Hash-based dex cache type array." The reason for the revert was fixed by https://android-review.googlesource.com/332666 . We now enable clearing dex cache types in test 155 from that CL. Also avoid an unnecessary store in LookupResolvedTypes() and prevent verifier from messing up the dex cache types. Test: m test-art-host Bug: 34839984 Bug: 30627598 Bug: 34659969 This reverts commit d16363a93053de0f32252c7897d839a46aff14ae. Change-Id: Ie8603cfa772e78e648d005b0b6eae59062ae729d
|
90b936ddda63139ff46a6755c3b83ad6e4ab4ac5 |
|
31-Jan-2017 |
Andreas Gampe <agampe@google.com> |
ART: Refactor verify_object.h Move the actual VerifyObject check into a new cc file, as we commonly don't enable the check at all. This allows to cut the -inl include from almost all current users. This also exposes missing -inl includes. Also fix up some of our old mess where .h defined functions require -inl.h defined functions. Test: m Change-Id: I3dd821bbe2015564a29bf1ed9be00f7a7276ad61
|
d16363a93053de0f32252c7897d839a46aff14ae |
|
01-Feb-2017 |
Vladimir Marko <vmarko@google.com> |
Revert "Hash-based dex cache type array." Reverting to work around some programs crashing with Check failed: handle_scope_iface.Get() != nullptr. though the reason for the failure not yet understood. Test: m test-art-host Bug: 34839984 Bug: 30627598 Bug: 34659969 Bug: 30419309 This reverts commit ec7862283dd49f5a58d0ac45960ce27c2f7671b8. Change-Id: Ifded663633082f1e59e5b6ff2e026dc559bd6b82
|
ec7862283dd49f5a58d0ac45960ce27c2f7671b8 |
|
20-Dec-2016 |
Vladimir Marko <vmarko@google.com> |
Hash-based dex cache type array. Test: m test-art-host (Interpreter, Optimizing, JIT) Test: m test-art-target on Nexus 6P (Interpreter, Optimizing, JIT) Test: Nexus 6P boots Test: m valgrind-test-art-host Bug: 30627598 Bug: 34659969 Bug: 30419309 Change-Id: Ic00eda89e58088a3573fc9ec0ad04c0e69e161d1
|
72ab684871f870aead76b23cb67deb046107b380 |
|
20-Jan-2017 |
Vladimir Marko <vmarko@google.com> |
Add class status for resolved erroneous classes. Split the old ambiguous status mirror::Class::kStatusError into kStatusErrorUnresolved and kStatusErrorResolved. Once a class has been resolved, IsResolved() shall return true even if the class later becomes erroneous. Allow returning erroneous class from ClassLinker::EnsureResolved() if it has been previously resolved. This allows consistent behavior for retrieving classes, immune to multi-threaded races and multi-dex weirdness. It also allows JVMTI to properly report "prepared" (i.e. resolved) classes that are also erroneous. The new behavior is consistent with the RI. Add regression tests to 008-exceptions for inconsistent behavior for multi-dex retrieval of erroneous resolved class (wrapping or not wrapping the old exception based on which dex file is used for lookup) and for a CHECK(IsResolved()) crash in ClassLinker::LoadSuperAndInterfaces() (without any tests for similar checks that could have previously failed only due to extremely unlikely race conditions; these should now also be fixed). Inconsistency still remains for class verification as shown by the new exceptionsForSuperClassInitFailure() test in 008-exceptions, where interpreter and Optimizing still cause different exceptions to be thrown. Note: This is partially changing behavior implemented for bug 28787733. Since we allow the class loader to retrieve an erroneous resolved class, the ExceptionInInitializerError is not thrown at all from VMClassLoader_findLoadedClass(), so there is nothing to wrap in ClassNotFoundException. Test: m test-art-host Bug: 30627598 Bug: 28787733 Change-Id: I86cdca00f35a0d6221d2559e3026ac0428a3613c
|
46ee31b67d7ee1bd085fbc240502053caa3cf8fa |
|
14-Dec-2016 |
Andreas Gampe <agampe@google.com> |
ART: Move to libbase StringPrintf Remove ART's StringPrintf implementation. Fix up clients. Add missing includes where necessary. Test: m test-art-host Change-Id: I564038d5868595ac3bb88d641af1000cea940e5a
|
f9bf250cc642c4e3e0c6904550fe922d3359a737 |
|
14-Dec-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Remove dex cache string from mirror::Class. The compiled code does not need it anymore. Test: test-art-host test-art-target Change-Id: I71c08ce12d450ab2b2cd018330d42a8b8c9e3da2
|
19a4d374738da4dc668a078f92dbe887ff9f00d9 |
|
08-Dec-2016 |
Vladimir Marko <vmarko@google.com> |
Clean up Class::GetDirectInterface(). Once the `klass` has been resolved, this function should not need to resolve interface types anymore. Drop the type resolution from this function and pass the Class as ObjPtr<> instead of Handle<>. Make callers that expect non-null result DCHECK() that assumption. For the callers that may actually need to resolve these interface classes, introduce a new function ResolveDirectInterface(). Also improve ObjPtr<> constructors and assignment operator to improve overload resolution. For example, if we have foo(ObjPtr<T1>) and foo(ObjPtr<T2>), calling foo(.) with a T1* would have previously been ambiguous even if T1 is not a base of T2. Test: m test-art-host Change-Id: Iff44a7285f68f0af4507fc9ba37343865422fe84
|
a5b09a67034e57a6e10231dd4bd92f4cb50b824c |
|
18-Nov-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add dex::TypeIndex Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
|
0273ad1f702d7094b90ebb62c21c50b6a9568ab0 |
|
02-Nov-2016 |
Alex Light <allight@google.com> |
Remove lock from ClassExt installation procedure. We were using a lock on the class to ensure that we avoid races in setting the ext_data_ field of a class object. We replace this with a CAS of the field in order to prevent deadlocks. Test: mma test-art-host Change-Id: Ie436ff9526f2c3b38a9af49c5606a7cee6d718f1
|
d62515891b15e73bc8eebb55cc09cb4dec4fcf21 |
|
31-Oct-2016 |
Alex Light <allight@google.com> |
Add ClassExt mirror. We add the ClassExt type to hold values in Class that are not always needed without making the Class type larger. For the initial change we move the verifyError field into this type. It is expected to grow as time goes on. Test: mma test-art-host Change-Id: I1d97df2e1267203841ad47b2effcb66dd76ac12a
|
709b070044354d9f47641f273edacaeeb0240ab7 |
|
13-Oct-2016 |
David Sehr <sehr@google.com> |
Remove mirror:: and ArtMethod deps in utils.{h,cc} The latest chapter in the ongoing saga of attempting to dump a DEX file without having to start a whole runtime instance. This episode finds us removing references to ArtMethod/ArtField/mirror. One aspect of this change that I would like to call out specfically is that the utils versions of the "Pretty*" functions all were written to accept nullptr as an argument. I have split these functions up as follows: 1) an instance method, such as PrettyClass that obviously requires this != nullptr. 2) a static method, that behaves the same way as the util method, but calls the instance method if p != nullptr. This requires using a full class qualifier for the static methods, which isn't exactly beautiful. I have tried to remove as many cases as possible where it was clear p != nullptr. Bug: 22322814 Test: test-art-host Change-Id: I21adee3614aa697aa580cd1b86b72d9206e1cb24
|
28bd2e4f151267b34b8e1eb19c489d8d547bbf5c |
|
04-Oct-2016 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::Class to use ObjPtr Leave the return types as non ObjPtr for now. Fixed moving GC bugs in tests. Test: test-art-host Bug: 31113334 Change-Id: I5da1b5ac55dfbc5cc97a64be2c870ba9f512d9b0
|
51eaa7f5547f9ddea92ce57c6c2df9534d5017b8 |
|
13-Oct-2016 |
Mathieu Chartier <mathieuc@google.com> |
Fix moving GC bug in cloning finalizable objects It is not safe to have thread suspension in the PreFenceVisitor. The fix is to add the finalizer reference in the caller. Test: art/tools/run-libcore-tests.sh '--mode=host' '--variant=X32' --debug Bug: 31113334 Change-Id: I1e4650f8b75408a3d07e2c51ac334ff98552cfb5
|
9d156d500801accee919b6d51e22d6ddcdcd4a05 |
|
07-Oct-2016 |
Mathieu Chartier <mathieuc@google.com> |
Move Heap parameters to ObjPtr Deleted some unused object dumping code. Test: test-art-host Bug: 31113334 Change-Id: I747220caafe6679591fd4b361d7f50383a046164
|
3398c7874e002beaa6c2b2fadf183e7d1ddad23a |
|
30-Sep-2016 |
Mathieu Chartier <mathieuc@google.com> |
Move ArtField to ObjPtr Added EXPECT_OBJ_PTR_EQ and variants to gtests. Fixed moving GC bugs in: ClassLinker::CreatePathClassLoader ClassLinkerTest: StaticFields ObjPtr Decode call sites: 186 -> 181. Some tests fail due to ResolvedFieldAccessTest, will fix in follow up CL. Bug: 31113334 Test: test-art-host CC baker Change-Id: I8b266ad00f3c20c8cbe7cfdf280d175083df0b88
|
3fec9ac0d5af1358d216eb2fdc2000ec0205f3f0 |
|
13-Sep-2016 |
Andreas Gampe <agampe@google.com> |
ART: Use libbase logging Move most of our logging infrastructure over to system/core/base. Retain VLOG. Using unified Android infrastructure has two main advantages. First, it reduces the complexity/maintenance burden in ART. Second, it allows to detach logging for the cases where we do not want or need a runtime, e.g., dexdump, the disassembler, etc. As a part of the latter, libbase is also supported for all hosts (including Windows). From a developer viewpoint, there are minor behavior changes for the LOG statements (see above), but otherwise usage is the same. Explicit severity enum items are in the android::base namespace now. Bug: 31338270 Test: m test-art-host Change-Id: I5abcb2f45f5b03d49951874c48544f72a283a91b
|
9323e6e44060545d6c4f925139572868f65b7fe3 |
|
13-Sep-2016 |
David Sehr <sehr@google.com> |
Separate annotations from dexfile reading. Bug: 22322814 Change-Id: I867d66da407dd80394a10d19903ebbc1ec3986ff Test: test-art
|
268764da8022cafa5661c5b514eaa343c5257e57 |
|
13-Sep-2016 |
Mathieu Chartier <mathieuc@google.com> |
Make ScopedAssertNoThreadSuspension no overhead for non-debug Previously it required Thread::Current() which may not be free. The plan is to add a lot more ScopedAssertNoThreadSuspension in the codebase. Also cleaned up callers. Bug: 31458474 Change-Id: I5a1621a5435476504d22266cc01a9bf26aab7568
|
161db1dea4808d32db3623cc1a8e91b53df0fb02 |
|
01-Sep-2016 |
Mathieu Chartier <mathieuc@google.com> |
Use the fast path object size for RosAlloc asm stubs Also address comments. MemAllocTest perf on N5X speedup in the noise. Bug: 9986565 Test: test-art-host -j32, N5X booting Change-Id: Ic22ca92aab88b37fd66928949bf11264ee3476dc
|
93bbee0c1c97bd9a5336ed0c9e41cd17613df585 |
|
31-Aug-2016 |
Mathieu Chartier <mathieuc@google.com> |
Faster allocation fast path Added a new object size field to class, this field contains the aligned object size if the object is not finalizable and is initialized. If the object is finalizable or uninitialized the field is set to some large value that forces the ASM allocators to go slow path. Only implemented for region/normal TLAB for now, will add the to RosAlloc stubs soon. CC N6P MemAllocTest: 1067 -> 1039 (25 samples) CC N6P EAAC: 1281 -> 1260 (25 samples) RAM overhead technically 0 since mirror::Class was not 8 byte aligned previously. Since the allocators require 8 byte allignment, there would have been 1 word of padding at the end of the class. If there was actually 4 extra bytes per class, the system overhead would be 36000 * 4 = 120KB based on old N6P numbers for the number of loaded classes after boot. Bug: 9986565 Test: test-art-host CC baker, N6P phone boot and EAAC runs. Change-Id: I119a87b8cc6c980bff980a0c62f42610dab5e531
|
bdf7f1c3ab65ccb70f62db5ab31dba060632d458 |
|
31-Aug-2016 |
Andreas Gampe <agampe@google.com> |
ART: SHARED_REQUIRES to REQUIRES_SHARED This coincides with the actual attribute name and upstream usage. Preparation for deferring to libbase. Test: m Test: m test-art-host Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
|
5bb4b0b4fcf230d8e4e45cd3fdec820f0b44141a |
|
18-Aug-2016 |
Mathieu Chartier <mathieuc@google.com> |
Revert "Logging improvements for C++ / Java structure issues" Bug: 30913672 This reverts commit d833525cfe3ac2086e3156a8b3193c05974d6316. Change-Id: I4e51591b49d54b8bb3e920fbc221c21aca0084fb
|
d833525cfe3ac2086e3156a8b3193c05974d6316 |
|
17-Aug-2016 |
Neil Fuller <nfuller@google.com> |
Logging improvements for C++ / Java structure issues When C++ and Java structures are different sizes or arranged differently some log statements are useful but are hard to pick out because they merge with other log lines. Adding "\n" to the end of them makes it easier to read. Change-Id: Ia6d78e0832c7814bf1fef42bb3d8c056f83766bd Test: make build-art-host
|
542451cc546779f5c67840e105c51205a1b0a8fd |
|
26-Jul-2016 |
Andreas Gampe <agampe@google.com> |
ART: Convert pointer size to enum Move away from size_t to dedicated enum (class). Bug: 30373134 Bug: 30419309 Test: m test-art-host Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
|
e01e3644205c3644546889237c20185391a0092e |
|
25-Jul-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add pointer-size template to some reflection functions The unstarted runtime may run code for a different pointer size, even when no transaction is active (e.g., during startup). To retain performance when the runtime is up and executing under normal conditions, add a template parameter and use sizeof(void*) in places where it is adequate. For maintainability, it is necessary to drop the default for the transaction template parameter. Implicit conversions from bool to size_t may lead to incorrect code and hard to diagnose problems. So instead ensure that all callers must give all template parameter values. Test: m test-art-host Change-Id: I3076883422c8553ede4de5642409c5684a5a9aa8
|
df2d4f22d5e89692c90b443da82fe2930518418b |
|
30-Jun-2016 |
Artem Udovichenko <artem.u@samsung.com> |
Revert "Revert "Optimize IMT"" This reverts commit 88f288e3564d79d87c0cd8bb831ec5a791ba4861. Test: Includes smali tests to exercise cts failures that led to revert. These tests check that objects that don't implement any interfaces are handled properly when interface methods are invoked on them. Bug: 29188168 (for initial CL) Bug: 29778499 (reason for revert) Change-Id: I49605d53692cbec1e2622e23ff2893fc51ed4115
|
a62cb9bb6cb2278cb41ab0664191623e178c6a4f |
|
30-Jun-2016 |
Artem Udovichenko <artem.u@samsung.com> |
Revert "Revert "Optimize IMT"" This reverts commit 88f288e3564d79d87c0cd8bb831ec5a791ba4861. Change-Id: I49605d53692cbec1e2622e23ff2893fc51ed4115
|
bb268b14da040c5df27a413426aa2baab602ed15 |
|
30-Jun-2016 |
Vladimir Marko <vmarko@google.com> |
Clean up Class::FindStaticField(). Previously we have wrapped the class pointer in a Handle for the GetDirectInterface() call but we didn't wrap the DexCache pointer. Since GetDirectInferface() call from this function cannot cause thread suspension anyway, fix the inconsistency by using raw pointers where possible and asserting that no thread suspension takes place. Test: Run standard ART test suite in gcstress mode. Change-Id: Ie4c6101aabd6fa68733e4920db277f835793d943
|
88f288e3564d79d87c0cd8bb831ec5a791ba4861 |
|
29-Jun-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Optimize IMT" Bug: 29188168 (for initial CL) Bug: 29778499 (reason for revert) This reverts commit badee9820fcf5dca5f8c46c3215ae1779ee7736e. Change-Id: I32b8463122c3521e233c34ca95c96a5078e88848
|
fd43db68d204caaa0e411ca79a37af15d1c001af |
|
29-Jun-2016 |
Jeff Hao <jeffhao@google.com> |
Revert "Optimize IMT" This reverts commit 0790af1391b316c5c12b4e135be357008c060696. Bug: 29188168 (for initial CL) Bug: 29778499 (reason for revert) Change-Id: I2c3e4ec2cebdd40faec67ddb721b7acdc8e90061
|
0790af1391b316c5c12b4e135be357008c060696 |
|
13-May-2016 |
Nelli Kim <nelli.kim@samsung.com> |
Optimize IMT * Remove IMT for classes which do not implement interfaces * Remove IMT for array classes * Share same IMT Saved memory (measured on hammerhead): boot.art: Total number of classes: 3854 Number of affected classes: 1637 Saved memory: 409kB Chrome (excluding classes in boot.art): Total number of classes: 2409 Number of affected classes: 1259 Saved memory: 314kB Google Maps (excluding classes in boot.art): Total number of classes: 6988 Number of affected classes: 2574 Saved memory: 643kB Performance regression on benchmarks/InvokeInterface.java benchmark (measured timeCall10Interface) 1st launch: 9.6% 2nd launch: 6.8% Bug: 29188168 (cherry picked from commit badee9820fcf5dca5f8c46c3215ae1779ee7736e) Change-Id: If8db765e3333cb78eb9ef0d66c2fc78a5f17f497
|
badee9820fcf5dca5f8c46c3215ae1779ee7736e |
|
13-May-2016 |
Nelli Kim <nelli.kim@samsung.com> |
Optimize IMT * Remove IMT for classes which do not implement interfaces * Remove IMT for array classes * Share same IMT Saved memory (measured on hammerhead): boot.art: Total number of classes: 3854 Number of affected classes: 1637 Saved memory: 409kB Chrome (excluding classes in boot.art): Total number of classes: 2409 Number of affected classes: 1259 Saved memory: 314kB Google Maps (excluding classes in boot.art): Total number of classes: 6988 Number of affected classes: 2574 Saved memory: 643kB Performance regression on benchmarks/InvokeInterface.java benchmark (measured timeCall10Interface) 1st launch: 9.6% 2nd launch: 6.8% Change-Id: If07e45390014a6ee8f3c1c4ca095b43046f0871f
|
715fdc2c99f688f97c684978632f311a284ba43c |
|
19-Apr-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add some reflection cutouts Add Class.getInnerClassFlags and Method.invoke to unstarted runtime. Allows to compile-time initialize: * android.net.NetworkInfo * android.net.wifi.WifiInfo Bug: 27265238 (cherry picked from commit b3ffbe32b78c18739736fc998d65430b46c510e5) Change-Id: I3e267519acf14b08c687f1e831e2027d37158767
|
b3ffbe32b78c18739736fc998d65430b46c510e5 |
|
19-Apr-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add some reflection cutouts Add Class.getInnerClassFlags and Method.invoke to unstarted runtime. Allows to compile-time initialize: * android.net.NetworkInfo * android.net.wifi.WifiInfo Bug: 27265238 Change-Id: I3e267519acf14b08c687f1e831e2027d37158767
|
6039e5662507e42896084e561fa546b432698ee6 |
|
06-Apr-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add getDeclaredConstructor cutout for unstarted runtime In the vein of getDeclaredMethod and getDeclaredField. Refactor code from java_lang_Class to share code. Allows to compile-time initialize: * sun.security.x509.AVAKeyword * sun.security.x509.X500Name Bug: 27265238 (cherry picked from commit f72f19fac0016499d33fd75b0463d0128a58a9f4) Change-Id: I075c1b11f3408f5b31e4f84140a24fd8d3eaa17e
|
f72f19fac0016499d33fd75b0463d0128a58a9f4 |
|
06-Apr-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add getDeclaredConstructor cutout for unstarted runtime In the vein of getDeclaredMethod and getDeclaredField. Refactor code from java_lang_Class to share code. Allows to compile-time initialize: * sun.security.x509.AVAKeyword * sun.security.x509.X500Name Bug: 27265238 Change-Id: I075c1b11f3408f5b31e4f84140a24fd8d3eaa17e
|
22deed092ff53e4e11e09dd9bd24a220a566190f |
|
04-Apr-2016 |
Aart Bik <ajcbik@google.com> |
Move DCHECK into loop. Rationale: Since pointer is non-null on loop entry, moving the check into the while loop (rather than after) gives a more friendly error message in debug mode when something goes wrong. BUG=27825731 BUG=27627004 Change-Id: I2ea67b3ab6c4edc6815fea38a436e5c3c194e540
|
bc4d218ce2ceef0c4f308d4ff42f7ec1ec43c40e |
|
22-Feb-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add unstarted-runtime functions Add more functions to allow compile-time initialization of code. Bug: 27248115 (cherry picked from commit 0866f4ed6338faa4a193b7e819fc7cd72bd7b0ae) Change-Id: Iaf8d92deb73547ccd31c0d6dde68da3bc14c3985
|
0866f4ed6338faa4a193b7e819fc7cd72bd7b0ae |
|
22-Feb-2016 |
Andreas Gampe <agampe@google.com> |
ART: Add unstarted-runtime functions Add more functions to allow compile-time initialization of code. Bug: 27248115 Change-Id: Iaf8d92deb73547ccd31c0d6dde68da3bc14c3985
|
e4084a5eb46dc6b99c0e0b74bcdecccaceb28fe7 |
|
18-Feb-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Small inlining improvements. - Use the type_index in the current dex file for classes not defined in the current dex file. - Make the loading of the vtable field of a class have no side effects to enable gvn'ing it. Note that those improvements only affect the JIT, where we don't have checker support. Change-Id: I519f52bd8270f2b828f0920a1214da33cf788f41
|
df707e406877e9c0426dd051c00933ebb331673e |
|
03-Feb-2016 |
Igor Murashkin <iam@google.com> |
runtime: Don't skip verification for -Xverify:soft-fail When forcing the interpreter into access checks mode, make sure that the regular verification is still run, giving the verifier an opportunity to throw a VerifyError. If verification would've succeeded (without -Xverify:soft-fail flag), override this and soft-fail, to force the interpreter-with-access-checks to be run instead of the normal faster interpreter. This fixes the following run-tests under the interpeter-access-checks: * 135 * 412 * 471 * 506 * 800 Bug: 22414682 Change-Id: I5cb86a8bba71c7af9361a63c0802786c852b857b
|
a42363f79832a6e14f348514664dc6dc3edf9da2 |
|
17-Dec-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Implement first kind of polymorphic inlining. Add HClassTableGet to fetch an ArtMethod from the vtable or imt, and compare it to the only method the profiling saw. Change-Id: I76afd3689178f10e3be048aa3ac9a97c6f63295d
|
705ad49f353d3f90d8b63625aca2c2035bacdbef |
|
21-Sep-2015 |
Alex Light <allight@google.com> |
Support directly invoking interface default methods With the Java 8 Language one is allowed to directly call default interface methods of interfaces one (directly) implements through the use of the super keyword. We support this behavior through the invoke-super opcode with the target being an interface. We add 3 tests for this behavior. Currently only supports slow-path interpreter. Invoke-super is currently extremely slow. Bug: 24618811 Change-Id: I7e06e17326f7dbae0116bd7dfefca151f0092bd2
|
e64300b8488716056775ecbfa2915dd1b4ce7e08 |
|
16-Dec-2015 |
Alex Light <allight@google.com> |
Revert "Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class"" This reverts commit ae358c1d5cef227b44d6f4971b79e1ab91aa26eb. Bug: 24618811 Change-Id: I8becf9bae3258450b90cfef5e79589db7c535a4d
|
2efb0aa57da168944f99a2d13aed2a426cfa76e7 |
|
15-Dec-2015 |
Alex Light <allight@google.com> |
Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class" This reverts commit 9539150b85142c18e9e8c2264b5b6100942667c3. Change-Id: I596876cd643ec0ad524a56621efb6b89e8886230
|
ae358c1d5cef227b44d6f4971b79e1ab91aa26eb |
|
15-Dec-2015 |
Alex Light <allight@google.com> |
Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class" This reverts commit 6286a97bea0f584342803a215550038852b24776. Change-Id: I5b00f6d1350e9c587acd4b185367dc815ea707de
|
9539150b85142c18e9e8c2264b5b6100942667c3 |
|
04-Dec-2015 |
Alex Light <allight@google.com> |
Combine direct_methods_ and virtual_methods_ fields of mirror::Class Manual cherry-pick of 6286a97 to master This makes several parts of the overall runtime simpler and reduces the size of a class object by 32-bits. Bug: 24618811 Change-Id: I36129b52189e26898ea56fa2b7b45652e06af236
|
6286a97bea0f584342803a215550038852b24776 |
|
04-Dec-2015 |
Alex Light <allight@google.com> |
Combine direct_methods_ and virtual_methods_ fields of mirror::Class This makes several parts of the overall runtime simpler and reduces the size of a class object by 32-bits. Bug: 24618811 Change-Id: I36129b52189e26898ea56fa2b7b45652e06af236
|
a7a4759946d9f11c88dc108b2b6a9518ce9c1e18 |
|
24-Nov-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "lambda: Add support for invoke-interface for boxed innate lambdas" 955-lambda is flaky Bug: 24618608 Bug: 25107649 This reverts commit 457e874459ae638145cab6d572e34d48480e39d2. (cherry picked from commit 3a0909248e04b22c3981cbf617bc2502ed5b6380) Change-Id: I24884344d21d7a4262e53e3f5dba57032687ddb7
|
3a0909248e04b22c3981cbf617bc2502ed5b6380 |
|
24-Nov-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "lambda: Add support for invoke-interface for boxed innate lambdas" 955-lambda is flaky Bug: 24618608 Bug: 25107649 This reverts commit 457e874459ae638145cab6d572e34d48480e39d2. Change-Id: I24884344d21d7a4262e53e3f5dba57032687ddb7
|
457e874459ae638145cab6d572e34d48480e39d2 |
|
23-Oct-2015 |
Igor Murashkin <iam@google.com> |
lambda: Add support for invoke-interface for boxed innate lambdas Lambda closures created with the 'create-lambda' instruction (termed "innate lambdas") can be turned into an object with 'box-lambda'. This CL enables support for those kinds of lambdas to work with 'invoke-interface' by generating a proxy class for the lambda. Note: MIPS32/64 support not included. Bug: 24618608 Bug: 25107649 Change-Id: Ic8f1bb66ebeaed4097e758a50becf1cff6ccaefb
|
52503d83d057c66ea50eed491290e267b80e1fd3 |
|
11-Nov-2015 |
Calin Juravle <calin@google.com> |
Implement common super type in reference type propagation. Currently only if both types are classes. Change-Id: I06e98211ead56875a42bd17f099e319b107a50d4
|
9139e008abe30b7beaf4afd6533228a1dd9b202c |
|
10-Oct-2015 |
Alex Light <allight@google.com> |
Correct exception behavior for default methods Default methods are defined to throw an IncompatibleClassChangeError (ICCE) when they are called and there is no "best" implementation. Previously we would simply throw an ICCE during class loading as soon as we noticed that this would happen if called. This makes us wait until we actually attempt to execute the method. Furthermore, this allows us to use other, non-conflicting, methods on the object as normal. Furthermore, this makes us correctly throw AbstractMethodErrors in cases where all default implementations of a method are overridden by abstract declarations. Adds 3 tests for this new behavior. Bug: 24618811 Change-Id: Id891958a81f9b3862b2ce5919636aabef7d3422e
|
cb086955c2a21270cd2f53a8bce71e577d776506 |
|
03-Nov-2015 |
Andreas Gampe <agampe@google.com> |
ART: Change behavior for rethrowing init failures (2) Always store the pending exception when making a class erroneous. Instead of filtering by ExceptionInInitializerError, add an option to the rethrow that enforces a NoClassDefFoundError, which is required by the specification. Use the libcore companion change to add the stored error (if any) as a cause to the NoClassDefFoundError, which should significantly help tracking down issues. Fix run-test 008 to expect spec-compliant behavior. Test that a cause has been set. Bug: 25445103 Change-Id: I6a0dc54e78312283faf23415887eff387531407f
|
99babb6add7db19ce7605f6d5e4aee79d52e386f |
|
03-Nov-2015 |
Andreas Gampe <agampe@google.com> |
ART: Change behavior for rethrowing init failures Allow to store a Throwable instance or a throwable class. Handle rethrow accordingly. Bug: 25444180 Change-Id: I703c2c6eaf34ad0e3bc0f5a104d65f2ff1b212ca
|
35831e8bfa1c0944d4c978d99c4c5b9577945170 |
|
11-Sep-2015 |
Vladimir Marko <vmarko@google.com> |
Reduce memory used by CompiledMethods. Use LengthPrefixedArray<>s instead of SwapVector<>s to store CompiledMethod data and get rid of the unnecessary members of CompiledMethod to reduce dex2oat memory usage. Refactor the deduplication from CompilerDriver to a new class. Use HashSet<> instead of std::set<> for the DedupeSet<> to further decrease the memory usage and improve performance. This reduces the dex2oat memory usage when compiling boot image on Nexus 5 (with Optimizing, -j1) by ~6.75MiB (5%). This also reduces the compile time by ~2.2% (~1.6% dex2oat time; with Optimizing, without -j). Change-Id: I974f1f5e58350de2bf487a2bca3907fa05fb80ea
|
e2aa3265594486b4b977453752645cdce3026e82 |
|
21-Oct-2015 |
Mathieu Chartier <mathieuc@google.com> |
Use binary search for FindDeclaredInstance/StaticField Before: real 1m18.157s user 1m8.167s sys 0m8.071s After: real 1m12.943s user 1m3.223s sys 0m7.881s Perf results: FindDeclaredStaticField: 1.78% -> 0.11% __GI___strncmp_ssse3: 2.45% -> 0.87% Bug: 10921004 Change-Id: Ice7d3ce2635d6cd2de5574055375d9e20712d241
|
66c2d2d64d7ea75602eb63de7ae9bd2eaeb0a3c2 |
|
25-Aug-2015 |
Mathieu Chartier <mathieuc@google.com> |
Address some comments for class flags Change-Id: I354f48aefc37ce92c4d02cfce1723db0e28907bf
|
13e748b28c5f2bd1e83674d2ca899ff61ae5c0a1 |
|
25-Aug-2015 |
Jeff Hao <jeffhao@google.com> |
Revert "Revert "Move annotations to native."" This reverts commit 7db6dd79a24570448ae737ee1946b00396696cac. Adds check if field's declaring class is proxy. Bug: 23508574 Change-Id: Ie829f1526e74427711e818b56d1588d92946cbf6
|
7db6dd79a24570448ae737ee1946b00396696cac |
|
25-Aug-2015 |
Roland Levillain <rpl@google.com> |
Revert "Move annotations to native." This reverts commit 0042c6d49b8488c78f0b937063e316e8d6244439. Reverting this change (as well as the companion CL https://android-review.googlesource.com/#/c/167510/ in platform/libcore) as they make libcore test libcore.java.lang.reflect.ProxyTest#test24846 fail. Change-Id: Ie0676cabb128277c7df5dab7bde17aefd3b2c09c
|
31decb12db33cb9ed3fdb0de60ca18c6da077fe4 |
|
25-Aug-2015 |
Andreas Gampe <agampe@google.com> |
ART: Add VLOG printing of SetStatus(Error) In verbose:class mode, print a message when a class is set to erroneous, and dump any pending exception. Change-Id: I2ebfe4fcd8495c3ff42675bd3c0f80125b23c019
|
0042c6d49b8488c78f0b937063e316e8d6244439 |
|
30-Jul-2015 |
Jeff Hao <jeffhao@google.com> |
Move annotations to native. Art side of this change. There is also a corresponding Libcore change. Seeing ~2-3x speedup over dalvik KK MR1 in AnnotatedElementBenchmark. Benchmark Speedup of Art AOSP to Dalvik KK MR1 GetAllReturnsLargeAnnotation 2.99 GetAllReturnsMarkerAnnotation 2.20 GetAllReturnsNoAnnotation 2.43 GetAllReturnsSmallAnnotation 2.52 GetAllReturnsThreeAnnotations 2.87 GetAnnotationsOnSubclass 2.42 GetDeclaredAnnotationsOnSubclass 2.49 GetFieldAnnotation 2.68 GetFieldAnnotations 2.60 GetMethodAnnotation 2.66 GetMethodAnnotations 2.61 GetParameterAnnotations 2.52 GetTypeAnnotation 2.56 GetTypeAnnotations 2.17 IsFieldAnnotationPresent 3.26 IsMethodAnnotationPresent 4.99 IsTypeAnnotationPresent 1.34 Change-Id: Ibdbb6d23b17eaab6e83c8774b1bb9401e8227941
|
52a7f5caebdf359ab877f1928aad59f1e9ad29fa |
|
19-Aug-2015 |
Mathieu Chartier <mathieuc@google.com> |
Add class flags to class to help GC scanning Reduces GC time and pauses by reducing the number of loads required to scan an object. Average total GC time before on EvaluateAndApplyChanges (EAAC): 7.452s After: 7.144s Average GC pause times before on EAAC: 860.67us After: 722.75us Adding the class flags field cause a memory increase of ~24k system wide on low memory devices. Change-Id: I3f04212d5787bfbf5e55026584d149f55476105e
|
059ef3ddb2088f926ac452889e0953fdcd646a5e |
|
18-Aug-2015 |
Mathieu Chartier <mathieuc@google.com> |
Always visit object class from VisitReferences We don't want to unload classes which have instances. Slight increase in CMS GC time from ~6.5s to ~7.3s on EvaluateAndApplyChanges. Bug: 22720414 Change-Id: I467ff9c9d55163d2a90b999aef3bdd7b3f648bac
|
3887c468d731420e929e6ad3acf190d5431e94fc |
|
12-Aug-2015 |
Roland Levillain <rpl@google.com> |
Remove unnecessary `explicit` qualifiers on constructors. Change-Id: Id12e392ad50f66a6e2251a68662b7959315dc567
|
3ee25bb1df3df4f57c6a4c7d3957dd7303aa00d7 |
|
10-Aug-2015 |
Mathieu Chartier <mathieuc@google.com> |
Do read barriers on native roots in CopyClassVisitor Fixes a race condition caused by making a copy of a class then clearing the native root arrays of the original class. If the original class was gray and the new class was black then the GC would miss the native roots. Bug: 22957957 Change-Id: I706110018220af12a2ad0d72eb803f1cfe3580b9
|
90443477f9a0061581c420775ce3b7eeae7468bc |
|
17-Jul-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move to newer clang annotations Also enable -Wthread-safety-negative. Changes: Switch to capabilities and negative capabilities. Future work: Use capabilities to implement uninterruptible annotations to work with AssertNoThreadSuspension. Bug: 20072211 Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
|
997673870a487baa136f1b13f81ae26dd3005e14 |
|
11-Jul-2015 |
Mathieu Chartier <mathieuc@google.com> |
Fix proxy handling in FindDeclaredVirtualMethod Added missing GetInterfaceMethodIfProxy and test. Fixed formatting. Bug: 22411819 https://code.google.com/p/android-developer-preview/issues/detail?id=2635 (cherry picked from commit 72156e28fd6bc72ac965b29446f8801b2e82f2fd) Change-Id: I3eece9c72091bb9d0262aacf0a75ec6908b5f4d2
|
72156e28fd6bc72ac965b29446f8801b2e82f2fd |
|
11-Jul-2015 |
Mathieu Chartier <mathieuc@google.com> |
Fix proxy handling in FindDeclaredVirtualMethod Added missing GetInterfaceMethodIfProxy and test. Fixed formatting. Bug: 22411819 https://code.google.com/p/android-developer-preview/issues/detail?id=2635 Change-Id: I3eece9c72091bb9d0262aacf0a75ec6908b5f4d2
|
3d21bdf8894e780d349c481e5c9e29fe1556051c |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
|
4edd8476339fd93ba8ff384ad107f1fc662e64a3 |
|
01-Jun-2015 |
Mathieu Chartier <mathieuc@google.com> |
Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0
|
e401d146407d61eeb99f8d6176b2ac13c4df1e33 |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
|
848f70a3d73833fc1bf3032a9ff6812e429661d9 |
|
15-Jan-2014 |
Jeff Hao <jeffhao@google.com> |
Replace String CharArray with internal uint16_t array. Summary of high level changes: - Adds compiler inliner support to identify string init methods - Adds compiler support (quick & optimizing) with new invoke code path that calls method off the thread pointer - Adds thread entrypoints for all string init methods - Adds map to verifier to log when receiver of string init has been copied to other registers. used by compiler and interpreter Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
|
fc58af45e342ba9e18bbdf597f205a58ec731658 |
|
17-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Add AbstractMethod, Constructor, Method Moves functionality to ART from libcore. Precursor to moving ArtMethods to native. Mostly performance improvements. N5 perf before (irrelevant results removed): Class_getConstructor 962.87 =========== Class_getDeclaredMethod 2394.37 ============================ Class_getMethod 2509.20 ============================== Class_newInstance 1999.81 ======================= Method_invokeI 1439.02 ================= Method_invokePreBoxedI 1415.82 ================ Method_invokeStaticI 1456.24 ================= Method_invokeStaticPreBoxedI 1427.32 ================= Method_invokeStaticV 814.47 ========= Method_invokeV 816.56 ========= After: benchmark ns linear runtime Class_getConstructor 1302.04 ================ Class_getDeclaredMethod 1459.01 ================== Class_getMethod 1560.40 =================== Class_newInstance 2029.94 ========================= Method_invokeI 1312.89 ================ Method_invokePreBoxedI 1255.01 =============== Method_invokeStaticI 1289.13 =============== Method_invokeStaticPreBoxedI 1196.52 ============== Method_invokeStaticV 790.82 ========= Method_invokeV 791.73 ========= Performance improvements are more than just fixing regressions introduced in: http://android-review.googlesource.com/#/c/146069/ Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
|
3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b |
|
13-Apr-2015 |
Vladimir Marko <vmarko@google.com> |
ART: Clean up includes. Reduce dependencies to improve incremental build times. Break up circular dependency involving class_linker-inl.h. Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
|
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
|
16f149c2cb43a14d8f33d7d0fa36cd784e900f07 |
|
23-Mar-2015 |
Andreas Gampe <agampe@google.com> |
ART: Change RETURN_OBJECT verification for arrays Arrays appear to be valid (as according to spec), even if their components are erroneous. If a component is erroneous, it may not have loaded superclass or interface information, and so fail a direct check for assignability. Add a cutout that checks whether the declared return-type or the actual return-type are arrays with erroneous components (and if so, have the same 'depth'). In that case, generate a soft instead of a hard error. Also includes a fix to DumpClass. Bug: 19683465 Change-Id: Ie73de03adeb0af7e939370d7363684fe125d7994
|
5b783e66b26b7b6ee13d344f4b77f6b7c47c4723 |
|
19-Mar-2015 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix 003-omnibus-opcodes flaky failures with GSS GC. Fix a moving GC bug in Class::SetStatus(). Bug: 19828874 Change-Id: I6bef49a7ce964e8a7e316f282aaf1b8544efe76d
|
14691c5e786e8c2c5734f687e4c96217340771be |
|
05-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Compute the right catch location for the debugger. Also remove tls ThrowLocation, it is not needed anymore. Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9
|
7642cfc90fc9c3ebfd8e3b5041915705c93b5cf0 |
|
26-Feb-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Change how we report exceptions to the debugger. This is only a refactoring/cleanup. Bug fixes with respect to catch location, and more cleanups will follow. Change-Id: I30d3c6260b0c8f8115a811621397225b88f2063a
|
e34fa1df67fbe0173b4ea9abddcc3ae3d0537037 |
|
14-Jan-2015 |
Mathieu Chartier <mathieuc@google.com> |
Print more info in MarkSweep::VerifyRoot Refactored old root callback to use a new class called RootInfo. RootInfo contains all the relevant info related to the root associated with the callback. The MarkSweep::VerifyRoot function now uses this info to print the StackVisitor's described location if the GC root is of the type kRootJavaFrame. Some other cleanup. Example output: E/art (12167): Tried to mark 0x123 not contained by any spaces E/art (12167): Attempting see if it's a bad root E/art (12167): Found invalid root: 0x123 with type RootJavaFrame E/art (12167): Location=Visiting method 'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0) vreg=0 (cherry picked from commit 12f7423a2bb4bfab76700d84eb6d4338d211983a) Bug: 18588862 Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
|
12f7423a2bb4bfab76700d84eb6d4338d211983a |
|
14-Jan-2015 |
Mathieu Chartier <mathieuc@google.com> |
Print more info in MarkSweep::VerifyRoot Refactored old root callback to use a new class called RootInfo. RootInfo contains all the relevant info related to the root associated with the callback. The MarkSweep::VerifyRoot function now uses this info to print the StackVisitor's described location if the GC root is of the type kRootJavaFrame. Some other cleanup. Example output: E/art (12167): Tried to mark 0x123 not contained by any spaces E/art (12167): Attempting see if it's a bad root E/art (12167): Found invalid root: 0x123 with type RootJavaFrame E/art (12167): Location=Visiting method 'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0) vreg=0 Bug: 18588862 Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
|
91a6dc41003cdd22073e72fd5425df8e95b1c172 |
|
01-Dec-2014 |
Mathieu Chartier <mathieuc@google.com> |
Set dex_cache_strings_ when we call Class::SetDexCache Ensures that these two variables never get out of sync. The error was presumably related to not doing this for proxy classes. This caused java code which was looking at the dex_cache_strings_ field to incorrectly access a null array. Bug: 18548887 (cherry picked from commit ea1c3d77b92b30ec527f2ca5bfe316a882b698e0) Change-Id: I022d9311b38b61e160ed70e3c5d9639797adb29c
|
ea1c3d77b92b30ec527f2ca5bfe316a882b698e0 |
|
01-Dec-2014 |
Mathieu Chartier <mathieuc@google.com> |
Set dex_cache_strings_ when we call Class::SetDexCache Ensures that these two variables never get out of sync. The error was presumably related to not doing this for proxy classes. This caused java code which was looking at the dex_cache_strings_ field to incorrectly access a null array. Bug: 18548887 Change-Id: If53c6ade3588b82a480d6674dfbd5caa2e5069fd
|
277ccbd200ea43590dfc06a93ae184a765327ad0 |
|
04-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: More warnings Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
|
575e78c41ece0dec969d31f46be563d4eb7ae43b |
|
04-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: Replace COMPILE_ASSERT with static_assert (runtime) Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
|
1d0611c7e6721bd9115d652da74d2584ff3f192b |
|
01-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: Add miranda checking Add a test for resolution of miranda methods across dex-files. See CL 112688 and b/18193682 for the code change. Fix the test script to support no-verify again. Weaken the dex cache check to a check whether the found method is a miranda method. This will penalize miranda methods, as they will always have to be resolved by name, but does not require the multi-step load of the method's dex cache. Bug: 18193682 (cherry picked from commit 2b0fa5ba4a8f07ee243452003bf93418d30e9448) Change-Id: I1dae2a9ec0985dc8625acd7dd5686a5d3cdc8888
|
2b0fa5ba4a8f07ee243452003bf93418d30e9448 |
|
01-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: Add miranda checking Add a test for resolution of miranda methods across dex-files. See CL 112688 and b/18193682 for the code change. Fix the test script to support no-verify again. Weaken the dex cache check to a check whether the found method is a miranda method. This will penalize miranda methods, as they will always have to be resolved by name, but does not require the multi-step load of the method's dex cache. Bug: 18193682 Change-Id: I1dae2a9ec0985dc8625acd7dd5686a5d3cdc8888
|
f322c4cb1290a53e3fc4dca4217810484ecc8f20 |
|
31-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Fix FindDeclaredVirtualMethod(DexCache...) for miranda methods If a class in classes.dex implements an interface from classes2.dex, the miranda method will be in the dex cache for classes2.dex, but pointed to by the virtual methods of the class in the dex caches for classes.dex. Therefore the fast path for DexCache::ResolveMethod that searches via class and superclass virtual methods should ensure that any method matching on dex method_idx should be from the same dex cache as the class itself, which is not the case for miranda methods. Bug: 18193682 (cherry picked from commit 9a783d6a0cb437fc0d9ffcc84502912f3d1cb73b) Change-Id: Ia44f72c2ed2701e48153d14d2c5ca4ccc4959b30
|
9a783d6a0cb437fc0d9ffcc84502912f3d1cb73b |
|
31-Oct-2014 |
Brian Carlstrom <bdc@google.com> |
Fix FindDeclaredVirtualMethod(DexCache...) for miranda methods If a class in classes.dex implements an interface from classes2.dex, the miranda method will be in the dex cache for classes2.dex, but pointed to by the virtual methods of the class in the dex caches for classes.dex. Therefore the fast path for DexCache::ResolveMethod that searches via class and superclass virtual methods should ensure that any method matching on dex method_idx should be from the same dex cache as the class itself, which is not the case for miranda methods. Bug: 18193682 Change-Id: I10da4f5472e929b3dc0be58051a726a4bc14e438
|
2d2621a1463d2f3f03fa73503fa42e43657cdcfc |
|
24-Oct-2014 |
Mathieu Chartier <mathieuc@google.com> |
Optimize method linking 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
|
1fb463e42cf1d67595cff66d19c0f99e3046f4c4 |
|
24-Oct-2014 |
Mathieu Chartier <mathieuc@google.com> |
Optimize method linking 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 Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
|
cdc1aaffabbdf417d29b203b2cd2763ed2d623f8 |
|
09-Oct-2014 |
Ian Rogers <irogers@google.com> |
Simplify instance reference offsets. Don't encode Object's class. Use trailing rather than leading zeroes to give offset position. Change-Id: I1ae74e7a01f63696429644adf81cdf6ee58832fe
|
6b604a1b0289e5e7211c2e5f8c4f395f51de7c3d |
|
26-Sep-2014 |
Ian Rogers <irogers@google.com> |
Fix Class::IsInSamePackage to not read beyond the end of a StringPiece. Fix length of string piece to be size_type rather than int because expecting negatively sized strings is a bad idea and we should use unsigned types to defensively guard against mistakes. Remove max_size and capacity since the return type is inconsistent between Google and the STL, and we don't need the functions. Add a bound check in libartd to operator[] accesses. Change-Id: I1b87a03d8fbd95e7dbb106745e304d1083898075
|
5a4b8a236030460651a3136397d23ca6744e7eb7 |
|
11-Sep-2014 |
Andreas Gampe <agampe@google.com> |
ART: Rename Handle hierarchy Bring the names in line with normal OO principles: ConstHandle becomes Handle, and Handle becomes MutableHandle. Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
|
faff0f05fef90577c9744505555675185832aacd |
|
10-Sep-2014 |
Mingyao Yang <mingyao@google.com> |
Remove reference_static_offsets used for iterating through class static fields. Since static fields are contiguous in class object and there is no need to traverse super classes, it's not meaningful to use reference_static_offsets. Also especially with embedded vtable/imt, static field offset can't be encoded with an unsigned integer anyway. A corresponding change is made to Class.java to remove the member field. Bug: 16236588 Change-Id: I1fde3cd9efce884945876f0658c63d992164fd94
|
bf99f77dda749e2b653e8c45259b1fb56e7bb012 |
|
24-Aug-2014 |
Mathieu Chartier <mathieuc@google.com> |
Clean up Handle usage. Prefer using ConstHandle instead of Handle as function arguments since you can't assign new references to ConstHandle which helps prevent bugs. Changed NullHandle to be a ConstHandle so that you can never modify it to be a non null reference. Change-Id: I81cb979f6f8d5b49e5614966a2caf28c3701dd4f
|
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
|
e19f2b00eebd61e73761ab531866654f08968711 |
|
16-Jul-2014 |
Mingyao Yang <mingyao@google.com> |
Set vtable in class object to null after linking. This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. (cherry picked from commit 2cdbad7c62f126581ec5177104de961c4d71adaa) Change-Id: I6acdcd1ee560d387fb77c55c58bbe3598c197ba1
|
94f7b49578b6aaa80de8ffed230648d601393905 |
|
23-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add GcRoot to clean up and enforce read barriers. Introduce a value-type wrapper around Object* for GC roots so that 1) we won't have to directly add the read barrier code in many places and 2) we can avoid accidentally bypassing/missing read barriers on GC roots (the GcRoot interface ensures that the read barrier is executed on a read). The jdwp test passed. Bug: 12687968 Change-Id: Ib167c7c325b3c7e3900133578815f04d219972a1
|
2cdbad7c62f126581ec5177104de961c4d71adaa |
|
16-Jul-2014 |
Mingyao Yang <mingyao@google.com> |
Set vtable in class object to null after linking. This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. Change-Id: I307696657d1e283654169dbecb8f7815c42bbabc
|
0fbd6e6ec3241b7163b95f9f001bfe9b08f8b200 |
|
18-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix two read barrier bugs introduced in CL 97882. Bug: 12687968 Change-Id: Ib28da4c33977cc58b09913ef5b738dec75365714
|
22d5e735f403c57525fe868304c7123f0ce66399 |
|
16-Jul-2014 |
Ian Rogers <irogers@google.com> |
Remove object_utils.h. Break into object_lock, field_helper and method_helper. Clean up header files following this. Also tidy some of the Handle code in response to compiler errors when resolving the changes in this CL. Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
|
59fe711f88191cd8ca1a386c4fa0d2f9e484af50 |
|
14-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix infinite loop when calling SetStatus after OOM. There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 (cherry picked from commit fd22d5bada15d95b5ea8ab5a4dda39077e1a54ee) Change-Id: Ie291eb0f52ba9c63f24591fae691dd9f393e6ccb
|
fd22d5bada15d95b5ea8ab5a4dda39077e1a54ee |
|
14-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix infinite loop when calling SetStatus after OOM. There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 Change-Id: I5c1e638a03ddf700ab4e9cad9a3077d2b1b26c43
|
98d1cc8033251c93786e2fa8c59a2e555a9493be |
|
16-May-2014 |
Mingyao Yang <mingyao@google.com> |
Improve performance of invokevirtual/invokeinterface with embedded imt/vtable Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
|
4f1ebc2b86c8467d1ecb3ec655316e6d7ee8b8b5 |
|
25-Jun-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add read barriers to the constant roots. This change makes it possible to concurrently scan the constant roots (the roots visited by Runtime::VisitConstantRoots()) such as the class of java.lang.Class by adding read barriers. Bug: 12687968 Change-Id: If1afea471c4e1093688d2db37b7f1fc2742edeef
|
004644fe87046b965442b1ee1008b7206817d187 |
|
18-Jun-2014 |
Brian Carlstrom <bdc@google.com> |
Fix GetMethodID to find an interface method from a super-interface Bug: 15651032 Change-Id: I5df113e9489a1615e901f03bed92ed2a1a42bd67
|
7048ae42d2b02d62110e297221460cacf1f6db73 |
|
02-Jun-2014 |
Ian Rogers <irogers@google.com> |
Make class status volatile. Discourage loads and stores from reordering around the status being updated. Bug: 15347354 (cherry-picked from 03dbc04d1d5a3bd62801989b16e994a9ed0dafb5) Change-Id: I29a4144bd3a145017831540ce1130da5401e39c0
|
9f1020305292a21fd14a402b189c765a125226ab |
|
23-May-2014 |
Sebastien Hertz <shertz@google.com> |
Fix exception reporting from interpreter To comply with JDWP exception report rules, we must report an exception at the location of the throw (or the first instruction encountered after a native call). To do this, we use the CatchLocationFinder visitor to look for a catch handler until we reach a native frame or the top frame. Because interpreter handles pending exception on a method-by-method basis, we need a flag to remember we already reported the exception and avoid reporting it multiple times when unwinding methods. The drawback is we need to maintain the state of this flag. We clear it when the exception is cleared. In the case we temporarily clear the exception (when finding a catch handler for instance), we restore the flag to its previous value at the same time we restore the pending exception. Bump oat version to force recompilation because we modify Thread offsets. Bug: 14402770 Change-Id: Ic059c58f80b2023b118038301f8f0a24f1e18241
|
bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe |
|
22-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change MethodHelper to use a Handle. Added ConstHandle to help prevent errors where you modify the value stored in the handle of the caller. Also fixed compaction bugs related to not knowing MethodHelper::GetReturnType can resolve types. This bug was present in interpreter RETURN_OBJECT. Bug: 13077697 Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
|
61c5ebc6aee2cac1c363de6fbdac25ada1697fdb |
|
06-Jun-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change FieldHelper to use a handle. 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
|
4206eb5d86d3a2406361e59b2018152b2485cced |
|
05-Jun-2014 |
Sebastien Hertz <shertz@google.com> |
Fix crash in JDWP ReferenceType.SourceFile command Updates Dbg::GetSourceFile to return ABSENT_INFORMATION error code when Class::GetSourceFile returns nullptr. This happens if the class has no source file information. Updates Class:GetSourceFile to return nullptr for classes which have no ClassDef item like generated classes. This allows to remove the IsProxyClass test from Dbg::GetSourceFile. Adds this test in proxy_test. Bug: 15426710 Change-Id: I019da4ced83778d5264484c43b225f8b5c95632e
|
03dbc04d1d5a3bd62801989b16e994a9ed0dafb5 |
|
02-Jun-2014 |
Ian Rogers <irogers@google.com> |
Make class status volatile. Discourage loads and stores from reordering around the status being updated. Bug: 15347354 Change-Id: Ice805cb834617747c8209e98a142d3e5c7585719
|
f832284dd847ff077577bb5712225430bbbb3b67 |
|
16-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Delete ClassHelper and fix compaction bug in GetDirectInterface 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
|
eb8167a4f4d27fce0530f6724ab8032610cd146b |
|
08-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add Handle/HandleScope and delete SirtRef. Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
|
25023c744c4388a6459b21cc3babf8c602b024a2 |
|
09-May-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Make it possible to disable read barriers in Class::GetObjectSize() This is a leftover from cl/91831 (commit 9103c86a98524e9ddfd14f8cee56e919f68eee9b) that attempted to make it possible to disable read barriers in Object::SizeOf(). Bug: 12687968 Change-Id: I2b05076832936881ec61bc21b6eb6b7c04e0a1f0
|
8194963098247be6bca9cc4a54dbfa65c73e8ccc |
|
02-May-2014 |
Vladimir Marko <vmarko@google.com> |
Replace CountOneBits and __builtin_popcount with POPCOUNT. Clean up utils.h, make some functions constexpr. Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
|
b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf |
|
29-Apr-2014 |
Ian Rogers <irogers@google.com> |
Force inlining on trivial accessors. Make volatility for GetFieldObject a template parameter. Move some trivial mirror::String routines to a -inl.h. Bug: 14285442 Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
|
9103c86a98524e9ddfd14f8cee56e919f68eee9b |
|
22-Apr-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
More code for the read barrier support. Make it possible to disable the RB in Object::SizeOf() (and the functions it calls transitively) which the collector will need to call to get the size of an object when copying. Add Object::AtomicSetReadBarrierPointer() for atomic write of a RB pointer. Bug: 12687968 Change-Id: Ibedd252860ac7ccd17e4e7d71b377a8892b48ff0
|
9837939678bb5dcba178e5fb00ed59b5d14c8d9b |
|
25-Feb-2014 |
Ian Rogers <irogers@google.com> |
Avoid std::string allocations for finding an array class. Introduce ClassLinker::FindArrayClass which performs an array class lookup given the element/component class. This has a 16 element cache of recently looked up arrays. Pass the current thread to ClassLinker Find .. Class routines to avoid calls to Thread::Current(). Avoid some uses of FindClass in the debugger where WellKnownClasses is a faster and more compacting GC friendly alternative. Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
|
815873ecc312b1d231acce71e1a16f42cdaf09f2 |
|
14-Feb-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change root visitor to use Object**. Simplifies code and improves the performance of root visiting since we usually don't need to check to see if the object moved. Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
|
d2fe10a3a34af171bf1631219cd2d6ff6b7778b5 |
|
15-Jan-2014 |
Sebastien Hertz <shertz@google.com> |
Remove blacklist Removes the class initialization blacklist and use transaction to detect and revert class initialization attempting to invoke native method. This only concerns class initialization happening at compilation time when generating an image (like boot.art for the system). In transactional mode, we log every object's field assignment and array update. Therefore we're able to abort a transaction to restore values of fields and array as they were before the transaction starts. We also log changes to the intern string table so we can restore its state prior to transaction start. Since transactional mode only happens at compilation time, we don't need to log all these changes at runtime. In order to reduce the overhead of testing if transactional mode is on/off, we templatize interfaces of mirror::Object and mirror::Array, respectively responsible for setting a field and setting an array element. For various reasons, we skip some specific fields from transaction: - Object's class and array's length must remain unchanged so garbage collector can compute object's size. - Immutable fields only set during class loading: list of fields, method, dex caches, vtables, ... as all classes have been loaded and verified before a transaction occurs. - Object's monitor for performance reason. Before generating the image, we browse the heap to collect objects that need to be written into it. Since the heap may still holds references to unreachable objects due to aborted transactions, we trigger one collection at the end of the class preinitialization phase. Since the transaction is held by the runtime and all compilation threads share the same runtime, we need to ensure only one compilation thread has exclusive access to the runtime. To workaround this issue, we force class initialization phase to run with only one thread. Note this is only done when generating image so application compilation is not impacted. This issue will be addressed in a separate CL. Bug: 9676614 Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
|
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
|
ef7d42fca18c16fbaf103822ad16f23246e2905d |
|
06-Jan-2014 |
Ian Rogers <irogers@google.com> |
Object model changes to support 64bit. Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
|
692fafd9778141fa6ef0048c9569abd7ee0253bf |
|
30-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Thread local bump pointer allocator. Added a thread local allocator to the heap, each thread has three pointers which specify the thread local buffer: start, cur, and end. When the remaining space in the thread local buffer isn't large enough for the allocation, the allocator allocates a new thread local buffer using the bump pointer allocator. The bump pointer space had to be modified to accomodate thread local buffers. These buffers are called "blocks", where a block is a buffer which contains a set of adjacent objects. Blocks aren't necessarily full and may have wasted memory towards the end. Blocks have an 8 byte header which specifies their size and is required for traversing bump pointer spaces. Memory usage is in between full bump pointer and ROSAlloc since madvised memory limits wasted ram to an average of 1/2 page per block. Added a runtime option -XX:UseTLAB which specifies whether or not to use the thread local allocator. Its a NOP if the garbage collector is not the semispace collector. TODO: Smarter block accounting to prevent us reading objects until we either hit the end of the block or GetClass() == null which signifies that the block isn't 100% full. This would provide a slight speedup to BumpPointerSpace::Walk. Timings: -XX:HeapMinFree=4m -XX:HeapMaxFree=8m -Xmx48m ritzperf memalloc: Dalvik -Xgc:concurrent: 11678 Dalvik -Xgc:noconcurrent: 6697 -Xgc:MS: 5978 -Xgc:SS: 4271 -Xgc:CMS: 4150 -Xgc:SS -XX:UseTLAB: 3255 Bug: 9986565 Bug: 12042213 Change-Id: Ib7e1d4b199a8199f3b1de94b0a7b6e1730689cad
|
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
|
590fee9e8972f872301c2d16a575d579ee564bee |
|
13-Sep-2013 |
Mathieu Chartier <mathieuc@google.com> |
Compacting collector. The compacting collector is currently similar to semispace. It works by copying objects back and forth between two bump pointer spaces. There are types of objects which are "non-movable" due to current runtime limitations. These are Classes, Methods, and Fields. Bump pointer spaces are a new type of continuous alloc space which have no lock in the allocation code path. When you allocate from these it uses atomic operations to increase an index. Traversing the objects in the bump pointer space relies on Object::SizeOf matching the allocated size exactly. Runtime changes: JNI::GetArrayElements returns copies objects if you attempt to get the backing data of a movable array. For GetArrayElementsCritical, we return direct backing storage for any types of arrays, but temporarily disable the GC until the critical region is completed. Added a new runtime call called VisitObjects, this is used in place of the old pattern which was flushing the allocation stack and walking the bitmaps. Changed image writer to be compaction safe and use object monitor word for forwarding addresses. Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc.. TODO: Enable switching allocators, compacting on background, etc.. Bug: 8981901 Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
|
dfb325e0ddd746cd8f7c2e3723b3a573eb7cc111 |
|
30-Oct-2013 |
Ian Rogers <irogers@google.com> |
Don't use UTF16 length as length for MUTF8. Bug 11367555. Change-Id: Ia0b07072a1a49d435c3b71ed9a668b316b7ff5d8
|
1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 |
|
19-Oct-2013 |
Ian Rogers <irogers@google.com> |
Fast JNI support. Use a modifier to signal a native method is a fast JNI method. If the modifier is set then don't perform runnable transitions. Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
|
241b5de2d3cf06868ac31f1153aa0b32ddb07b20 |
|
10-Oct-2013 |
Ian Rogers <irogers@google.com> |
Clinits may not have the kAccConstructor flag. Bug: 11157540 Set the clinit access flag when we load the method and warn about badly formed access flags. Change-Id: I515c692095051f84f98510722ab764591185918e
|
d9c4fc94fa618617f94e1de9af5f034549100753 |
|
02-Oct-2013 |
Ian Rogers <irogers@google.com> |
Inflate contended lock word by suspending owner. Bug 6961405. Don't inflate monitors for Notify and NotifyAll. Tidy lock word, handle recursive lock case alongside unlocked case and move assembly out of line (except for ARM quick). Also handle null in out-of-line assembly as the test is quick and the enter/exit code is already a safepoint. To gain ownership of a monitor on behalf of another thread, monitor contenders must not hold the monitor_lock_, so they wait on a condition variable. Reduce size of per mutex contention log. Be consistent in calling thin lock thread ids just thread ids. Fix potential thread death races caused by the use of FindThreadByThreadId, make it invariant that returned threads are either self or suspended now. Code size reduction on ARM boot.oat 0.2%. Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%, nexus 4 speedup 2.09% on DeltaBlue. Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
|
d91d6d6a80748f277fd938a412211e5af28913b1 |
|
26-Sep-2013 |
Ian Rogers <irogers@google.com> |
Introduce Signature type to avoid string comparisons. Method resolution currently creates strings to then compare with strings formed from methods in other dex files. The temporary strings are purely created for the sake of comparisons. This change creates a new Signature type that represents a method signature but not as a string. This type supports comparisons and so can be used when searching for methods in resolution. With this change malloc is no longer the hottest method during dex2oat (now its memset) and allocations during verification have been reduced. The verifier is commonly what is populating the dex cache for methods and fields not declared in the dex file itself. Change-Id: I5ef0542823fbcae868aaa4a2457e8da7df0e9dae
|
fc0e94bed3f88ed7e50854fd8dfaf5dcb345250f |
|
24-Sep-2013 |
Ian Rogers <irogers@google.com> |
StringPiece clean up. Profile guided clean up. Try to avoid creating StringPieces with the contents of a dex file where the length is known. Try to avoid RegTypeCache::FromDescriptor when there's a class available. Make ConstantType::ConstantValue inlinable. Saving of about 50ms from a 2 threaded ThinkFree compile on host. Change-Id: I47a12c3c76f46e2c9805be1c3a3e3870fe1f5d85
|
ee39a10e45a6a0880e8b829525c40d6055818560 |
|
19-Sep-2013 |
Ian Rogers <irogers@google.com> |
Use class def index from java.lang.Class. Bug: 10244719 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
|
8b2c0b9abc3f520495f4387ea040132ba85cae69 |
|
19-Sep-2013 |
Ian Rogers <irogers@google.com> |
Use class def index from java.lang.Class. Bug: 10244719 Depends on: https://googleplex-android-review.git.corp.google.com/362363 This removes the computation of the dex file index, when necessary this is computed by searching the dex file. Its only necessary in dalvik.system.DexFile.defineClassNative and DexFile::FindInClassPath, the latter not showing up significantly in profiling with this change. Change-Id: I20c73a3b17d86286428ab0fd21bc13f51f36c85c
|
967a0adf8b93a23d2a8fef82e06bd913db94ac19 |
|
11-Sep-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
More allocation code optimizations. - Inline Class::AllocObject() and Array::Alloc(). - Inline some short Mutex functions and add LIKELY/UNLIKELY to some Mutex functions. - This change improves the Ritz MemAllocTest by ~6% on Nexus 4 and ~10% on host. Bug: 9986565 Change-Id: I1606c74ddb21676cbc1de1a40e9b076fc23eaea4
|
7dfb28c066159e6cde8181720f0c451a700ef966 |
|
22-Aug-2013 |
Ian Rogers <irogers@google.com> |
Don't scan image space when starting runtime. Bug 10432288. Find Classes and Strings from dex caches lazily rather than when the image is loaded. Make class status changes do notifies when there can be waiters. For Class lookup there's a pathology if we always search dex caches and so after 1000 failures move all classes into the class table. Be consistent in using "const char*" for class linker descriptors as this most easily agrees with the type in the dex file. Improve the intern run-test so that it has a case of a literal contained in the image. Modify image_test to allow any valid lock word rather than expecting 0, ideally we wouldn't see inflated monitors but we do due to NotifyAll (see bug 6961405). Change-Id: Ia9bfa748eeccb9b4498784b97c6823141b1f6db8
|
8f3c9ae38df2460940a26dff889a84430b6c38d3 |
|
21-Aug-2013 |
Ian Rogers <irogers@google.com> |
Don't allow class status to go backward except for error. Allow greater parallelism of initialization. Bug 10393546. Change-Id: Ic194ed490bb0a986250c09fcf335eb1be9714657
|
ea46f950e7a51585db293cd7f047de190a482414 |
|
30-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Refactor java.lang.reflect implementation Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
|
0cd7ec2dcd8d7ba30bf3ca420b40dac52849876c |
|
18-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Fix cpplint whitespace/blank_line issues Change-Id: Ice937e95e23dd622c17054551d4ae4cebd0ef8a2
|
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
|