History log of /frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52a452cf685c56dc6872dbb19e822736484f672f 04-Aug-2017 Calin Juravle <calin@google.com> Record usage information per split

Increase the granularity of usage information to store data on each split
separately.

Now, splits get their own useByOtherApps flag and can be compiled
speed-profile when only the primary apk is loaded by other apps.

Bug: 64124380
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/*

Change-Id: Ibf9e7b9e67db9c6f0f45dc695bce8fbeb7be20ae
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
f1ff36f0f99ebb41d0c7e0f3248506a56998fa3f 22-Jul-2017 Calin Juravle <calin@google.com> Use the class loader context when optimizing secondary dex files

Record the class loader context for secondary dex loads and pass it to
dexopt during compilation.

The class loader context is passed from libcore every time a
BaseDexClassLoader is created and its recorded in the package dex usage
file.

Note that the context may be:
- unknown: if the dex file was not use after the the upgrade and its
context was not yet updated
- unsupported: if any of the class loaders from the loading context is
unsupported (only PathClassLoader and DelegateLastClassLoader are
supported).
- variable: if it changes over time, form one run to another.

In all the above cases the old compilation behavior is preserved for
now.(i.e. the dex file with be compiled with SKIP_SHARED_LIBRARY_CHECK)

Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/
adb shell cmd package compile -f -m quicken ^Csecondary-dex
com.google.android.gms

(cherry picked from commit 3bec94d78b0a66c4fa5cebd851ea33bcc51916b0)

Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
535a4753e313bdc2ae3e8be9f50606b82edcce0c 04-Feb-2017 Calin Juravle <calin@google.com> Record dex files users in the dex-usage list

Add the users of the dex files in the package-dex-usage.list. This will
provide more data on why a package is marked as shared and not optimized
using profiles.

Test: runtest -x .../DexManagerTests.java
users of the dex files are recorded in package-dex-usage.list

Bug: 63778376
Change-Id: I329bc929b17fa0afe1531f3e6879f6160157a787
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
99dd37b3c5262910150ef955d16a33d32da264dd 23-Feb-2017 Calin Juravle <calin@google.com> Update package use info when the app data is updated

- clear usesByOtherApps flag when the package is updated
- delete secondary dex usage data when the app data is destroyed

Test: runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java
Bug: 32871170
Bug: 35381405

Change-Id: I3a249b9e8680e745fa678c7ce61b4ae764078fb9
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
1aa5f88e35734383e66ecd65e82e83d788e18ccb 25-Jan-2017 Calin Juravle <calin@google.com> [PM] Clean up logic for secondary dex oat files

Add logic in DexManager to reconcile secondary dex records with the
actual files on disk. If secondary dex files are moved or removed then
DexManager will remove the generated oat files during the call to
reconcileSecondaryOdex() and update its internal state.

Add 'adb shell cmd package reconcile-secondary-dex packageName' which
will force DexManager to sync its data with the actual secondary dex
files.

Test: devices bots
runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java
adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)

Bug: 32871170

Change-Id: Id2d72dc89995f89cf1ddf79ae4e992afd3f3c127
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java
0318162abcbd07a0472989df43e00e353fac731b 01-Dec-2016 Calin Juravle <calin@google.com> Add logic for recording dex files use on disk

Add PackageDexUsage to handle the I/O operations of dex usage data. It
is responsible to encode, save and load dex

Test: runtest -x .../PackageDexUsageTests.java

Bug: 32871170
Change-Id: I2acc5430080a7e937c798513d8959ab631decfd9
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/PackageDexUsageTests.java