History log of /libcore/libart/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
41739784355530c8762c5b93228bbcf2f589188b 13-Dec-2014 Mathieu Chartier <mathieuc@google.com> Only allow one requestGC at a time

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

(cherry picked from commit c0b55b80df57b9f8c659a5af4525ceba271622b6)

Change-Id: Iba46cb9c6cd2503d7af3348b4478c8c53973b9ee
rc/main/java/java/lang/Daemons.java
b9a5206b91a656c091e7055ff70e4eed2c76b8b1 25-Nov-2014 Mathieu Chartier <mathieuc@google.com> Move dexCacheStrings from ArtMethod to ArtClass

Saves ram.

Bug: 17643507

Change-Id: Iabfb224db0de47ceff3806c491ce33b772af6fbe
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/reflect/ArtMethod.java
13e57c9c508dea33e9bd5768a3cbd79eb263790e 10-Nov-2014 Mathieu Chartier <mathieuc@google.com> Delete pointer sized fields

Change-Id: Ia0ad61589542c5ce317b6a5a6bb4ca12d7e6647b
rc/main/java/java/lang/reflect/ArtMethod.java
8d471d854e0b66d079014519b562e673f8762995 13-Nov-2014 Narayan Kamath <narayan@google.com> Binary search through ArtFields to match by name.

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

Change-Id: I8f979de62ffe37d1c7d5c721717d2f3501e7c9e6
rc/main/java/java/lang/Class.java
c46775d1a134eb1bf55557e33d34c732c0520660 08-Nov-2014 Mathieu Chartier <mathieuc@google.com> Delete unused imtable field

Bug: 17643507

Change-Id: Ic96554136f141440c3fbb2c03e80ae876a6162de
rc/main/java/java/lang/Class.java
71891f9da2fbcb865931da70ae759032e6698106 23-Oct-2014 Mathieu Chartier <mathieuc@google.com> Only allow once GC request at a time.

There is no reason to allow multiple, allocating threads may have
multiple GC requests before the GC starts.

Bug: 17942071
Change-Id: If31afa51a4da95955d538d47397cd96177987bcb
rc/main/java/java/lang/Daemons.java
206773d0a85a03b70a5a5cd6bf5e6f2a2a2326d4 16-Oct-2014 Alan Viverette <alanv@google.com> Make unchecked getDeclaredFields/Methods methods public-hidden

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
Change-Id: I2f3d4f0ffe3a59e0466e7f7e401c1e5d170d36df
rc/main/java/java/lang/Class.java
75c02d71f2345d9f19e9c36dd75c3d08d9f562dc 29-Sep-2014 Brian Carlstrom <bdc@google.com> Add VMRuntime.isBootClassPathOnDisk

Bug: 17679443
Change-Id: Ib9651878c2b8bd49ccef81fe335614fce724c4d1
rc/main/java/dalvik/system/VMRuntime.java
d73625d5e0d1fd70966264cbc518c9177d4af848 24-Sep-2014 Anwar Ghuloum <anwarg@google.com> Merge "Revert "Timing hacks DO NOT MERGE"" into lmp-dev
5467456d499d7f99c68252a7d72858d65608a190 24-Sep-2014 Anwar Ghuloum <anwarg@google.com> Revert "Timing hacks DO NOT MERGE"

This reverts commit 6d688b8bb051942cd3cdd5fc1e19f42c3049f8a1.

Change-Id: Ia4e1ebd0849f4c6b9958d7d78edcedd096042926
rc/main/java/java/lang/Daemons.java
65cbc395d35f892f02c4868486b699a7d962ee47 19-Sep-2014 Mathieu Chartier <mathieuc@google.com> Merge "Change FinalizerWatchdogDaemon to not hold objects live" into lmp-dev
6ba680664fa14a547543a8c63708543ea8072680 19-Sep-2014 Mathieu Chartier <mathieuc@google.com> Change FinalizerWatchdogDaemon to not hold objects live

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
Change-Id: Idc6ec28c22f8d5dd8650c000b15d6fc50a732a08
rc/main/java/java/lang/Daemons.java
fd38456b982ce9812022fb68c72ea20d30b923d7 18-Sep-2014 Ian Rogers <irogers@google.com> DO NOT MERGE. Only have a portable entrypoint in portable builds.

Bug: 16214885
Change-Id: I15b91d759882f35fb1e7e9c9141b3d8a1c1f2f0a
rc/main/java/java/lang/reflect/ArtMethod.java
4722f3fc3107edb1b133b833277ce400222985a6 09-Sep-2014 Mathieu Chartier <mathieuc@google.com> Add Reference.getReferent for reference intrinsic.

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

(cherry picked from commit ee1ba6114921065ff4629cdaee207e2960dadd63)

Change-Id: I305686d76e0e03856a46b85955622939718c8d85
rc/main/java/java/lang/ref/Reference.java
6917aebf2eb26c2b003a72d09c1c5bb6310160b0 06-Sep-2014 Mathieu Chartier <mathieuc@google.com> Add handling for hashed uninflated object.

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
Change-Id: Ic60280b859547cd7fa7db97005a1aa9340c58304
rc/main/java/java/lang/Object.java
6d688b8bb051942cd3cdd5fc1e19f42c3049f8a1 04-Sep-2014 Anwar Ghuloum <anwarg@google.com> Timing hacks DO NOT MERGE

