summaryrefslogtreecommitdiffstats
path: root/libart
Commit message (Collapse)AuthorAgeFilesLines
* Make isAssignableFrom not cast iftable entries to class.Jeff Hao2015-07-141-2/+1
| | | | | | | | The cast is unnecessary, and this change speeds up isAssignableFrom by about 5%. Bug: 22409569 Change-Id: I212f0302e007f1bbb6189d6e419db4d0d048b7ed
* Send SIGQUIT when finalizer times outMathieu Chartier2015-06-111-0/+10
| | | | | | | | The motivation is to get a native stack trace of the thread if it is stuck in native code when runing a finalizer. Idea from agampe. Bug: 21060358 Change-Id: I370988e6a0067e1d407c21881c82e49b6adec050
* Add VMRuntime.runFinalizationWithTimeoutMathieu Chartier2015-06-051-0/+25
| | | | | | | Used by native allocations to prevent deadlocks. Bug: 21544853 Change-Id: I57b2f7ae8b74185922eb3c15ba0ab71a4d2348aa
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-014-89/+15
| | | | | | | | Bug: 19264997 (cherry picked from commit c8595cdc1bd25e5ae6c889ed9b3ab14eca68e72b) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
* Removed offset and value from String and added StringFactory.Jeff Hao2015-04-274-380/+1476
| | | | Change-Id: I55314ceb906d0bf7e78545dcd9bc3489a5baf03f
* Move Class.newInstance to nativeMathieu Chartier2015-04-242-34/+1
| | | | | | | Also add benchmark for Class.newInstance. Bug: 20269715 Change-Id: Icd52155ce79a978a4d869855bfdfd7735abd8187
* Merge "Fix hashCode() for the read barrier lock word change."Hiroshi Yamauchi2015-04-241-3/+4
|\
| * Fix hashCode() for the read barrier lock word change.Hiroshi Yamauchi2015-04-231-3/+4
| | | | | | | | | | | | | | | | Mask the low 28 bits of the lock word. Bug: 19355854 Bug: 12687968 Change-Id: Ic6db7e23fa1a98b28564880d78e7c7cc0c8c0bdc
* | Merge "Tidy up Package and classloader comments"Neil Fuller2015-04-241-2/+2
|\ \ | |/ |/|
| * Tidy up Package and classloader commentsNeil Fuller2015-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | After commit 31ae6d22605a0967d722f935bc3a8b868ada4917 Remove a TODO, improve a test and fix a comment. Also fixes a bug in Package demonstrated by the improved test. Bug: 20482259 Change-Id: I6b37413d7004ce85c99bb854e0ec41e5f8588250
* | Move java.nio.Charsets to libcore.util.Narayan Kamath2015-04-221-7/+7
|/ | | | | | | | This isn't public API, and isn't related to NIO. It's only ever used by java.lang.String. bug: 10898787 Change-Id: I4e194406746b88ba7268c2553e467e7e05400b40
* Fix Class.forName(..., ..., null) to pass 068-classloader's testClassForNameBrian Carlstrom2015-04-212-18/+17
| | | | | | | | This caused fallout elsewhere requiring - Package fix to pass 005-annotations - ObjectInputStream fix to pass 093-serialization Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e
* Add missing @hide and fix Constructor + Method changing APIMathieu Chartier2015-04-213-7/+14
| | | | Change-Id: I9f68c96b4ddf7e8c004a3209fcc04fb371fb014a
* Move functionality from ArtMethod into MethodMathieu Chartier2015-04-216-308/+112
| | | | | | Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
* Libcore: Remove getClassLoaderImplAndreas Gampe2015-04-201-18/+1
| | | | | | This is an unnecessary method. Change-Id: I4457ff8491628208312d0ba8b2fa4230a597c5de
* Document behavior of Class.forName with a null ClassLoaderBrian Carlstrom2015-04-201-7/+11
| | | | Change-Id: I65cdec4c0ad15fd4b9ecdf3ef076bb0ac02d9ccc
* Merge "Remove ArtField"Mathieu Chartier2015-04-103-75/+26
|\
| * Remove ArtFieldMathieu Chartier2015-04-103-75/+26
| | | | | | | | | | | | | | | | ArtFields are now handled in native. Java portion of this change: https://android-review.googlesource.com/#/c/145032/ Bug: 19264997 Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
* | Avoid using dex cache array pointers in libart.Vladimir Marko2015-04-104-69/+50
|/ | | | | | | | | | | | | | | | | In preparation for making dex cache arrays native, avoid using them in Java code. This causes a performance regression for our reflection benchmarks. Class_getDeclaredMethod and Class_getMethod take an up to 30% hit, measured using the Quick compiler. We accept this hit at this stage and we will tune the performance after we're done with the larger effort. Companion art/ change: https://android-review.googlesource.com/146068 Bug: 20134538 Change-Id: Ibbef3b50043a1311cd40723ed42e1f1c609b8fc1
* Add dalvik.system.TransactionAbortError classSebastien Hertz2015-04-021-0/+62
| | | | | | | | This class is only used by ART's compiler to abort transaction when initializing image classes ahead-of-time. Bug: 20019689 Change-Id: I60bb9270074ccabb04e14369ebeb755493729a23
* Make ArtField have no functionalityMathieu Chartier2015-03-295-257/+73
| | | | | | | | | | Pre-requisite to making them non java objects. Some other changes to speed up reflection. TODO: Another CL for ArtMethod. Bug: 19264997 Change-Id: I17ca0cf4b9ba853e59f4a6eff3a05d9d90cf23f9
* java.lang.reflect: Use only relevant modifiers when converting to stringSergio Giro2015-03-112-5/+9
| | | | | | | | | Some modifiers not relevant might be used to encode internal information (eg bridge methods) that shouldn't be displayed when converting to string bug: 18488857 Change-Id: Ie82ed513b58083a795549a708197f1db52ffb796
* Libcore: Remove unused constructorAndreas Gampe2015-03-031-5/+1
| | | | Change-Id: I8ca3a450d458d7eba13d8eee1f58fa3d907139b3
* Libcore: Use explicit names for DaemonsAndreas Gampe2015-03-031-1/+26
| | | | | | | | getSimpleName is an expensive operation that needs to check the dex file. Avoid for the standard daemons. Bug: 19498458 Change-Id: I034aceabc9358ac6277b3ff8182df5cde681e66f
* Fix incorrect cache key.You Kim2015-02-261-1/+1
| | | | | | | | getProxyClass(ClassLoader, Class<?>...) would hit a slow path more often than we needed to because we were using interfaceSet (and not interfaceList) as the key. Change-Id: I2a0f81ea401d5adbdb31cc35bf04b3f0492cca8e
* Merge "Add VMRuntime.clampGrowthLimit"Mathieu Chartier2015-01-091-0/+6
|\
| * Add VMRuntime.clampGrowthLimitMathieu Chartier2015-01-081-0/+6
| | | | | | | | | | | | | | | | | | Used to release virtual memory for apps with small heaps according to manifest. Bug: 18387825 Bug: 17131630 Change-Id: I73cf18c80e7ce76bd627e5a9439dec4277c6af2d
* | Make some hidden methods final and more obviously privateNeil Fuller2015-01-072-7/+7
|/ | | | | Bug: https://code.google.com/p/android/issues/detail?id=93714 Change-Id: I986c6af2bf8c54de06c95b2fd0d53709a7c9d573
* Move heap trimming daemon and GC deamon into a single daemonMathieu Chartier2014-12-192-33/+27
| | | | | Bug: 18739541 Change-Id: Icf309cd8981372f24caa7c8b98a2e0591b1d90ea
* Move GC daemon locking logic into heapMathieu Chartier2014-12-152-21/+13
| | | | | | | | Fixes deadlock caused by acquirng the mutator lock while synchronizing on the daemon thread. Bug: 18739541 Change-Id: Ib3ac3788081d3d471195a6e3a8ed163237616a4f
* Only allow one requestGC at a timeMathieu Chartier2014-12-121-0/+6
| | | | | | | | | | | | | | | | | Fixes possible deadlock caused by Thread.getAllStackTraces Thread.getAllStackTraces suspends all of the threads. If one of the threads is a thread which holds the GC daemon lock then we may deadlock when we allocate the stack trace. This happens if we get a concurrent GC request when we are allocating the stack trace elements. To fix the deadlock we now only allow a single thread to requestGC at the same time. Credits: yamauchi, hboehm Bug: 18661622 Change-Id: Ia25598e5daa8ff2dc3aa976148d5ff6afa6960f0
* Move dexCacheStrings from ArtMethod to ArtClassMathieu Chartier2014-11-252-10/+4
| | | | | | | | | | Saves ram. Bug: 17643507 (cherry picked from commit b9a5206b91a656c091e7055ff70e4eed2c76b8b1) Change-Id: Ic446a8466eb877ddf680e1d312ae94df028f9e73
* Delete pointer sized fieldsMathieu Chartier2014-11-181-29/+0
| | | | | | Change-Id: Ia0ad61589542c5ce317b6a5a6bb4ca12d7e6647b (cherry picked from commit 13e57c9c508dea33e9bd5768a3cbd79eb263790e)
* Binary search through ArtFields to match by name.Narayan Kamath2014-11-141-8/+31
| | | | | | | | | | | | | | | | | | | | | Commit bfa3ed0ad988e1da13626ddbaf6dcae0c58ea79e in art preserves the original field order for ArtFields, and they will therefore be sorted by name. For classes with large numbers of static and instance fields, a binary search is obviously much faster. Before: Scenario{vm=app_process, trial=0, benchmark=GetInstanceField} 275460.26 ns; σ=19.75 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=GetStaticField} 661690.26 ns; σ=6340.84 ns @ 5 trials After: Scenario{vm=app_process, trial=0, benchmark=GetInstanceField} 3502.96 ns; σ=32.15 ns @ 3 trials Scenario{vm=app_process, trial=0, benchmark=GetStaticField} 6579.58 ns; σ=40.49 ns @ 3 trials bug: 18211592 (cherry picked from commit 8d471d854e0b66d079014519b562e673f8762995) Change-Id: I098192a217f858dcbb6f60472b5ad1c0d72906ee
* Delete unused imtable fieldMathieu Chartier2014-11-101-3/+0
| | | | | | | | Bug: 17643507 (cherry picked from commit c46775d1a134eb1bf55557e33d34c732c0520660) Change-Id: I9cddc73cbf4b79ad4d50c6d413bea7ec3e62e4b3
* Only allow once GC request at a time.Mathieu Chartier2014-10-231-7/+2
| | | | | | | | | | | There is no reason to allow multiple, allocating threads may have multiple GC requests before the GC starts. Bug: 17942071 (cherry picked from commit 71891f9da2fbcb865931da70ae759032e6698106) Change-Id: I5e2162373bcef1027eb71e5b1699186ff015f92d
* Make unchecked getDeclaredFields/Methods methods public-hiddenAlan Viverette2014-10-161-11/+23
| | | | | | | | | | | | | These are used by ViewDebug to obtain the declared fields and methods and then perform type resolution checks on a per-field and per-method basis. Also updates documentation and naming so that the newly exposed methods are less likely to be used incorrectly within the framework. BUG: 17375269 (cherry picked from commit 206773d0a85a03b70a5a5cd6bf5e6f2a2a2326d4) Change-Id: Ia656d6e8a00ebcb0b729e68aa8a2c1959b9e260b
* Fix ReferenceQueueDaemon.enqueue to start at element 1 of the listMathieu Chartier2014-10-151-14/+8
| | | | | | | | | Previously we started at element 2 and had that element 1 was the last one finalized. This caused System.runFinalzition to occasionally finish before all of the objects were finalized. Bug: 17932313 Change-Id: I410dc1ef97ecd30c35f0fc0c3fdfbcc9caa585dd
* Add VMRuntime.isBootClassPathOnDiskBrian Carlstrom2014-09-301-0/+13
| | | | | | | | Bug: 17679443 (cherry picked from commit 75c02d71f2345d9f19e9c36dd75c3d08d9f562dc) Change-Id: I4cf9113dfedb2981dc9ce219c96fe1f71f4e0e98
* Update Class.primitiveType field uses.Hiroshi Yamauchi2014-09-251-2/+5
| | | | | | | This goes with the array allocation path optimization CL 108967. Bug: 9986565 Change-Id: I96de4725d4517d84af34ad05792fce8aa322f57a
* Change FinalizerWatchdogDaemon to not hold objects liveMathieu Chartier2014-09-191-11/+22
| | | | | | | | | | | | | | Previously, waitForFinalization would hold whatever object was being finalized live for MAX_FINALIZE_NANOS even though the finalizer on this object was run much earlier. This caused a test to be flaky since it was assuming that the JNI weak global reference of a recently finalized object wouldn't be held live. Bug: 17305633 (cherry picked from commit 6ba680664fa14a547543a8c63708543ea8072680) Change-Id: Ide60db55190a3764c16e4919a7c71a113cbf3968
* Merge "Remove referenceStaticOffsets from Class.java since it's not needed ↵Mingyao Yang2014-09-101-3/+0
|\ | | | | | | anymore."
| * Remove referenceStaticOffsets from Class.java since it's not needed anymore.Mingyao Yang2014-09-101-3/+0
| | | | | | | | | | Bug: 16236588 Change-Id: Icebdf0febee72a5dbbebc1906b069d52bf756e80
* | Add Reference.getReferent for reference intrinsic.Mathieu Chartier2014-09-091-1/+13
|/ | | | | | | | | Reference intrinsic was incorrectly inlining PhantomReference.get(). We get around this by adding a layer of indirection. Reference.get() now calls getReferent() which is intrinsified and inlined. Bug: 17429865 Change-Id: I39803506c7bd800500ca3632a6cdf1077e382bff
* Add handling for hashed uninflated object.Mathieu Chartier2014-09-081-0/+6
| | | | | | | | | | | | | | | | | This is an Optimization to reduce how often we call System.identityHashCode. If the lockword is set to the hash code state then we simply return this value. Otherwise, we use System.identityHashCode. Maps launch exclusive time spent in System.identityHashCode: Before: 4.5% After: 2.4% Bug: 16828525 (cherry picked from commit 6917aebf2eb26c2b003a72d09c1c5bb6310160b0) Change-Id: I0ccad53cb5f8f4f27fe11725a91ab45a117452a3
* Make explicit that ISA names are used in some sys propertiesCalin Juravle2014-08-261-0/+4
| | | | Change-Id: I0620c33972e061ba18504579430d2ac02656d17a
* Don't allow Class.class.getDeclaredConstructor().setAccessible().Mathieu Chartier2014-08-111-0/+7
| | | | | | | | The new behavior is to throw a SecurityException. Bug: 16866726 Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=561 Change-Id: I1fa0d9617f8b25bf4e93a52c4aed22f0be27555b
* Workaround doclava leaking ArtMethodBrian Carlstrom2014-08-051-0/+8
| | | | | | | | Bug: 16828157 (cherry picked from commit fe51ef7c7974e33b2ee20457aa16d6aef6cf3485) Change-Id: I271571a7501b9bce03ad1c09e09b5bfe4ffc422b
* API to query whether a given instruction set / abi is 64bit.Narayan Kamath2014-07-141-0/+11
| | | | | | | | | This is required to implement some aspects of the multi lib installation process. (cherry picked from commit 32f32721e65c93a3aaf8a792b7742aabe7e29e7e) Change-Id: I10fedcbee1318d132d2ac517ddf8cdca02a51cda
* Moved slow path flag to Reference classFred Shih2014-07-101-0/+16
| | | | | | | Added static field in Reference class to hold slow path flag and added benchmark to test Reference.get() performance. Change-Id: I13ad65a356fe4e104d8d83980694dc2740d7d039