History log of /libcore/dalvik/src/main/java/dalvik/system/DexFile.java
Revision Date Author Comments
8a66d46fd7405f3d21709b93c64fb3809bc7ee3e 02-May-2016 Narayan Kamath <narayan@google.com> DexFile: Add an API to query oat file status.

Tracks art change cd7e7f78b8e97c1f6.

bug: 27494108
Change-Id: I1975adba628deaf71f8c5b012ea7487e1ae18a7c
aee5c15b9a5e740e073f338821dad97a193273e9 21-Apr-2016 Jeff Hao <jeffhao@google.com> Add ability to see if a dex file is backed by an oat file.

Needed for cts testing of uses-library functionality.

Part of a multi-project change.

Bug: 26880306

(cherry-picked from commit 914e91b46736bfd22cad01e8bd6861528ffc16c3)

Change-Id: I5c557f5e204e4358033e2a8ddbdf10d5aef7a277
214eb4b489e05cb61f1c00006521831b7560b3df 31-Mar-2016 Andreas Gampe <agampe@google.com> Libcore: Add filter upgrade function to DexFile

Expose a method to derive a non-profile-guided compiler filter from
a profile-guided version.

Bug: 27921071
Change-Id: I54735b61732e6a5c9dc62425d04bc740dd365083
1b7dfb091e0da13d4a7c9ac232e0c0f165b23ce3 31-Mar-2016 Andreas Gampe <agampe@google.com> Libcore: Add filter upgrade function to DexFile

Expose a method to derive a non-profile-guided compiler filter from
a profile-guided version.

Bug: 27921071
Change-Id: I54735b61732e6a5c9dc62425d04bc740dd365083
643e8cb87528bb6479eb7f25120fc11de3e4a9b3 20-Mar-2016 Andreas Gampe <agampe@google.com> Libcore: Expose compilation filter in DexFile

To allow checking the state of a dex file wrt/ compilation modes,
expose methods to check compiler filter strings and extend the
signature of getDexOptNeeded.

Bug: 27689078
Change-Id: I06b9d75f58c59cb07ef5170f784ea6745168efaa
5081919d9bca3d4442b61abde2b8e3c1a67bd693 25-Feb-2016 Calin Juravle <calin@google.com> Reflect the changes of GetDexOptNeeded in DexFile.java

- add enum for the desired compilation type.
- change getDexOptNeeded signature

Bug: 27189430

(cherry picked from commit 07f02130f64cb00ed255c1d203fc4f9532f1517b)

Change-Id: I66ccff5d5a09ba5bdf4bdbf198216ad3dd058c69
07f02130f64cb00ed255c1d203fc4f9532f1517b 25-Feb-2016 Calin Juravle <calin@google.com> Reflect the changes of GetDexOptNeeded in DexFile.java

- add enum for the desired compilation type.
- change getDexOptNeeded signature

Bug: 27189430
Change-Id: I1d9d886eea478b9803a11b235b05c7a3dbad4808
da3729f76948e5c7ce5eadbdfc03a0f9fe7d4d83 20-Nov-2015 Mathieu Chartier <mathieuc@google.com> Change DexPathList.makeElements to pass elements down to loadDexFile

Need to pass down the temporary DexPathList.Element array so that
app image loading can check for conflicts.

Bug: 22858531

Change-Id: I4f3d85b5e0ad542298fc8458bafe6504c263dc41
70fcc38e7a03f04864499a7356ae1f1e692b7463 12-Nov-2015 Mathieu Chartier <mathieuc@google.com> Pass class loader down to openDexFiles if possible

App image needs the class loader when it gets loaded.

Bug: 22858531
Change-Id: I315919d91822db0c73cf16b21d660d5870d5746f
2f7ca12a42b05999820bd9cce1882beeb109838e 17-Oct-2015 Mathieu Chartier <mathieuc@google.com> Pass dexFile to defineClassNative

defineClassNative will add the dex file into the class loader so that
it stays live. This is done to prevent the dex file being finalized
while classes loaded from it are still alive.