Let's submit to see if any issues remain

Bug: 17310019
Change-Id: Ifef1b1645033adcf192d6ec9248456cae28cd09f
rc/main/java/java/lang/Daemons.java
8fc0cb95f87a8a31c56793a3d24e58bcc5d88025 09-Aug-2014 Mathieu Chartier <mathieuc@google.com> Don't allow Class.class.getDeclaredConstructor().setAccessible().

The new behavior is to throw a SecurityException.

Bug: 16866726
Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=561

(cherry picked from commit f1c8d808ea349df134c0ee0908c1fc8c91493e0a)

Change-Id: I8e6db5741b03cebe20c32b4e5b251d45cb9020d8
rc/main/java/java/lang/reflect/AccessibleObject.java
fe51ef7c7974e33b2ee20457aa16d6aef6cf3485 06-Aug-2014 Brian Carlstrom <bdc@google.com> Workaround doclava leaking ArtMethod

Bug: 16828157
Change-Id: I03a0a13154c2a0adec4517f740195ac150eaffaa
rc/main/java/java/lang/reflect/AbstractMethod.java
421284d225e09e4bfc09bf7f3d35d00919187c4c 15-Jul-2014 Ed Heyl <edheyl@google.com> reconcile aosp (0d589d78c1c2a809429911fc4756856b53404fb9) after branching. Please do not merge.

Change-Id: Ib9fbb179f981f5159c202db15235c2129b81cb5e
rc/main/java/java/lang/ref/Reference.java
32f32721e65c93a3aaf8a792b7742aabe7e29e7e 08-Jul-2014 Narayan Kamath <narayan@google.com> API to query whether a given instruction set / abi is 64bit.

This is required to implement some aspects of the multi
lib installation process.

Change-Id: I962d0510b94fb85c4be9f90e6145dac50a4eadf2
rc/main/java/dalvik/system/VMRuntime.java
c40cfbbe48b79682392aa861211764f316f05587 27-Jun-2014 Elliott Hughes <enh@google.com> Fix javadoc @char instead of @code.

Change-Id: Icb2e2b075615fdf384c49da85145c2b5cb6f38c5
rc/main/java/java/lang/String.java
906d1caac9ab8c8b108ed4be244ba4eee58739e5 27-Jun-2014 Elliott Hughes <enh@google.com> Merge "Clarify the String.compareTo contract and add tests."
18faff22684ebf763de4f49abc19fb8af7ef83da 25-Jun-2014 Elliott Hughes <enh@google.com> Clarify the String.compareTo contract and add tests.

Our use of vague terms like "negative" and "positive" led VM engineers to
assume they had more leeway than they actually do.

While we're here, let's fix all the ambiguous use of 'character' and add a
warning and link to Collator anywhere the non-standard (and
non-locale-specific) case folding is used.

Change-Id: I0a0fb2a493861d32fac0bc4e28ae9634f8ac342c
rc/main/java/java/lang/String.java
64e0127c640646f0e8967678a19c372636de6f3f 08-Jun-2014 Valter Strods <valters.strods@gmail.com> libcore: Clean up Enum.compareTo(E)

As E extends Enum<E>, it is safe to cast the comparable object to
Enum<?> as it should not throw any exceptions. When it is cast, the
ordinal value can be accessed directly. Doing so would be preferred as
either both the variables this.ordinal and o.ordinal should be used or
the methods this.ordinal() and o.ordinal() should be used without
mixing them together.

Change-Id: I7c4e93fdf35b0bf2949738a91c0855d9a52e5c13
rc/main/java/java/lang/Enum.java
1265f1c73c6ae3b03a973f048cdc8754ee87e026 19-Jun-2014 Brian Carlstrom <bdc@google.com> Fix libart files to work with javadoc

Bug: 14298175
Change-Id: I3f36ca6259a28bf9beae02bf30ba365eb263e3c1
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/Constructor.java
451d99525dc8fef247e6fe6f4c714cbdf7f8b322 16-May-2014 Sebastien Hertz <shertz@google.com> Provide more information about the runtime

Adds methods vmInstructionSet, is64Bit and isCheckJniEnabled to the VMRuntime
class. They are used by DdmHandleHello class in the framework to report new
information about the runtime to DDMS.

Bug: 14888999
Bug: 14888124
Change-Id: I8a2d3f22f84a093be2fbc74464af6aa7b2a2bebb
rc/main/java/dalvik/system/VMRuntime.java
2d2cead249daa3c68ffeb350a4231abb989b1208 12-May-2014 Vladimir Marko <vmarko@google.com> Remove ArtMethod's quick fields for frame size and spills.

This is a companion CL for art/ change
"Move quick frame info to OatQuickMethodHeader."
https://android-review.googlesource.com/93241

Change-Id: I07e2f4c756a0738433d9341847410b612001c5b6
rc/main/java/java/lang/reflect/ArtMethod.java
3470d3bcf6d4d25e22ba85e50a499165d59ce4c2 06-May-2014 Mathieu Chartier <mathieuc@google.com> Handle Reference.get in native code.

This enables us to have mostly concurrent reference processing in the
GC. Reference.get() may block if references are being processed.

Bug: 14381653

