summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2022-04-11 16:16:42 +0100
committer Martin Stjernholm <mast@google.com> 2022-04-12 12:31:40 +0000
commit53258d07c179d8530adcf8c73848e114830c913c (patch)
treeb9f27ae20197213e20d5af09c257eab93adaff45 /runtime/class_table.cc
parent81db82ce99432bdd92baa84588356418c79e2007 (diff)
Fix dex file lookup in DumpInfo when dex file locations have full paths.
If `profman --dump-info` is used together with --apk (rather than --apk-fd and --dex-location), the dex file locations returned by DexFile.GetLocation may include full paths like "system_ext/priv-app/SystemUI/SystemUI.apk", which don't match base keys like "SystemUI.apk" used in DexFileData.profile_key. The result is that --dump-info dumps methods and classes by ids rather than pretty printed names. This replicates how dex files are looked up in FindDexDataUsingAnnotations used by GetClassesAndMethods, used by `profman --dump-classes-and-methods` which works fine. Also adopt the use of ChecksumMatch from there. Test: adb root adb shell kill -SIGUSR1 '$(pidof com.android.systemui)' && \ sleep 1 && \ adb shell pm compile -m speed-profile com.android.systemui adb shell profman --dump-only \ --profile-file=data/misc/profiles/ref/com.android.systemui/primary.prof \ --apk=system_ext/priv-app/SystemUI/SystemUI.apk verify that the output shows nice method and class names Change-Id: Ib383d2cc24ddbca0bc6bfb0c7419475c68e4b387
Diffstat (limited to 'runtime/class_table.cc')
0 files changed, 0 insertions, 0 deletions