Commit Graph

262 Commits

Author SHA1 Message Date
TreeHugger Robot
78423e42b9 Merge "Revert "iorap-functional-test: Add iorap-functional-test to presubmit."" into rvc-dev 2020-04-30 20:51:20 +00:00
Yan Wang
99ac28c18c Revert "iorap-functional-test: Add iorap-functional-test to presubmit."
This reverts commit e4533f0e3e.

Reason for revert: The tests are very flaky. It prevents the new CLs. It's not flaky when using acloud. Temporarily turn it off before submitting ag/11056503

Bug: 155424393
Change-Id: I5d5ecc3162d6a89a1e86e3dfab91a4af05d9d2d1
2020-04-30 20:51:08 +00:00
TreeHugger Robot
3bc73c27c8 Merge "iorap-functional-test: Add iorap-functional-test to presubmit." into rvc-dev 2020-04-24 00:40:55 +00:00
TreeHugger Robot
23e062deb5 Merge "iorap-functional-test: Add leading 0 to timestamp." into rvc-dev 2020-04-15 21:34:13 +00:00
Yan Wang
12b070b58a iorap-functional-test: Add leading 0 to timestamp.
For example: 100001ms should be 100.001s instead of 100.1s

Bug: 154036462
Test: atest iorap-functional-tests
Change-Id: I9502358539019573af106d9dcec2681ea406598b
2020-04-14 19:52:28 -07:00
TreeHugger Robot
de761b0951 Merge "iorap-functional-test: Import test apks from filegroup." into rvc-dev 2020-04-15 00:20:58 +00:00
Yan Wang
e4533f0e3e iorap-functional-test: Add iorap-functional-test to presubmit.
Bug: 153901665
Test: treehugger
Change-Id: I86c65f0c546fe0aeff16df57c65ad42046fdaf6b
2020-04-14 22:19:59 +00:00
Yan Wang
150c151ca7 startop: Forward the package update event from dexopt service to iorapd.
Bug: 150640692
Test: adb shell cmd package bg-dexopt-job com.google.android.GoogleCamera

Change-Id: Ic51091eb06a460571edfa584437cb18cf31ce815
2020-04-13 14:57:30 -07:00
Yan Wang
fec19c298f iorap-functional-test: Import test apks from filegroup.
Branch ub-ctsshim-dev doesn't include these apks in other dir and
causes dangling symlink.

Bug: 153458255
Test: make
Change-Id: I9efdfe620d06356d6e6f84faf5334382465c681f
2020-04-13 11:16:30 -07:00
TreeHugger Robot
9b2931e973 Merge "dexopt: Add listeners when packages are updated by bg-dexopt" into rvc-dev 2020-04-08 19:48:41 +00:00
Yan Wang
57179c5fb1 iorap_functional_test: Add iorap function test.
Changes:
* Check logcat instead of db to confirm each step.
* Include version invalidation.

Bug: 152443508
Bug: 148936893
Test: atest iorap-functional-tests on cuttlefish.
Change-Id: I27e8fc8705889a04cb6f38295b64a25c1aceb742
2020-04-03 15:36:20 -07:00
Igor Murashkin
87776bdcf0 dexopt: Add listeners when packages are updated by bg-dexopt
The plan is to use it for iorap to purge its traces when a package
is updated.

Bug: 150640692
Test: adb shell cmd package bg-dexopt-job com.google.android.GoogleCamera
Change-Id: I45f4dacc1630c4afd7cf2321371a04f79ef18d9e
2020-04-02 13:56:14 -07:00
Yan Wang
b4b806dd7a Merge "startop: Fix a string format bug in EventSequenceValidator." into rvc-dev 2020-04-01 18:47:30 +00:00
Yan Wang
b5d1353a69 startop: Fix a string format bug in EventSequenceValidator.
Bug: 152725990
Test: Make and run check the log.
Change-Id: Ib56a8f7acadec073946353f8b0a8a4677099b3b2
2020-03-31 13:56:29 -07:00
Igor Murashkin
327c3507bc iorap: Log a message when we reconnect to iorapd after binder death.
Bug: 152322429
Test: stop iorapd && start iorapd
Change-Id: Ie68844f4854b295b195f5e4f71143b18a0170b41
2020-03-27 14:32:46 -07:00
Yan Wang
fd2c39855a DO NOT MERGE: startop: Downgrade EventSequenceValidator to warning.
Downgrade EventSequenceValidator into warnings for rvc-dev since the C++ side
will already handle bad state transitions from ActivityMetricsLogger.

Only for rvc-dev because we'll want to properly fix this for S.

Bug: 152322073
Test: build
Change-Id: Idf7a68436c2d60b123e0e6e58dc098b62aa11e80
2020-03-24 17:44:49 -07:00
Ryan Mitchell
4ea1e42889 Move AssetsProvider to native layer
Querying in the native layer for assets provided through
AssetsProviders does not currently work. This change refactors the
AssetProvider API to return a file descriptor that is read in the
native layer and can bubble up to the java layer.

This change also removes the InputStream API to favor of developers
using memfd_create.