Change-Id: I7cf6ef34b08f804897c8e6d5e9e6ae94420dc489
rc/main/java/java/lang/ref/Reference.java
63e957f7622cc829b3ededdbf222e7267603d458 25-Apr-2014 Mathieu Chartier <mathieuc@google.com> Add finalizer references in native code.

Finalizers are now added from native code in the allocation code
path. This is an optimization since some of the entrypoints aren't
used for finalizable objects and therefore we can eliminate the
check.

Bug: 14078487

Change-Id: I7edba4c884abec23678e59eb7480abc344f1ffa8
rc/main/java/java/lang/Object.java
a607cc9c4cd4e21df39e549c14dac81c5cd18922 16-Apr-2014 Narayan Kamath <narayan@google.com> Add a mapping between ABIs and instruction sets.

Bridges the android ABI lists (TARGET_CPU_ABI, TARGET_CPU_ABI2
from the BoardConfig and android.os.Build.CPU_ABI) and the
runtime concept of an instruction set used for compilation
(the --instruction-set to dex2oat and so on).

(cherry picked from commit 6174cff204aa36e622e9bd93569b4a1eb2ed222c)

Change-Id: Id2eaa60f0546d6c88770f8981adac2a896ed7d49
rc/main/java/dalvik/system/VMRuntime.java
f7cd4db971faadc5242a5ee8e15d38837c61176c 28-Apr-2014 Vladimir Marko <vmarko@google.com> Merge "Remove ArtMethod's quick fields mapping table and vmap table."
793b9ef91876cb7bea31ddf74f110ac45302f1dd 23-Apr-2014 Jeff Hao <jeffhao@google.com> Fix Class.newInstance to not wrap its exceptions.

Unlike Constructor.newInstance, Class.newInstance should not wrap
exceptions it throws.

Bug: https://code.google.com/p/android/issues/detail?id=68620

Change-Id: I3b89e8417d770b1908fea585062e62d5de292331
rc/main/java/java/lang/Class.java
e5a04f4fd928a23fb23980259cc226a120fc704d 16-Apr-2014 Vladimir Marko <vmarko@google.com> Remove ArtMethod's quick fields mapping table and vmap table.

This is a companion CL for art/ change
"Move mapping table and vmap table offsets to OatMethodHeader."
https://android-review.googlesource.com/90699

Change-Id: Ibc46e2d6f0f8dce5f1ec6acbefea3c80f034cbd2
rc/main/java/java/lang/reflect/ArtMethod.java
d9d0d1c593a34c6169e7f0a5b42aa8ae6af3daca 01-Apr-2014 Jeff Hao <jeffhao@google.com> Merge "Fix reflection access checks for app compatibility in libcore."
96e2e4faf806aa22ca205354c16b04288d51ddbf 01-Apr-2014 Jeff Hao <jeffhao@google.com> Fix reflection access checks for app compatibility in libcore.

Libcore side of this change. Corresponding art change here:
https://android-review.googlesource.com/#/c/89620/

Change-Id: I00610421438155fc60d6780b06581b874419ca2b
rc/main/java/java/lang/Class.java
89f30966ad2678ddc1c5088b76604a065eacaa67 01-Apr-2014 Hiroshi Yamauchi <yamauchi@google.com> Rename read barrier-related fields.

Bug: 12687968
Change-Id: I9161cb06dda2e9113476f2f400cac70e01726c58
rc/main/java/java/lang/Object.java
0a21bb40b8ade2e932ef7608bc861f183bfe594d 26-Mar-2014 Jeff Hao <jeffhao@google.com> Add access checks to Method and Field reflection.

Libcore side of this change. Has a corresponding art change.

Bug: 13620925
Change-Id: I68f726af5f2b5a79c9ffd6f2c76a0b3f2600ca9d
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/Enum.java
rc/main/java/java/lang/reflect/Constructor.java
rc/main/java/java/lang/reflect/Field.java
rc/main/java/java/lang/reflect/Method.java
5e51851f6e91f6e5450435b51812e147db8b9735 11-Feb-2014 Dave Allison <dallison@google.com> ART sampling profiler

Add isDexOptNeededInternal() to the DexFile class. This is like
isDexOptNeeded() except takes additional arguments that are used
to determine whether a profile has changed of not.

The isDexOptNeeded() method is part of the exported API and cannot
be changed. The new method is not part of the API.

Also add additional argument to the registerAppInfo() methods (the
package name). This is used to determine the profile filename.

Bug: 12877748
Change-Id: If862cc5d20fae4b9d46c488f401cda6d433b4a57
rc/main/java/dalvik/system/VMRuntime.java
10af76d5af1d87686ff9ab8d00f3dadc15a84fb7 28-Feb-2014 Ian Rogers <irogers@google.com> Add unpadded array allocations.

Unpadded array allocations avoid unused bytes following arrays. API conventions
follow those of newNonMovableArray.
Dalvik implementation assume dlmalloc allocation properties, ART implementation
is handled by resizing the array post-allocation:
https://android-review.googlesource.com/83670
Add VMRuntimeTest to check the properties of the array allocation routines.
Change java.lang.reflect.Array.newInstance to compare more probable array types
before less probable ones.

Bug: 13028925.

Change-Id: Icf6bfb1aa5ad4faa062b393082c689b6118a84b5
rc/main/java/dalvik/system/VMRuntime.java
a7c69f785f7d1b07b7da22cfb9150c584ee143f4 31-Jan-2014 Hiroshi Yamauchi <yamauchi@google.com> (Experimental) Add Brooks pointers (libcore).

