4 Commits

Author SHA1 Message Date
Igor Murashkin
973a2dcd6a startop: app_startup script fixes for youtube/chrome
Fix remote_pkill function to work on multiple pids,
this was breaking chrome (which has 3 pids).

Fix activity inference to the "$pkg/$activity"
pattern where previously it could accidentally parse
the wrong token.

Fix app launching to handle activities with '$' in
the name which adb shell treated as a variable.

Test: manual
Change-Id: Ifc9a72f1b9bb5e1416c7602f27f4614efd003849
2018-09-14 16:27:53 -07:00
Igor Murashkin
b622e783ca startop: Make app_startup_runner.py --compiler-filter force compilation
Adds a new script which is used by app_startup_runner.py and
run_app_with_prefetch in order to force the compilation filter.

Example:

  $> ./query_compiler_filter.py --package com.google.android.calculator
  speed-profile unknown arm64

(For example compiling to speed is extremely slow, compiling to
speed-profile is just marginally slow.)

Matching the compiler filter with what we actually need to measure is
extremely important as the performance will vary greatly.

Change-Id: I78ae76504208a672a7d17bab5001d11ab796d9d4
2018-09-13 18:19:26 -07:00
Igor Murashkin
45087deef4 startop: Add script to force dex2oat compilation filter for app
Example: ./force_compiler_filter --package com.google.android.apps.maps --compiler-filter speed-profile

Run the app just slightly enough to fully start up, then force it to
dump the profile and recompile the application with dex2oat under the
speed-profile filter.

(Also supports any other compilation filter such as quicken, speed,
etc).

Subsequently, this command can be used to manually validate that the
compiler filter was indeed changed:

 $ adb shell dumpsys package com.google.android.apps.maps | grep -A10 "Dexopt state"
 Dexopt state:
   [com.google.android.apps.maps]
     path: /data/app/com.google.android.apps.maps-D7s8PLidqqEq7Jc7UH_a5A==/base.apk
       arm64: [status=speed-profile] [reason=unknown]

Test: Manual (see above)
Change-Id: Iea6067f90dc287d1de651d1ab36df69d23b2e9c1
2018-09-13 13:56:58 -07:00
Igor Murashkin
25f394d681 startop: Add app startup measuring scripts
Test: python3 app_startup_runner_test.py
Change-Id: I4a3d0751ff4e3d74ea2937655cbafa5758e2ee1f
2018-09-11 16:43:22 -07:00