History log of /art/runtime/jit/profile_saver_options.h
Revision Date Author Comments
3105b2767db5fccd09a8dbe812f243c5e207c8a1 04-May-2018 Calin Juravle <calin@google.com> Add new profile saver options: save without jit & profile AOT code

--Xps-save-without-jit-notifications
The hotness for system server code is increased in AOT-ed code. The flow
does not call into JIT and as such notifications are not triggered.
Instead of relying on the JIT system, make use of a simple back off
strategy to save the profile.

--Xps-profile-aot-code
Starts the profile saver even if the oat file is speed compiled.

Test: m test-art-host
boot a device with system server profiling enabled.
Bug: 73313191

(cherry picked from commit b3d1eeed7426570f61a0b0d4be1a2987200311f6)

Merged-In: I4819fdc7b76189027d6e1dc8d049c589deff6d47
Change-Id: I4819fdc7b76189027d6e1dc8d049c589deff6d47
8cf9cb386cd9286d67e879f1ee501ec00d72a4e1 19-Jul-2017 Andreas Gampe <agampe@google.com> ART: Include cleanup

Let clang-format reorder the header includes.

Derived with:

* .clang-format:
BasedOnStyle: Google
IncludeIsMainRegex: '(_test|-inl)?$'

* Steps:
find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup'
git-clang-format -style=file HEAD^
manual inspection
git commit -a --amend

Test: mmma art
Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
885a7133472fd01321cbe545ace9c2acae543bf1 10-Jun-2017 Mathieu Chartier <mathieuc@google.com> Add support for profiling boot class path

Added a runtime option -Xps-profile-boot-class-path that makes the
profile saver take samples for the boot dex files. The motivation is
to use this for improving boot image creation.

Added test case to test 595.

Test: adb shell setprop dalvik.vm.extra-opts "'-Xusejit:false -Xint -Xps-profile-boot-class-path -verbose:profiler'"
Test: Pull profile and look at output
Test: test-art-host
Test: test/run-test --host 595-profile-saving

Bug: 37966211

(cherry picked from commit 08fee9c7db427e90dbe75692e6bc0242643cb3c5)

Change-Id: Id95de103ed14841d9c209946ea7f1c4f6b5d23a5
08fee9c7db427e90dbe75692e6bc0242643cb3c5 10-Jun-2017 Mathieu Chartier <mathieuc@google.com> Add support for profiling boot class path

Added a runtime option -Xps-profile-boot-class-path that makes the
profile saver take samples for the boot dex files. The motivation is
to use this for improving boot image creation.

Added test case to test 595.

Test: adb shell setprop dalvik.vm.extra-opts "'-Xusejit:false -Xint -Xps-profile-boot-class-path -verbose:profiler'"
Test: Pull profile and look at output
Test: test-art-host
Test: test/run-test --host 595-profile-saving

Bug: 37966211

Change-Id: I5c6681f307a7b8bde1cd88ca31578625d0651546
273d11009876bca38065ace9a7743c7eceacbcce 07-Jun-2017 Mathieu Chartier <mathieuc@google.com> Update startup compilation thresholds

This change aims to compile less startup methods to save RAM and
reduce code size. Numbers are from shortly after launching the apps.

Leave cutoff as 1 for high end devices for now. We may want to
revisit that later.

For low ram devices, the cutoff is 256. This regresses startup time
by 1% but saves more RAM. Results:
(odex+vdex) PSS: -25% average
odex size: -42% average
vdex size unchanged
Apps: Gmail, Maps, YouTube, Search

Spreadsheet at go/compilethreshold

Bug: 36457259
Test: test-art-host
Change-Id: I49d157df9379532d8d7a1ea1d844bb4beb195bb2
7b135c80fedea16844892527555b144c64651a65 05-Jun-2017 Mathieu Chartier <mathieuc@google.com> Only compile hot methods

Instead of compiling all startup + hot methods, we now only compile
hot methods. However, the current logic still marks all startup
methods that have a counter greater than hot_method_sample_threshold_
as hot methods. Since hot-startup-method-samples is currently 1,
there is no current behavioral change.

The goal is to increase hot_method_sample_threshold_ in a follow up
CL.

Renamed startup-method-samples to hot-startup-method-samples to
better reflect the new behavior of the option.