This feature is disabled by default.

Change-Id: Ia8db311c1bc994737964121700a70b33920ddc4a
rc/main/java/java/lang/Object.java
6bac5b7930878c03d773451005ac09b2e9fd4251 12-Feb-2014 Neil Fuller <nfuller@google.com> Merge "Add documentation around zero-length timeouts"
23122dc6c511936935ceaccaed94adafdc9fddaf 07-Feb-2014 Neil Fuller <nfuller@google.com> Add documentation around zero-length timeouts

Add documentation to cover the fact that wait()
and join() treat zero-length timeouts as "wait indefinitely".
Improved documentation for when a thread is already
interrupted when the various sleep/join/wait calls are made,
and what happens to the interrupted state.

Bug: 12931322
Change-Id: I4e8353cb556ff335df187fd5efa1f42c9b196cd6
rc/main/java/java/lang/Object.java
rc/main/java/java/lang/Thread.java
7ce6ae5ece6b7a2085d4445e2030f964986dca88 11-Feb-2014 Hiroshi Yamauchi <yamauchi@google.com> Don't hardcode object layout in Unsafe.

Change-Id: I0e2509a1a46c2aa937e4a45cabefb4998a8ed7f4
rc/main/java/sun/misc/Unsafe.java
b5a43a8ad530a60469bf9244a157079c93c07c8b 11-Feb-2014 Brian Carlstrom <bdc@google.com> Fix Thread.sleep(0) of an interrupted thread

Bug: 12929305
Change-Id: I3061c3345c68de8bcf438e6935446b4f7cd76001
rc/main/java/java/lang/Thread.java
00afb8c51bdee0073f73491e3bae2b4e431eb0a1 10-Jan-2014 Ian Rogers <irogers@google.com> 64bit ART object model changes.

The libcore portion of:
https://android-review.googlesource.com/#/c/80375/

Change-Id: Ic974e92fbb98e184b9cb01ea82b0bfba03374f79
rc/main/java/java/lang/DexCache.java
rc/main/java/java/lang/Thread.java
rc/main/java/java/lang/reflect/ArtMethod.java
fff149a4eaa55e9eacddd22a386569b863092973 08-Jan-2014 Ian Rogers <irogers@google.com> Merge "ART: remove dex cache's initialized static storage."
55d6ce9aebecdee66cf07736be51d584caeadbb6 08-Jan-2014 Ian Rogers <irogers@google.com> ART: remove dex cache's initialized static storage.

Change-Id: I01f099b26bbfa04cc211e31cd0444400d0a00395
rc/main/java/java/lang/DexCache.java
rc/main/java/java/lang/reflect/ArtMethod.java
eee45fe9d744ed1d9a505f020129430f4b733473 14-Nov-2013 Dave Allison <dallison@google.com> Add registerAppInfo to the VMRuntime object

This adds the native function registerAppInfo() to the VMRuntime
object. It is called by the ActivityThread in the framework
to tell the runtime about application info.

Bug: 11539952
Change-Id: I3958a40af5afd513f943093fb483885c2b6b119e
rc/main/java/dalvik/system/VMRuntime.java
0c85c33c5b400c0d32cf8c77d3bca704b7cca1e7 25-Nov-2013 Mathieu Chartier <mathieuc@google.com> Add method for updating dalvik process state through VMRuntime.

Used to know when to do trimming and will be used for knowing when
to do compaction.

Bug: 8981901

Change-Id: I0f715f8c9dfc5f7399b54261fe08410449fef10e
rc/main/java/dalvik/system/VMRuntime.java
ef07ef38927507f1551646abe3fbcea86a903cbe 21-Nov-2013 Narayan Kamath <narayan@google.com> Replace usage of CopyOnWriteArraySet.

Use a List<Class<?>> as the cache key instead, but
dedup and check for nulls in the list using a HashSet
instead. This will improve performance for large
lists of interfaces.

bug: 10316383

Change-Id: Id0c36a731e6e3cb39bf36c083180c0c4da5c2dd4
(cherry picked from commit 6074af533f57a93e1b8e1ab63dce6a264a4d5dae)
rc/main/java/java/lang/ClassLoader.java
rc/main/java/java/lang/reflect/Proxy.java
3b8c8cba4defe9049aca66d505e509395e5485f5 21-Nov-2013 Narayan Kamath <narayan@google.com> Fix the art version of getGenericSuperclass.

art version of:
https://android-review.googlesource.com/#/c/70325

bug: 10918616
Change-Id: Id4e221137410027757a5353476d78290f73d7ad8
(cherry picked from commit 34ab628b61321c17b5c1406656e7b352ab0a76a2)
rc/main/java/java/lang/Class.java
96caa8ec10a5d64d804a9ed3897c9a34c8626239 21-Oct-2013 Brian Carlstrom <bdc@google.com> Fix Class.getEnclosingClass for anonymous classes declared in <clinit> methods

(cherry picked from commit b9be313bdc257089534f738ff8e1e5ad4de3d25e)

Bug: 11245138
Related bug: https://code.google.com/p/android/issues/detail?id=61003