Bug: 142716192
Test: atest ResourceLoaderValuesTest
Change-Id: I1a7eca0994c3b7cc32008d9a72bf91086ff0e816
2020-03-19 18:33:55 -07:00
Ryan Mitchell
c07aa70270 Add ResourcesProvider.loadFromDirectory
This API allows a directory to be loaded as if it was a zipped APK.
This is a substitute for the DirectoryAssetProvider API that
currently does not work in the native layer.

Bug: 142716192
Test: atest FrameworksResourceLoaderTests
Change-Id: Ia13e15653e75b421423dd56f9fe89e183ab4cb9a
2020-03-19 18:33:55 -07:00
TreeHugger Robot
d212fd103f Merge "iorap: Add script to analyze iorap's compiled TraceFile." into rvc-dev 2020-03-03 01:06:01 +00:00
Igor Murashkin
7ed889c071 iorap: Add script to analyze iorap's compiled TraceFile.
Bug: 150492328
Test: ./analyze_prefetch_file.py -i <path-to-compiled-trace-pb>
Change-Id: I7ba956b34f71d43fbb3f475e618ee67fe0c67740
2020-02-28 15:30:51 -08:00
Yan Wang
be178769ad iorap: Increase the JobScheduledEvent#TYPE_MAX to 1.
Fixes system_server crashes at the end of a job (in #onStopJob)
by correcting the MAX type number.


Bug: 148191073
Test: make
Change-Id: I12b0c65a0b3ad7ab3277a94f51fa2e71d323f862
(cherry picked from commit aa1ac93094)
2020-02-28 18:08:46 +00:00
Yan Wang
6411a3353d startop: Fix a bug in iorap functional test.
The prefetching work runs on another process.
Grep everything to workaround it.

Bug: 137403231
Test: atest iorap-functional-tests
Change-Id: Iac1796cb22f0db83ac5ebd78cb40e5cc5ac3a930
(cherry picked from commit 7d76f014eb)
2020-02-28 18:08:24 +00:00
Igor Murashkin
a52f95e589 iorap: Increase timeout from 66sec to 30min for iorap-functional-tests
inode2filename is a bit slower now so it takes a while for the compiler
to finish. Increase timeout to compensate.

Bug: 150462358
Test: atest iorap-functional-tests
Change-Id: If1e017ad3c2c441b96dceadd91eb340fdf24302c
2020-02-28 10:01:59 -08:00
Igor Murashkin
3fc5e2c322 startop: Fix scripts and add --reportfullydrawn
Fixes a bug in the scripts which prevented true cold starts from
happening (it was force-stopping the activity after the dropcaches).

Also adds -rfd/--reportfullydrawn to make rfd parsing optional since
most apps don't have it.

Bug: 150237362
Test: run_app_with_prefetch -r cold
Change-Id: I132bfc3ccd4d96f171ed364ef64387bbf2c78091
2020-02-25 14:30:45 -08:00
TreeHugger Robot
8eb3cbe1ba Merge "Fix functional test for startop." 2020-02-13 22:02:43 +00:00
Yan Wang
86a4934a3f Fix functional test for startop.
* Enable perfetto tracing and readahead for testing.
* Extend time limit for JUnit test to 5min.

Bug: 148936893
Test: run atest iorap-functional-tests on Forrest
Change-Id: Iad2b2201abf7736a9c86e4e5f7c1579eb78b2e23
2020-02-12 22:10:14 +00:00
TreeHugger Robot
524ec05bc6 Merge "startop: Add iorap.stress.memory tool to test system with less RAM" 2020-02-12 02:42:39 +00:00
TreeHugger Robot
7ef11494ea Merge "iorap: Disable iorap integration test temporarily." 2020-02-12 00:55:32 +00:00
Automerger Merge Worker
0b49886dca Merge "Fix clang-tidy performance-faster-string-find warnings" am: 57fb318ca3 am: 7c0f0d3cec am: 40ef6319ca
Change-Id: Id9d31a0c5cf41a0bb4a58326faa79511a1d8cc4a
2020-02-12 00:53:37 +00:00
Igor Murashkin
62416783e0 iorap: Disable iorap integration test temporarily.
It is broken because selinux is broken in cf_x86,
see bug b/149098310.

Disable it until the above bug is resolved or we come up
with a workaround.

Bug: 148765584
Change-Id: If0ac0f6dd04b1aad693405643f133361ad65f4fc
2020-02-11 15:29:33 -08:00
Chih-Hung Hsieh
f2ef6579f2 Fix clang-tidy performance-faster-string-find warnings
Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: I7fd815aa401fbcaff97b772f3ba5d6f1d2034011
2020-02-11 14:27:11 -08:00
Yan Wang
c11581007b Revert "startop: Add iorap functional test to presubmit test."
This reverts commit 7cda47a2d1.

Reason for revert: This test failed frequently for some reason. Disable it to investigate the reason.

Change-Id: I7c9da14396010f4ddf728e5626b8827d471219a8
2020-02-04 23:36:17 +00:00
Yan Wang
7cda47a2d1 startop: Add iorap functional test to presubmit test.
Bug: 144181684
Test: None
Change-Id: I40783d2aba4481da451220f80ae09bfca06e5752
2020-02-03 23:05:27 -08:00
Igor Murashkin
cc2c3f8f2d startop: Add iorap.stress.memory tool to test system with less RAM
iorap.stress.memory <optional:bytecount> will mlock that amount of RAM
with randomly-written values, ensuring we avoid kernel optimizations
such as swap, zram, ksm, etc.

Bug: 137397549
Test: iorap.stress.memory  # and visually inspect VmLck output.
Change-Id: Icf0786b2607a9a8bc7b6d77aa119abfc0249e7e0
2020-02-03 15:45:00 -08:00
TreeHugger Robot
9c01b1398b Merge "startop: Add a function test for iorapd." 2020-01-29 23:44:37 +00:00
Yan Wang
188e637345 startop: Add a function test for iorapd.
Bug: 144181684
Test: atest iorap-functional-tests
Change-Id: Ida3f524003fe6bd386ac22aaa2298f2b6f7e5aa7
2020-01-29 13:39:12 -08:00
Igor Murashkin
2f54a688c8 startop: Update parse_metrics to parse #ReportFullyDrawn
Change-Id: I0b81c6348aadb19500d174b3b7fba8a7be1c88c5
2020-01-27 14:36:31 -08:00
Yan Wang
a93f9e2ddf startop: Fix new comments for ag/9762399 on event sequence validator.
Test: Make
Change-Id: I6a84868a00dfff6f4f4959ed6a6c9ac777a8b68d
2020-01-07 09:48:03 -08:00
TreeHugger Robot
0765d6f0a5 Merge "startop: Add a validator to check the correctness of event sequence." 2020-01-02 19:46:03 +00:00
Yan Wang
faa7aa527e startop: Add a validator to check the correctness of event sequence.
Change-Id: Ic764cfe4f3f98e14e756897d6dcdc8c167d8a728
2020-01-02 10:25:32 -08:00
Jiyong Park
e86e89acff Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ifd6cfc77acf2284804a2f64011c2733b5c222369
(cherry picked from commit bae2e90796)
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-12-11 15:55:33 +09:00
Jeffrey Huang
cb78285b81 Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
Jiyong Park
bae2e90796 Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-11-17 14:05:08 +09:00
Eric Holk
12daf359e7 Add Layout Inflater Interactive Microbenchmark
This allows us to quickly test small changes in layout inflation performance.

TEST: mma &&
      adb install $OUT/system/app/startop_test_app/startop_test_app.apk;
      Run the app
Change-Id: I396157686d1e16ae2a7083a070fe1f622c05b15f
2019-11-15 17:09:02 +00:00
Eric Holk
afb9b08dd8 Refactor interactive microbenchmarks
Replaces the SystemServer Benchmark activity with one that has
several sets of benchmarks grouped into categories. This will make it
easier to add more benchmarks that do not logically fit with the
categories we already have.

This does not remove any of the other benchmark activities, but in a
follow up CL, we should remove those since they are covered by the
Interactive Microbenchmarks activity.

This also does not adjust the non-interactive mode, which should also
happen in a followup.

Change-Id: I1d079362df0d32642525ede5b41779d76a5735ec
2019-11-14 17:29:08 +00:00
Orion Hodson
fdc9134eaf Merge "Adds ToBits helper method to convert instructon opcode enum to bits" am: 97757aa697 am: ddd9e55e20
am: d08a723289

Change-Id: I8027b5ca9d178abde4532c40dea5bd938ead7ece
2019-11-06 03:47:56 -08:00
Orion Hodson
3320ee5cc6 Merge "Switch to slicer DEX opcode definitions" am: c2348fa906 am: 03f0ab51ea
am: ac5fa84383

Change-Id: I9ec1c8a110cc1ba443da47db37f8ca79dae19cab
2019-11-06 00:12:35 -08:00
Orion Hodson
cc8b8ca466 Adds ToBits helper method to convert instructon opcode enum to bits
Bug: 142948359
Test: atest dex-builder-test
Change-Id: Ic1c02e74dd787107c08bd34ca861eee89d6d1423
2019-11-04 16:58:26 +00:00
Orion Hodson
59d07201d9 Switch to slicer DEX opcode definitions
Removes dependency on art/libdexfile and uses equivalent definitions
from the dexter/slicer library.

Bug: 133140750
Bug: 142948359
Test: m
Test: atest dex-builder-test \
            view-compiler-tests \
            android.view.cts.PrecompiledLayoutTest
Change-Id: I49562ac4867254ecde287b828f76d23cb5132dd0
2019-11-01 11:38:56 +00:00
David Sehr
8fcf8f468e Add initialization check benchmark
Add a benchmark to test the cost of initialization checks.  The
application run with JIT versus AOT shows the cost of initialization
checks of other classes.

Bug: none
Test: run the test, compile, run the test again
Change-Id: Ic15d872e2284084e003056849453150fb533ca81
2019-10-23 15:12:02 -07:00