Test: test-art-host
Bug: 36457259

Change-Id: I820bdcd4426769d76131b08a8b41f3b7eebfbc23
2e3942ba59ff0d183474aaf3c505aa39cc172ece 02-May-2017 Calin Juravle <calin@google.com> Increase profile saver minimum save period to 40 seconds

We save much more data with the addition of inline caches. Balance
amount of data with save period: save more but less often.
This relies on the assumptions that the number of apps being killed
in less than 40 seconds is actually small.

The 40 seconds number is pulled mostly out of thin air. Some
experiments show that we don't necessarily lose data when increasing
the period. I only looked at file sizes and the number of profile writes
to verify that we get a comparable amount of information between 20 and
40 seconds. (I did not do a delta on the profile content).

The test scenario was:
- clear all profiles
- boot the device and let it settle for 2 minutes
- open maps and navigate to a destination, search for restaurants
- open gmail and send an email
- open playstore and inspect the top charts
- open youtube and play a video
- open docs and write in a document
- all app interaction are kept below 40 seconds
- wait 1 minute to settle any pending saves
- take a bug report and look at profile stats

With 20 seconds: 43 profile writes, summing 1605610 bytes.
With 40 seconds: 35 profile writes, summing 1243217 bytes.

There is the obvious trade-off that apps being killed in less than
40 seconds will not get profiles.

Bug: 36281963
Test: m test-art-host
manual device tests to verify the profile gets saved

(cherry picked from commit 806843aa293d45d88edeccd49eb5d281ff7d844f)

Change-Id: I8108c8fe41616fb14c710f8f015c50ff332d1e6b
806843aa293d45d88edeccd49eb5d281ff7d844f 02-May-2017 Calin Juravle <calin@google.com> Increase profile saver minimum save period to 40 seconds

We save much more data with the addition of inline caches. Balance
amount of data with save period: save more but less often.
This relies on the assumptions that the number of apps being killed
in less than 40 seconds is actually small.

The 40 seconds number is pulled mostly out of thin air. Some
experiments show that we don't necessarily lose data when increasing
the period. I only looked at file sizes and the number of profile writes
to verify that we get a comparable amount of information between 20 and
40 seconds. (I did not do a delta on the profile content).

The test scenario was:
- clear all profiles
- boot the device and let it settle for 2 minutes
- open maps and navigate to a destination, search for restaurants
- open gmail and send an email
- open playstore and inspect the top charts
- open youtube and play a video
- open docs and write in a document
- all app interaction are kept below 40 seconds
- wait 1 minute to settle any pending saves
- take a bug report and look at profile stats

With 20 seconds: 43 profile writes, summing 1605610 bytes.
With 40 seconds: 35 profile writes, summing 1243217 bytes.

There is the obvious trade-off that apps being killed in less than
40 seconds will not get profiles.

Bug: 36281963
Test: m test-art-host
manual device tests to verify the profile gets saved

Change-Id: Iea2e6519c3d23b3d30bdddbbabe7e5cfd1f535ce
9545f6db8b2487ecb940f91c29ce814ec6b1ea25 17-Mar-2017 Calin Juravle <calin@google.com> Accept output profile path from dalvikvm command

Test: run dalvikvm with -Xps-profile-path
Bug: 36032648

Change-Id: I34640afe1cf0e7b192ad082ccde2784faab1ba4c
cbb7ceeda2a35d0dc03a44c0b18c2932da2a72c0 14-Mar-2017 Mathieu Chartier <mathieuc@google.com> Increase resolved classes save delay to 5s

Increase to 5s instead of 2s. 2s is not long enough for some apps
launch slowly with interpret-only filter.

Maps launch avg 10 samples 5s: 1041.5
Maps launch avg 10 samples 2s: 1073.6

Test: mm

Change-Id: I5e73fccf69ba8fcaa9eca035e409467fe3c39951
138dbff9246c89ac9fbe0b086b54fdab3f4451fb 28-Jun-2016 Calin Juravle <calin@google.com> Clean up profiler options

- remove obsolete options
- using ProfileSaverOptions instead of hard-coded values in the profile
saver

Bug: 24698874
Change-Id: I4ff535d29a644d1bd5509844f89615b70a723749
Test: cmdline_parser_test, gtest and run-tests pass.