Change-Id: I5cc1db6ca6628b845409d7a6ea864da5f625fdc3
rc/main/java/java/lang/Class.java
59351c4e69b0e917d1f60e7ae32e76615150690c 29-Oct-2013 Jeff Hao <jeffhao@google.com> Libcore support for Interface Method Tables (IMT).

(cherry picked from commit 500f98f9696baad7ba16bd5ad65e8caa475ebfe7)

Change-Id: I0d611ba7b24f2a990a4a2958939b0f6d739d3c14
rc/main/java/java/lang/Class.java
1ec5a34b4367fd7c44266c5bdd363ea5cfac7a67 25-Oct-2013 Alex Klyubin <klyubin@google.com> Add VMRuntime.getTargetSdkVersion.

The goal is to enable libcore to adjust its behavior based on the
target SDK version / API Level of the app.

Change-Id: I60f1febc1f8ddf2a97925a48ddf232508d5c44f9
rc/main/java/dalvik/system/VMRuntime.java
416fdad96008bab4aaef02747c30637ff63738e5 21-Oct-2013 Brian Carlstrom <bdc@google.com> Merge "Preload DexCaches"
65e6acab4f777245dc73f40ecc3b42b065d21ed2 16-Oct-2013 Brian Carlstrom <bdc@google.com> Preload DexCaches

Bug: 11045348
Change-Id: Idbd6ad284964035a3fcf1ec360a3490f32f99d42
rc/main/java/dalvik/system/VMRuntime.java
31891252fb2fd6ef2319341a25d1ae7fa1ed45cc 16-Oct-2013 Elliott Hughes <enh@google.com> Fix libart String.charAt documentation to match libdvm.

Change-Id: I901d818e96af0b9240808bb70ccbe8a17854d485
rc/main/java/java/lang/String.java
4583b2cee94e9582a6c7a1d715f4896073d03bad 13-Oct-2013 Brian Carlstrom <bdc@google.com> Fix Class.getDeclaringClass bug for ART

Bug: https://code.google.com/p/android/issues/detail?id=61003
Change-Id: Ia2cc774a9239ecd64f8039b2ca9e27593126e2cf
rc/main/java/java/lang/Class.java
fe1e0e3105497c2400ba9c41b8ba7548f121074f 09-Oct-2013 Brian Carlstrom <bdc@google.com> am 83c419d7: am c8cfc667: Preload DexCaches

* commit '83c419d78e40c8bccc07ba3f118667b8bb958d30':
Preload DexCaches
c8cfc667ddb82b08b889a24831a3d00cc6490bd9 08-Oct-2013 Brian Carlstrom <bdc@google.com> Preload DexCaches

Bug: 11045348
Change-Id: I3025d8f95e157af602b0ae91d974cb5e6678fb3d
rc/main/java/dalvik/system/VMRuntime.java
0c550be404c10ea7314bdb1dd2738d54fe245619 24-Sep-2013 Ian Rogers <irogers@google.com> am 94b1bae4: Merge commit \'a6e22fc9\' into manualmerge

* commit '94b1bae43287c5c8e2d31d05d4f68441acf667ab':
Avoid computing class def indices.
0a16e40ffa54c84505e396a7b2fb248ef9b2dee1 24-Sep-2013 Ian Rogers <irogers@google.com> am b80808d7: am 98430d0d: Fix getGenericInterfaces for the no annotation case.

* commit 'b80808d79017cb1be406ffdc67fb26cc15c65eea':
Fix getGenericInterfaces for the no annotation case.
bbf99fd5471f46d0aedd01a9d5961fb3e40ac700 24-Sep-2013 Ian Rogers <irogers@google.com> am 3f1ad69e: Merge commit \'d4ec55c4\' into manualmerge

* commit '3f1ad69ef4655901cbf71c4c1fbae074bc320585':
Lazier annotation signature parsing.
a6e22fc9b70ebe39abd716ce37450bda935c0fb8 19-Sep-2013 Ian Rogers <irogers@google.com> Avoid computing class def indices.

Bug: 10244719
Also tidy AnnotationAccess.

(cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69)
Change-Id: I6ec8fd4e36b428d7e16e01d98b7bebc143fac8c3

Conflicts:
libdvm/src/main/java/java/lang/Class.java
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/DexCache.java
rc/main/java/java/lang/reflect/ArtMethod.java
rc/main/java/java/lang/reflect/Constructor.java
98430d0d75f4cfd40614b77debeb3c8d0abf40df 15-Sep-2013 Ian Rogers <irogers@google.com> Fix getGenericInterfaces for the no annotation case.

Bug: 10244719
(cherry-picked from 43111aab512b1a7c7c8095a7135a7ae2754ea5bd)
Change-Id: I758d32e9cffcabf771e6f5f86ffa2666c8e1cb02

Conflicts:
libdvm/src/main/java/java/lang/Class.java
rc/main/java/java/lang/Class.java
d4ec55c4e1acc3c3df937facbd367aff6618536c 07-Sep-2013 Ian Rogers <irogers@google.com> Lazier annotation signature parsing.

Bug: 10244719.
Also, make wider use of empty arrays.
Also, use named inner classes to aid profiling.
Remove caching as the empty result will be fast.
Porting the ART changes to DVM, to avoid the caching, results in bringing
in a bunch of other ART clean-up.
TODO, avoid modified-UTF8 to String conversions by Dex.

