summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ART: Fix wrong hard-failure handling in verifierAndreas Gampe2015-05-274-11/+41
| | | | | | | | | Correctly return null for the method when a hard failure is encountered. Also improve logging for order failures. Add a regression test. Bug: 20224106 Change-Id: I6e08202617147378b204af169308b67fc69f92c6
* JDWP: fix breakpoint on catch statementSebastien Hertz2015-05-261-0/+20
| | | | | | | | | | | | | | | | | | | Setting a breakpoint on a catch statement in the source actually installs the breakpoint on a DEX move-exception instruction. At this point, an exception is pending in the current thread. The issue is no exception must be pending in the current thread to report the breakpoint event. This is required to be able to call JNI functions to create JDWP ids. This CL fixes it by clearing the pending exception before reporting event and restore it after reporting the event. Bug: 21382373 (cherry picked from commit de48aa6708a3d5dacf7db3d64965e23261fb15d3) Change-Id: Ie107eb47b6f2559c4fa5297f4033e07baad06f38
* Merge "Fix for potential moving GC bugs around proxy class." into mnc-devHiroshi Yamauchi2015-05-224-67/+81
|\
| * Fix for potential moving GC bugs around proxy class.Hiroshi Yamauchi2015-05-224-67/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Handlerize proxy_class which is live across multiple allocation points in ClassLinker::CreateProxyClass(). - In ClassLinker::CreateProxyClass(), insert a proxy class into the class table before creating ArtFields for it (and update it later in LinkClass()) because the field roots (ArtField::declaring_class_) won't be updated by GC unless the class is in the class table. If GC happens before they are updated by FixupTemporaryDeclaringClass() from LinkClass(), FixupTemporaryDeclaringClass() may not update the field roots correctly because the old class may already be moved but the fields roots may not. Reduce a window of time where the fields roots could be stale. - In ClassLinker::LinkClass(), directly wrap a new class in a handle to avoid a window of time where new_class may be potentially stale. - Print more diagnostic info about the holder of the field upon a mark sweep invalid ref crash. - Add an additional sanity check in Field::GetArtField(). Bug: 20557050 Change-Id: I9ad32d304922da96b7e1fad262d97de21cbac776
* | Merge "ART: Sometimes even empty methods take forever to verify" into mnc-devAndreas Gampe2015-05-211-0/+4
|\ \
| * | ART: Sometimes even empty methods take forever to verifyAndreas Gampe2015-05-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases of very high load and/or bad scheduling, the verifier may take longer than the threshold duration to verify an empty method. The LargeMethod detection needs to accept that the code_item may be null. Bug: 21364300 Change-Id: Iceff3e4688cc1a5fe7a836f7a9bf6c49a392b618
* | | Merge "Revert "DO NOT MERGE ART: Turn off duplicate-classes checking"" into ↵Andreas Gampe2015-05-212-12/+0
|\ \ \ | |/ / |/| | | | | mnc-dev
| * | Revert "DO NOT MERGE ART: Turn off duplicate-classes checking"Andreas Gampe2015-05-212-12/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit aafcfca5fe545365ef377fff2897b8a908f03e71. Bug: 21333911 Change-Id: Ibbc6b1be8bebc1d0ab9c5955b34eb89f40577baa
* | | ART: Refactor UnstartedRuntime for testingAndreas Gampe2015-05-219-216/+506
| |/ |/| | | | | | | | | | | | | | | | | | | | | Expose the UnstartedRuntime implementation functions as private static methods of a class. Add a gtest that can invoke these functions. Add sample tests for String and Memory. Bug: 21173514 (cherry picked from commit 799681b176ad25437ce2849639f54f610dcbf684) Change-Id: Ib5bde6347fafaf7607c642542ea7d5938ff4b1df
* | Merge "DO NOT MERGE ART: Turn off duplicate-classes checking" into mnc-devAndreas Gampe2015-05-212-0/+12
|\ \ | |/
| * DO NOT MERGE ART: Turn off duplicate-classes checkingAndreas Gampe2015-05-202-0/+12
| | | | | | | | | | Bug: 21333911 Change-Id: I9832526a6d2996aadb459e3ec0930cbaf151478a
* | Merge "Intercept JNI invocation of String.<init> methods." into mnc-devJeff Hao2015-05-2111-99/+238
|\ \
| * | Intercept JNI invocation of String.<init> methods.Jeff Hao2015-05-2011-99/+238
| |/ | | | | | | | | | | | | | | | | | | | | libmono uses JNI AllocObject and CallNonvirtualVoidMethod to create and initialize a string instead of using the recommended NewObject. This change adds an intercept to change the String.<init> call to a StringFactory call instead. Then, it uses the object id of the original string object referrer and maps it to the result of the StringFactory. Bug: 21288130 Change-Id: Ib4db402c178bc37188d5c5faf30b6e4fdc747b17
* | Merge "ART: Fix RegisterNative order" into mnc-devAndreas Gampe2015-05-2110-4/+234
|\ \
| * | ART: Fix RegisterNative orderAndreas Gampe2015-05-2010-4/+234
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First check for both direct and virtual methods in the current class, then move to the parent. Optimize registration by checking first whether the current method under test is native. This slows down registering implementations in parent classes. Add a CheckJNI warning for this. Add a run-test to check the behavior. Fix host comparison testing. Bug: 19569721 (cherry picked from commit 3f1dc56914177993b1b018bf21ce7d39d7feecda) Change-Id: I61e77117d96310632aad123d7f1279d0f834dc99
* | ART: Fix gtest dependencyAndreas Gampe2015-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | Gtests should depend on the debug version of libart-disassembler. Bug: 21273194 (cherry picked from commit 0ae3bf872d3898ed6826216f3f8a04c819e1426b) Change-Id: Iaf216a1c0cff650296ebf83fe4e8352f5614cb28
* | Merge "Fix a cts crash around proxy class fields." into mnc-devHiroshi Yamauchi2015-05-203-10/+80
|\ \ | |/ |/|
| * Fix a cts crash around proxy class fields.Hiroshi Yamauchi2015-05-203-10/+80
| | | | | | | | | | | | | | | | | | | | | | | | org.apache.harmony.tests.java.io.SerializationStressTest4#test_writeObject_Proxy As the static fields of proxy classes share the dex file indices, they shouldn't be resolved in the dex cache or else Field::GetArtField() may return a wrong art field that belong to a different proxy class. Bug: 20557050 Change-Id: If672c0e67bc49e672e34d75ffbe29c65f5a423b9
* | Merge "Fix debuggable compiler flag detection for secondary dex files" into ↵Sebastien Hertz2015-05-2010-21/+79
|\ \ | | | | | | | | | mnc-dev
| * | Fix debuggable compiler flag detection for secondary dex filesSebastien Hertz2015-05-1910-21/+79
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiles secondary dex files like the primary dex file: if it has been compiled with the --debuggable flag, compile secondary dex files with the --debuggable flag too. Therefore, dex files loaded at runtime are compiled the same way as dex files compiled at install time on the classpath (excluding the boot image that is not compiled debuggable). Also adds debuggable key in the oat header and bump the oat version. Bug: 20944228 (cherry picked from commit 0de1133ba600f299b3d67938f650720d9f859eb2) Change-Id: If6b2236e7fe547cc421f57b573043748018d3ae0
* | ART: Change huge-method warning in verifierAndreas Gampe2015-05-191-5/+9
|/ | | | | | | | | | | | Change the logging to be included in the took-a-long-time warning, instead of being a non-descriptive standalone. This should reduce the noise. Bug: 21149450 (cherry picked from commit a4f5bf6ea99d6b3095a4ca261352729633bc44c5) Change-Id: Ia4493dd12f54a8452a46541f6da86530584016ea
* Merge "Test and fix bug checking status of secondary multidex files." into ↵Richard Uhler2015-05-188-7/+96
|\ | | | | | | mnc-dev
| * Test and fix bug checking status of secondary multidex files.Richard Uhler2015-05-188-7/+96
| | | | | | | | | | | | | | | | | | We were accidentally returning 'false' instead of 'true' to indicate a native multidex file with an up-to-date primary dex file checksum but out-of-date secondary dex file checksum is out of date. Bug: 21022815 Change-Id: I43d360ca9251d0df38ad7f8289f6ef339c0a3280
* | JDWP: more GC safetySebastien Hertz2015-05-185-56/+103
| | | | | | | | | | | | | | | | | | | | | | | | Ensures GC safety when keeping references that may be moved by GC: - SingleStepControl: stores ArtMethod* in a GcRoot - ModBasket: stores references in a StackHandleScope Bug: 18166750 (cherry picked from commit 261bc044a3575512869586593e99e97cd8b1c321) Change-Id: I35971a901537956739d1f089d61cb4ea9dc6c93d
* | Merge "Undo arm64 workaround." into mnc-devChih-Hung Hsieh2015-05-151-4/+0
|\ \
| * | Undo arm64 workaround.Chih-Hung Hsieh2015-05-151-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now we have new llvm to compile art for arm64 without -fno-vectorize. BUG: 21080674 Change-Id: Id1b3a88ab9d4cf78b7f0dfd8cb435ed6e7ab7cb2 (cherry picked from commit b6cee946d44dc1e961c9656830b567e38104f896)
* | | Merge "Print more info on mark sweep invalid ref crash." into mnc-devHiroshi Yamauchi2015-05-151-6/+39
|\ \ \
| * | | Print more info on mark sweep invalid ref crash.Hiroshi Yamauchi2015-05-151-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add extra info about the field holder. - Suspend threads when verifying roots. Bug: 20557050 Change-Id: Ia1f2269aaa3b1a81d0594e781e439a5decfb82f9
* | | | Add new style String operations during compilation init, part 2Kenny Root2015-05-151-0/+60
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows some class initializers that deal with Strings to run during compilation. However, java.lang.Character.toUpperCase() is blocking initialization for some parts. (cherry picked from commit 57f91e8956f4496391bff028a1b990540cc91c22) Bug: 21036900 Change-Id: Ia969c6a643f510bc798f94fb10bca1a68fe2ae67
* | | Stop wrapping close(2) with TEMP_FAILURE_RETRY in art.Elliott Hughes2015-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that all the TEMP_FAILURE_RETRY([A-Z] calls in this file are wrong. The member functions return -errno, so only an EPERM failure will return -1 (but errno should be EPERM, so you won't loop). Bug: http://b/20501816 Change-Id: Ibde6a2c7bf92469d008d6d510f9391669ae37a84 (cherry picked from commit 6a887d6a1d1ca089b48663a5ae11f973b98785a9)
* | | Merge "In hprof, use an address within string for char array of empty ↵Jeff Hao2015-05-151-2/+9
|\ \ \ | | | | | | | | | | | | string." into mnc-dev
| * | | In hprof, use an address within string for char array of empty string.Jeff Hao2015-05-141-2/+9
| | | | | | | | | | | | | | | | | | | | Bug: 21089461 Change-Id: I203345caf74fba2e9bf0549256147d84d1bb829e
* | | | Merge changes I2ea008b7,Ibd7a643d into mnc-devKenny Root2015-05-152-6/+73
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | * changes: Add new style String operations during compilation init Fix non-range String init calls
| * | | Add new style String operations during compilation initKenny Root2015-05-151-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows some class initializers that deal with Strings to run during compilation. This includes the current implementation of java.security.Security because it reads the "java.security" resource. Bug: 21036900 Change-Id: I2ea008b774d4ed359e155318e0d06c1566186c34
| * | | Fix non-range String init callsKenny Root2015-05-151-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the String constructor was called via invoke-direct, it is changed to the new StringFactory which is static. That means that the args need to be shifted by one to deal with the change from non-static to static. However, the non-range version of the invoke-direct was not shifted correctly causing unstarted runtime initialization to get the wrong first_dest_reg argument. Bug: 21036900 Change-Id: Ibd7a643d877514ea396d7e4ab0dea327207cb78f
* | | | Remove doublequoted command to adb sh -c.Hiroshi Yamauchi2015-05-141-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | (cherry pick commit 0a4c61db049f7ddcd9cbebb54e67a1285d621da9) Change-Id: I0e0fceedf927df25b8d6b0cf235f43f928cb3534
* | | | Merge "In hprof, set string class instance size to that of an empty string." ↵Jeff Hao2015-05-141-1/+5
|\ \ \ \ | | | | | | | | | | | | | | | into mnc-dev
| * | | | In hprof, set string class instance size to that of an empty string.Jeff Hao2015-05-141-1/+5
| |/ / / | | | | | | | | | | | | | | | | Bug: 21066704 Change-Id: Ic52193f5801117ca642055ea700fc4bc21b690e8
* | | | Print field info on mark sweep invalid ref crash.Hiroshi Yamauchi2015-05-147-9/+46
| |_|/ |/| | | | | | | | | | | | | | | | | (cherry pick commit eb2baaf20d9059c0fc38141780ec05bea0486c40) Bug: 20557050 Change-Id: I3abb7a44e3b7ed3256653824fd1705aac5f7d72c
* | | Quick: Fix marking high words in DCE.Vladimir Marko2015-05-142-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL properly fixes the high word marking and reverts https://android-review.googlesource.com/150352 which was just covering up the underlying issue. A unit test for the encountered issue is provided, though it does not expose the deficiency in the cover-up CL. Bug: 20640451 (cherry picked from commit 9cacef6e811940c2f21e7e54055379a2c43f0d06) Change-Id: I4c4ca82fe4b2e34feb38090d88a5d5c754914f89
* | | ART: Do not relocate app program headers in patchoat.Vladimir Marko2015-05-147-27/+57
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the check whether to relocate program headers in patchoat to simply look whether there is a PT_LOAD section with p_vaddr == 0. If there is, don't relocate the headers, it should be an app. Otherwise, it's a boot image and needs to be relocated. Add overflow checking to ElfFileImpl<>::GetLoadedSize(). Bug: 21047854 (cherry picked from commit 3fc9903407c6e89ffbbc92ded9e272d9de58e9b6) Change-Id: Ib3e1295fc06993bcfbaadd8f253ee4f5498f52e9
* | Also print class for NoSuchFieldExceptionMathieu Chartier2015-05-134-4/+27
| | | | | | | | | | | | | | | | | | | | | | Example message: Caused by: java.lang.NoSuchFieldException: No field value in class Ljava/lang/String; Added test. Bug: 20881251 Change-Id: I4043cbf26c3077952b6c151da0d0edd980da26b1
* | ART: Rediscover loops after deleting blocks in DCEDavid Brazdil2015-05-1310-32/+374
| | | | | | | | | | | | | | | | | | The way DCE currently updates loop information does not cover all cases. This patch removes the logic, resets loop information of live blocks to pre-SSA state and reanalyzes the affected loops. Change-Id: I0b996a70235b95a8db0de9a23a03f71db57a21b8 (cherry picked from commit a4b8c21dae70ae34aee13628632c39a675c06022)
* | Merge "ART: arm indexOf intrinsics for the optimizing compiler" into mnc-devAndreas Gampe2015-05-123-4/+176
|\ \
| * | ART: arm indexOf intrinsics for the optimizing compilerAndreas Gampe2015-05-123-4/+176
| |/ | | | | | | | | | | | | | | | | | | | | Add intrinsics implementations for indexOf in the optimizing compiler. These are mostly ported from Quick. Bug: 20889065 (cherry picked from commit ba6fdbcb764d5a8972f5ff2d7147e4d78226b347) Change-Id: I18ee849d41187a381f99529669e6f97040aaacf6
* | Merge "Hold heap bitmap lock in Heap::GetObjectsAllocated" into mnc-devMathieu Chartier2015-05-124-2/+14
|\ \
| * | Hold heap bitmap lock in Heap::GetObjectsAllocatedMathieu Chartier2015-05-124-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a race condition where add and remove space could cause a crash when we iterated over the spaces. TODO: Add a spaces lock or something to guard against this. Bug: 21031927 Change-Id: I7f0d558316f8e9d9f22ffd182e8666355bf50d47
* | | Quick: Fix DCE, clear high word flag in RemoveChange().Vladimir Marko2015-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 20640451 (cherry picked from commit ade58e14582c6ab81978e9cfcbbf5e54cc23fe18) Change-Id: I8ac7fea3d9d2a434ee79fb917e68a4dc96e5482f
* | | Merge "Add notes about fast JNI calls." into mnc-devHiroshi Yamauchi2015-05-121-0/+29
|\ \ \
| * | | Add notes about fast JNI calls.Hiroshi Yamauchi2015-05-121-0/+29
| | |/ | |/| | | | | | | | | | | | | | | | (cherry pick commit 36bce58f01a6b37e4d07ff9544c03a3238be087f) Bug: 19665903 Change-Id: I7cc37ab572d2e9ff86f6388c80a3c453a2bca046