Bug: 22720414
Change-Id: I387c3582e8921ec2ab8435decc16028a741bd474
615e2a347c6993bba30fbdee6b4e858333646f59 26-Sep-2015 Mathieu Chartier <mathieuc@google.com> Keep track of success closing the DexFile

If close is called but does not completely close the DexFile, then we
call close again in the finalizer. This helps to prevent memory
leaks.

Bug: 22720414

Change-Id: I8f30549b73e48a600595ef80e5d1e67628af7ef0
9500bd1ffe150e8836ea649ea356c4d1f3a62018 07-May-2015 Narayan Kamath <narayan@google.com> Remove StaleDexCacheError.

Nobody throws it. This is in preparation for simplifying dex2oat
error handling and ignoring all compiler / verifier errors.

bug: 20888973
Change-Id: I81634ddc07d885b0da0c6c952028ba2032e702c7
3bc9b15f175e640b58cd0926f6e208114a693a30 26-Mar-2015 Richard Uhler <ruhler@google.com> Rename isDexOptNeededInternal and add SELF_PATCHOAT_NEEDED.

Add SELF_PATCHOAT_NEEDED as another possible result of
isDexOptNeededInternal, rename isDexOptNeededInternal to
getDexOptNeeded, and update the docs for it.

Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
25ac148a433feee2972fb01655a3f7ed4956c1f8 26-Feb-2015 Andreas Gampe <agampe@google.com> Libcore: Change DexFile cookie to object

Use an object field instead of long for the cookie.

Change-Id: If3c2b31b9d0914ed1965cfd5e3fdb94ea41b1477
e606e1e9f44853b226caab6fa13c041033a49e09 28-Oct-2014 Brian Carlstrom <bdc@google.com> Improve DexFile debugging

Bug: 18105751

(cherry picked from commit 3f8d941d89f5dd8fff2d6faf705f1841d40c683e)

Change-Id: I445c7f39b728ea6f45f3cb7dd8ed96509cf6f1c5
3f8d941d89f5dd8fff2d6faf705f1841d40c683e 28-Oct-2014 Brian Carlstrom <bdc@google.com> Improve DexFile debugging

Bug: 18105751
Change-Id: I16461b61cb7723ca1f3a52080c377d013d76675b
813579d06877fed67c2c62054213d8efcff6d37b 06-Aug-2014 Calin Juravle <calin@google.com> Use absolute path when opening dex files.

The device always sees absolute paths so this will be no-op but on host
this enables testing with relative paths (which is much more
convenient).

Bug: 16644204
Bug: 16930747

(cherry picked from commit e05ad6f7a1e2e34db62587269a066d479dc8e0ad)

Change-Id: I4855c7ffa1935a777e19f0f9842c0bd837818f07
70a89c0f0274ac033785079673ca690ee056eb59 19-Jul-2014 Alex Light <allight@google.com> Make system use patchoat to relocate during runtime.

Change DexFile.isDexOptNeededInternal to new signature so that we can
determine if we need to run patchoat. Added constants for each of the
different outcomes of isDexOptNeededInternal.

Bug: 15358152

Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
e05ad6f7a1e2e34db62587269a066d479dc8e0ad 06-Aug-2014 Calin Juravle <calin@google.com> Use absolute path when opening dex files.

The device always sees absolute paths so this will be no-op but on host
this enables testing with relative paths (which is much more
convenient).

Bug: 16644204
Change-Id: Ife8d231a8127ff97f8fd97c745c64b435cdddf02
df641c08eb53f4a1cee031ff7ba490535af3ed5d 10-Jul-2014 Calin Juravle <calin@google.com> Use the provided path when opening dex files.

Previously we would use the canonical path.

If the path contains symlinks it may generate the wrong
file name when searching for the containing oat file. This
is because we don't apply any canonicalization when dex
files are generated so we think we're looking for somthing
else.

Bug: 15563230

(cherry picked from commit 71202f8ed84edc6ab57e7b6c26f0a1ec97d5adc6)

Change-Id: If261e2d80e9cbdc6e7750c73b8e6f298e46b009b
71202f8ed84edc6ab57e7b6c26f0a1ec97d5adc6 10-Jul-2014 Calin Juravle <calin@google.com> Use the provided path when opening dex files.

Previously we would use the canonical path.