Change-Id: I051b6e34b5a4e7a7f1383461a799755947a5ba36

Conflicts:
libdvm/src/main/java/java/lang/Class.java
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/Method.java
a9a297845620cfe56bbe3b9f8de1331b7ec54574 21-Sep-2013 Ying Wang <wangying@google.com> Fix Java 7 build.

See http://bugs.sun.com/view_bug.do?bug_id=6904536
Bug: 8992787

Change-Id: Ib84a28a3df4517be86cd3342e6f916a5d905be89
rc/main/java/java/lang/Enum.java
413d4592ee114eac81014af4b6347e73873ce8ce 03-Sep-2013 Elliott Hughes <enh@google.com> Use the docs-approved Android x.y (Name) format consistently.

Also include the API level where the reason for mentioning the version
is an API difference (as opposed to simply a behavioral difference).

Change-Id: Idd69630fc5d6f6f0bd5d1c524cb32fd8c2fb750d
rc/main/java/dalvik/system/VMRuntime.java
0d3a5adf6ee9664b076eee1eabe0be505cdb9792 27-Aug-2013 Jeff Hao <jeffhao@google.com> Add libcore support for sample profiling from traceview gui.

This change unifies the native method tracing interface between art
and dalvik, and so the two files can merged again.

(cherry picked from commit cd28c9550cbc77b5b856a13638f221f1cd9fc6ab)

Change-Id: Id834945644615c4d8d8536140842d9036f38fbeb
rc/main/java/dalvik/system/VMDebug.java
2239fc1b8955313cb880a53a73447daeb89e6f11 22-Aug-2013 Ian Rogers <irogers@google.com> Fix arrayIndexScale.

Bug 10430382.

(cherry picked from commit 9da79116014d4396d33a9a1ada891c49aed7c6a3)

Change-Id: Ife41904b1580dae74ae17d49c799a1a81d4a18bc
rc/main/java/sun/misc/Unsafe.java
ca2c58ceaf2d35d30fe06b1676cc1436a24c4d30 13-Aug-2013 Brian Carlstrom <bdc@google.com> Share ClassLoader code

Bug: 9071417
Change-Id: Icdde3aace023d1d7509c932cdd71f203213b59d6
rc/main/java/dalvik/system/BaseDexClassLoader.java
rc/main/java/dalvik/system/DexFile.java
rc/main/java/dalvik/system/DexPathList.java
71dc4f7d4829335f7aba5414b43d16cd316ba22f 31-Jul-2013 Brian Carlstrom <bdc@google.com> Refactor ART java.lang.reflect implementation

Bug: 10014286.

(cherry picked from commit 1222a700a25956b0e3634731160017f0d3aa0585)

Change-Id: Ic5672489f6c028d47e6c2a499d6a2bbdd5cc4e4c
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/DexCache.java
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/AccessibleObject.java
rc/main/java/java/lang/reflect/ArtField.java
rc/main/java/java/lang/reflect/ArtMethod.java
rc/main/java/java/lang/reflect/Constructor.java
rc/main/java/java/lang/reflect/Field.java
rc/main/java/java/lang/reflect/Method.java
rc/main/java/java/lang/reflect/Proxy.java
1e93f6737ef1a3540c8ce19c4fe3fa2efcdc1c78 16-May-2013 Ian Rogers <irogers@google.com> Increase breadcrumbs for class lookup failures.

Dex files are loaded early and then queried against. This leads to
IOExceptions for failed to load dex files being unavailable when a findClass
is performed. Its useful to have the IOExceptions as then its possible to
determine why a class wasn't found, for example, because the jar archive was
empty.

This change caches the IOExceptions that occur during the loading of dex files
and then adds them to the suppressed exceptions reported when findClass fails.

Change-Id: I31693400c503a113282f9d094ddfd84ebc3cf6dd
(cherry picked from commit 04205541b4dda4c199a7fe72ab72eb0766a4207c)
rc/main/java/dalvik/system/DexPathList.java
b7645d845df8e65a642dfc10eaf8dd37c5f9437c 07-Aug-2013 Mathieu Chartier <mathieuc@google.com> Remove updateProcessState.

Change-Id: Icbbc65dbc51bb46e64df27a5066b2ef08fe7b93f
(cherry picked from commit 7798d7373c11f47a81f465577e4074480de82af6)
rc/main/java/dalvik/system/VMRuntime.java
5608e04d323281a4c7e45eee1a9ca4b23437e0c5 26-Jul-2013 Ian Rogers <irogers@google.com> Fix AIOOBE in Method.compareParameters.

Bug: 10032782

(cherry-picked from commit f700b73e492203ec773fb76d4525394ed3a1cc23)

Change-Id: Id46690c1b3b08594cc8ad54f22f601b44d17841e
rc/main/java/java/lang/reflect/Method.java
ed80d3a1a25d5bd37c25c1cd8ea4c192729c2618 26-Jul-2013 Ian Rogers <irogers@google.com> Fix sign-extension of type indices.

We pass type indices as ints but Dex represents them as shorts. Avoid sign
extending the shorts which would cause problem for dex cache indices, etc.

(cherry-picked from commit 1d02e61adf72a3cd59b796fc8d7ee1161ba66e7a)

