OSDN Git Service

Record foreign dex files loaded by the app in the profile
authorCalin Juravle <calin@google.com>
Wed, 24 Feb 2016 10:13:09 +0000 (10:13 +0000)
committerCalin Juravle <calin@google.com>
Wed, 2 Mar 2016 13:04:21 +0000 (13:04 +0000)
commitc90bc92bc577020ff4d3caced4cee1cdf41fa5de
tree1a10edfaecfe09cb07b61857a4e22a50cda04047
parentf9f3c5b0ebacbfed59af9c5c81fe9752e6b1258c
Record foreign dex files loaded by the app in the profile

A foreign dex file is a file which is not owned by the app
(it's not part of its code paths or its private data directory).

When such a dex file is loaded by the app, the runtime will record
a marker in a dedicated profile folder (foreing_dex_profile_path).
The marker is just a file named after the canonical location of the
dex file where '/' is replaced by '@'.

The markers will be used by the system server system server to
decide if the apk should be fully or profile guide compiled.

Bug: 27334750
Bug: 26080105

(cherry picked from commit 86a9ebe4197e963249ffbbaa1830da97ed642fa5)

Change-Id: I8be1fd4d854fa1e23c3c1054c9c083ad7b27317b
13 files changed:
runtime/jit/jit.cc
runtime/jit/jit.h
runtime/jit/profile_saver.cc
runtime/jit/profile_saver.h
runtime/native/dalvik_system_VMRuntime.cc
runtime/oat_file_manager.cc
runtime/runtime.cc
runtime/runtime.h
test/577-profile-foreign-dex/expected.txt [new file with mode: 0644]
test/577-profile-foreign-dex/info.txt [new file with mode: 0644]
test/577-profile-foreign-dex/run [new file with mode: 0644]
test/577-profile-foreign-dex/src-ex/OtherDex.java [new file with mode: 0644]
test/577-profile-foreign-dex/src/Main.java [new file with mode: 0644]