If the path contains symlinks it may generate the wrong
file name when searching for the containing oat file. This
is because we don't apply any canonicalization when dex
files are generated so we think we're looking for somthing
else.

Bug: 15563230
Change-Id: I5923bdd2520a91019102ef6256d4c97fd5b499df
7889586983533773829441987a768fa826d4cd6a 23-Apr-2014 Narayan Kamath <narayan@google.com> Add an instructionSet argument to isDexOptNeededInternal.

(cherry picked from commit 4adab737c923d0cb2796a51500498e04708f1d1e)

Change-Id: Ic8e37e97e468b42c64d4a5e8631aab532e04115a
4adab737c923d0cb2796a51500498e04708f1d1e 23-Apr-2014 Narayan Kamath <narayan@google.com> Add an instructionSet argument to isDexOptNeededInternal.

Change-Id: I558d8f3564a11639dec0ddad9f67e9f321c28f3b
5d930cadc8f62aee5f18e7921296fe66a54f18ab 24-Apr-2014 Elliott Hughes <enh@google.com> Groundwork towards making the Libcore.os functionality public.

Change-Id: Ie700aa16d91fba53fc5eb2555829cb74d84b12ad
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
6b9829917263ba6ccc8d725d730316bb36c0fc78 05-Feb-2014 Elliott Hughes <enh@google.com> Switch libcore over to a long in DexFile.

Change-Id: I7f259bd14134fc6663047b8a1237b8364f10a51d
6c290d33a3585654db0500dabf5f937985e5b15d 13-Aug-2013 Brian Carlstrom <bdc@google.com> Move support files back with DexClassLoader and PathClassLoader

(cherry-picked from commit ca2c58ceaf2d35d30fe06b1676cc1436a24c4d30)

Bug: 9071417
Change-Id: Id97f12b4a1b1266b1bb21a323a8976f9df3dd0ad
b2525493e0a4d7019b0705fcb1001338737b4d86 13-Aug-2013 Brian Carlstrom <bdc@google.com> Share ClassLoader code

Bug: 9071417
Change-Id: Icdde3aace023d1d7509c932cdd71f203213b59d6
ca2c58ceaf2d35d30fe06b1676cc1436a24c4d30 13-Aug-2013 Brian Carlstrom <bdc@google.com> Share ClassLoader code

Bug: 9071417
Change-Id: Icdde3aace023d1d7509c932cdd71f203213b59d6
895bba44ff59d2225532a1fe9842c8b9a70a9f9a 13-May-2013 Brian Carlstrom <bdc@google.com> Move some files with dalvik dependencies to libdvm

Change-Id: I04498d8d8c4b065dbda8d7b30b8b77ce53e63a77
7cad2d4e4e00bb152b726541b62840708d1cbcb1 20-Jul-2011 Elliott Hughes <enh@google.com> Some of our helpers have moved into libnativehelpers.

(cherry picked from commit 4b5012a6cd5f7f32f33a776c9e2c94ca3f3eb1d5)

Change-Id: I8a154f8b6e39b8ed0a633fab9ba31d557b545bb5
5c7fa7c36acddda7b7cc392ec360116b03e09880 06-Jan-2012 Jesse Wilson <jessewilson@google.com> Refuse to write optimized dex files to a non-private directory.

It's infeasible to test if other applications can write to a
given directory, particularly since directories like /sdcard/
are accessible to named groups like sdcard_rw. Instead we take
a shortcut and just test that the optimized directory is owned
by the current process.

I tested this manually; the '/data/data/vogar.test.java.StatTest/'
app directory could be successfully used but other directories
('/data', '/sdcard', '/') throw exceptions as expected.

Bug: http://b/4609061
Change-Id: Ia72b50aa3c73051b0c03c06c0bc7c0470f76b212
8647680e6a884b504a9f502e0f6a24218fdf675c 22-Mar-2011 Elliott Hughes <enh@google.com> Remove more dead SecurityManager cruft.

(Requires corresponding dalvik change.)

Change-Id: I65cd76ae056d4a1ff5f1a3e168b118a47cf09ff5
24923f9042b142165f7176f1aa44a797145f11a7 10-Feb-2011 Elliott Hughes <enh@google.com> Move more of the system properties handling into managed code.