Change-Id: Id9b540863fee56ad3165f4cac2a23389ba78ca2e
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/Method.java
d3e311496e0b08acd959c3ffa31d9930a71bae19 24-Jul-2013 Ian Rogers <irogers@google.com> Improve the performance of reflective operations.

Common dex index lookups require a number of different types to be constructed,
implement short-cuts that avoid the intermediate data types.
Refactor reflective operations to use dex methods that don't require temporary
objects.
Note: this change adds an empty short array to Dex, this code can't appear in
libcore.util as Dex doesn't always come with libcore.util.

Bug: 9968234

(cherry picked from commit 381db8de0ac5df124c7f482bf4be9d5756bf3ca4)

Change-Id: I9122a3f01b4f41b07a84aff768193c092e29698c
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/Constructor.java
rc/main/java/java/lang/reflect/Field.java
rc/main/java/java/lang/reflect/Method.java
929e3dcbacea209354f115e88ebffc55bc422278 15-Jul-2013 Hiroshi Yamauchi <yamauchi@google.com> Show size/alloc/free per Dalvik heap space in dumpsys

Add the heap size/alloc/free stats to the Dalvik heap space breakdown section in dumpsys meminfo.

Also, now the zygote heap has a distict ashmem region name.

Bug: 9532137
Bug: 8266259

(cherry picked from commit 8a620d52b5d12599b539c7a7621daf3012de5074)

Change-Id: I7283e30cefbc6c57b23a5dc1ae88b037f3e11bbf
rc/main/java/dalvik/system/VMDebug.java
07e1d1125c11b8e037a31e9ebb6b64332a394a9f 26-Jul-2013 Elliott Hughes <enh@google.com> Use the libcore.reflect implementation.

Change-Id: I3cb180d3c1912b9362c5a2e8dbedc1e80fb0c14f
rc/main/java/libcore/reflect/AnnotationAccess.java
rc/main/java/libcore/reflect/GenericArrayTypeImpl.java
rc/main/java/libcore/reflect/GenericSignatureParser.java
rc/main/java/libcore/reflect/InternalNames.java
rc/main/java/libcore/reflect/ListOfTypes.java
rc/main/java/libcore/reflect/ListOfVariables.java
rc/main/java/libcore/reflect/ParameterizedTypeImpl.java
rc/main/java/libcore/reflect/TypeVariableImpl.java
rc/main/java/libcore/reflect/Types.java
rc/main/java/libcore/reflect/WildcardTypeImpl.java
ddd074801339ef32237f38fb99b43a8844201d89 10-Jul-2013 Mathieu Chartier <mathieuc@google.com> Add registerNativeAllocation and registerNativeFree to libcore.

Required for ART native allocation accounting code.

(cherry picked from commit 71c68c5920a3be2f953624365da7cf0681fa32ed)

Change-Id: I5d5a4c908b3759a56e7e919754bbc26fcd051600
rc/main/java/dalvik/system/VMRuntime.java
0ee2c0c62ce570b7f2d82c2ba8599a9ebcd440b5 24-Jul-2013 Elliott Hughes <enh@google.com> AnnotationFactory and AnnotationMember are now shared between art and dalvik.

Change-Id: I58311e9b5a6e6963889b47d8b69c3604b2e61f4c
rc/main/java/libcore/reflect/AnnotationFactory.java
rc/main/java/libcore/reflect/AnnotationMember.java
6a51140fd83dc16867ca38a4ca2e47cbbf090dfd 20-Jul-2013 Ian Rogers <irogers@google.com> Restructure Class.getDeclaredMethodInternal.

Prefer virtual over direct methods when searching for a specific method.
For direct methods, check they are method rather than constructors early
(cheap test) and cast to Method as check-cast ellision can remove.

Motivation, android.widget.RemoteViews is using Class.getMethod and showing
as hot in the calendar launcher widget.

Change-Id: Id12fe9549c8f6626fd1abf0494d81aee32e0bc7a
rc/main/java/java/lang/Class.java
a9c53f456a72ffbf36b4da2e520e26844b11c1b4 18-Jul-2013 Mathieu Chartier <mathieuc@google.com> Add updateProcessState to VMRuntime

This process state will be used for determining GC behavior.

Change-Id: I2dde66a79d8fa835a7ed2499bd37069c6062f84b
rc/main/java/dalvik/system/VMRuntime.java
f5916e4d6e81bceddbb4e245a33ab1966773bafe 11-Jun-2013 Jeff Hao <jeffhao@google.com> Cleaning old JIT methods from String.

(cherry picked from commit 16f4ce14801128a7d826a2249f35120dbd3e0ce1)

Change-Id: Icf0ac5f12748b6bafabc7621cfe62264016c8503
rc/main/java/java/lang/String.java
78728ebce868f5949739e6e204e3e0fbf0356f8d 15-Jun-2013 Elliott Hughes <enh@google.com> Fix Class.getModifiers for arrays of inner classes.

Bug: https://code.google.com/p/android/issues/detail?id=56267

(cherry picked from commit 8aa5892195543e80b1c4eb10d8764268927cc1be)

Change-Id: I3be5433b04607e5f41e7c68f03cfabc166b56d54
rc/main/java/java/lang/Class.java
26376765d7333ddf04c021365a1eadd9d47feb7e 28-Jun-2013 Brian Carlstrom <bdc@google.com> Add dalvik.system.VMRuntime.vmLibrary

(cherry picked from commit 3382fd584e926b61960ded814c889ea8b84a2222)

Change-Id: Ie095151c54caf4b996414d04c2140dcc3b93aa7b
rc/main/java/dalvik/system/VMRuntime.java
e138b37c43dc79fd0245afbd6159dcf8f83c7fbf 21-Jun-2013 Anwar Ghuloum <anwarg@google.com> Rename vmData

(cherry picked from commit bd1fa4dcf60bafdcaae3ebd5b8b93ae3550cd560)

Change-Id: I015cb48b6ac9e5c7f478b3a2f532d9c6c413058b
rc/main/java/java/lang/Thread.java
7d37c32dbdcfc4f698bbc72e7d5b8d66bf1c71a9 02-Jul-2013 Anwar Ghuloum <anwarg@google.com> Revert "Rename vmData"

This reverts commit 1d3779283db9454b5914d522771db37cbba6a4bd.

Change-Id: I16c998e8c4ee7e9b8e505150d05f2a399df6d066
rc/main/java/java/lang/Thread.java
1d3779283db9454b5914d522771db37cbba6a4bd 21-Jun-2013 Anwar Ghuloum <anwarg@google.com> Rename vmData

(cherry picked from commit bd1fa4dcf60bafdcaae3ebd5b8b93ae3550cd560)

Change-Id: Ie33c2d730a2302c2f5297163e0ed2f37fb5b97c7
rc/main/java/java/lang/Thread.java
14528c743d9166bc9f553446dd61e5ae4f065eb3 20-Jun-2013 Anwar Ghuloum <anwarg@google.com> Ensure that setName and setPriority are properly synchronized
Bug:8050919

(cherry picked from commit f1e80e4e227076f99e54d1a00f4e3d5ec1a23ba6)

Change-Id: I77408ddf708b674b57474f096be7cdb786c05224
rc/main/java/java/lang/Thread.java
cc9d315b9aefbbe677b34b017eeae032521f5447 08-Jun-2013 Elliott Hughes <enh@google.com> Copy the libdvm docs to the libart docs.

(cherry picked from commit 4e74358e31134d52aaf0ab3b3a96ab10b5e1138b)

Change-Id: Icaf54e1ef429f8948f65e2f90e748919d7263d3c
rc/main/java/java/lang/String.java
565e6a5521aff42217cde79532cf7b690dcc6a78 07-Jun-2013 Brian Carlstrom <bdc@google.com> Move dalvik.system.VMDebug to be runtime specific

Change-Id: Iae4b645f02e474875aca8ccfd7ba46610e12acbf
rc/main/java/dalvik/system/VMDebug.java
83bae0b56e9a6e21dee51f95406ee55ff5abc64d 06-Jun-2013 Brian Carlstrom <bdc@google.com> Move java.lang.String to be runtime specific

Change-Id: I67b912d06f19cd1167214f631973fa84b4e5aa61
rc/main/java/java/lang/String.java
e96f94f57430bf3060581c816cc3a148adbe91a4 05-Jun-2013 Brian Carlstrom <bdc@google.com> Making libcore build WITH_ART

Change-Id: I4db5fbf6a5977c02a1dffffc5386f7fc04ef7eab
rc/main/java/dalvik/system/VMRuntime.java
rc/main/java/dalvik/system/VMStack.java
rc/main/java/java/lang/Enum.java
rc/main/java/libcore/reflect/AnnotationMember.java
rc/main/java/libcore/reflect/GenericArrayTypeImpl.java
rc/main/java/libcore/reflect/InternalNames.java
rc/main/java/libcore/reflect/ListOfTypes.java
rc/main/java/libcore/reflect/ParameterizedTypeImpl.java
rc/main/java/libcore/reflect/Types.java
rc/main/java/libcore/reflect/WildcardTypeImpl.java
2cf03dc15c40b92634ff606694af5a6e9aa4db09 22-May-2013 Brian Carlstrom <bdc@google.com> Adding libart support to libcore

Change-Id: I86febf08eacf42bb4b2f06dbd51c5b2d5b25c9fb
rc/main/java/dalvik/system/BaseDexClassLoader.java
rc/main/java/dalvik/system/DexFile.java
rc/main/java/dalvik/system/DexPathList.java
rc/main/java/java/lang/Class.java
rc/main/java/java/lang/ClassLoader.java
rc/main/java/java/lang/Daemons.java
rc/main/java/java/lang/DexCache.java
rc/main/java/java/lang/Object.java
rc/main/java/java/lang/Thread.java
rc/main/java/java/lang/ThreadGroup.java
rc/main/java/java/lang/VMClassLoader.java
rc/main/java/java/lang/reflect/AbstractMethod.java
rc/main/java/java/lang/reflect/AccessibleObject.java
rc/main/java/java/lang/reflect/Constructor.java
rc/main/java/java/lang/reflect/Field.java
rc/main/java/java/lang/reflect/Method.java
rc/main/java/java/lang/reflect/Proxy.java
rc/main/java/libcore/reflect/AnnotationAccess.java
rc/main/java/libcore/reflect/AnnotationFactory.java
rc/main/java/libcore/reflect/GenericSignatureParser.java
rc/main/java/libcore/reflect/ListOfVariables.java
rc/main/java/libcore/reflect/TypeVariableImpl.java
rc/main/java/sun/misc/Unsafe.java