Bug: 3413364
Change-Id: Ifc9b54255e11fd7df5517b88d8774dd747a7ec3d
be9c142fd80574e5d15571dad2562cd6894e2c81 19-Jan-2011 Andy McFadden <fadden@android.com> Minor doc tweaks.

Bug 3347172.

Change-Id: I9954e6ae929c6e8ef5223ada02012f3909e1204e
fb374e129dc73d4adafc9441ca78011676a26d9f 12-Jan-2011 Carl Shapiro <cshapiro@google.com> Remove method level hiding within hidden classes.

This change also removes braces surrounding a properly placed @hide
annotation.

Change-Id: I8b7b32567068099f9081e7bcb2f30b80b71441f7
8abd4e471456bc479401d652de61de7c9ba85661 15-Dec-2010 Dan Bornstein <danfuzz@android.com> Plumbing for loading byte[]-based dex files.

This is not yet complete. See related change I06af6df3 in the dalvik
project.

Change-Id: Iac4739c0e75bf95e1d5f019e946b8ddb256d3a26
a2dc5f83493ea8f514ff8a8df4c85dcce6093d9f 30-Nov-2010 Andy McFadden <fadden@android.com> Zero the cookie after close.

The cookie values can be re-used by the VM, so zero it out after closing
the DexFile to ensure we don't try to close again in the finalizer.

Bug 3238298

Change-Id: I2cc6a0d90ae9fbdff9c6a0f34a8031f36aa78e70
12f2d8e2760b78c673b7a187b9062b3938a03147 12-Oct-2010 Brian Carlstrom <bdc@google.com> Revised CloseGuard usage pattern

- CloseGuard.get() instants are now "unopened"
- In constructor cases, guard.open("...") is now at the end
- In metod cases, guard.open("...") is now after resource acquisition
- guard null pointer checks in finalizers in case constructor threw exception

Bug: 2645458
Change-Id: Ieb874a8c33b347768a9fa7437b3dd16f3d56d886
f7aab022dcbfcd8f27b409ab92b4bca4a84d0b8a 30-Sep-2010 Brian Carlstrom <bdc@google.com> CloseGuard: finalizers for closeable objects should log complaints

Introducing CloseGuard which warns when resources are implictly
cleaned up by finalizers when an explicit termination method, to use
the Effective Java "Issue 7: Avoid finalizers" terminology, should
have been used by the caller.

libcore classes that can use CloseGuard now do so.

Bug: 3041575
Change-Id: I4a4e3554addaf3075c823feb0a0ff0ad1c1f6196
e2f58c9501eac730d048199906dc41fe8e4cd6e9 29-Sep-2010 Brian Carlstrom <bdc@google.com> Scrub missing calls to super.finalize()

Bug: 3024226
Change-Id: I6642cb9d4929ba72244529efe4ebdfa595ae4fa7
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
d1c610c2a641157df80aa8aefefc49393074f507 22-Mar-2010 Elliott Hughes <enh@google.com> Remove all remaining "@since Android" tags.

I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.

Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
4fefecee9d4a5d2a4510f516b4015607b19e8d09 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
0fb831a410412728d6ee79ff98c465233b0803d0 11-Jul-2009 Andy McFadden <fadden@android.com> Minor class loading optimization.

In internal bug 1836311, the String.replace() in PathLoader.findClass
was identifed by traceview as 6.6% of startup time for an app. This
adds a (hidden) alternative that takes a "binary name" like the
functions in ClassLoader, and we do the slash-to-dot conversion inside
the VM as we convert it to a descriptor. (This is really how it should
have been done in the first place, but now it's part of the visible API
and engraved in stone.)

The original function now does a slash-to-dot conversion and calls the
new one.

(We may want to un-hide the method for the benefit of people writing
custom class loaders. If so, we can do that in a separate API-update
commit.)
adc854b798c1cfe3bfd4c27d68d5cee38ca617da 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1c0fed63c71ddb230f3b304aac12caffbedf2f21 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
fdb2704414a9ed92394ada0d1395e4db86889465 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution