272 Commits

Author SHA1 Message Date
Alexander Dorokhine
e52360b58f Merge "Migrate away from deprecated Truth APIs." am: b65c13a7b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1457153

Change-Id: I88e2dabdafb941a4f8bab694b3f515fb1d23d7e6
2020-10-13 19:39:20 +00:00
Alexander Dorokhine
6fbec140f2 Migrate away from deprecated Truth APIs.
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.

Bug: 168765701
Test: m checkbuild
Exempt-From-Owner-Approval: Cherry-pick of no-op refactor into another branch
Merged-In: I26ab5ab82bb939bbd9553c05387ac8641eb468b4
Change-Id: I26ab5ab82bb939bbd9553c05387ac8641eb468b4
(cherry picked from commit 4697f76edd28cc9363c5ca099a6f9c311c1aee50)
2020-10-13 11:45:45 -07:00
Xin Li
986e6eeddf Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
yawanng
aeec6c8ff5 IorapForwardingService: Suppress error log
Bug: 160381575
Test: make
Change-Id: Iee7506205edc2863c76d0dae0568297565def3df
2020-08-19 19:50:09 +00:00
Orion Hodson
11f0a179d7 Merge changes from topic "art-owners-update" am: 6066f5dae1 am: 74ad7baf85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382418

Change-Id: Id5cf529e4f525ee3f4e7779ae155c54741a389c3
2020-08-04 14:02:49 +00:00
Orion Hodson
432dd133d1 Update startop OWNERS file
Test: build/make/tools/checkowners.py -c -v frameworks/base/startop/OWNERS
Change-Id: I5ed92452adea4d349843b5eb7ec199117c6a2a59
2020-08-04 08:02:04 +00:00
Igor Murashkin
8ed7ff9d36 startop: Add yawanng@ to OWNERS list
Test: build/make/tools/checkowners.py -c -v frameworks/base/startop/OWNERS

Change-Id: Iaee1a3d608593238284c9b07d34d1042538ec612
Merged-In: Iaee1a3d608593238284c9b07d34d1042538ec612
(cherry picked from commit ccc3ea7a57eb4b81f42294907a2d00313b704c2f)
2020-07-29 20:22:59 +01:00
yawanng
edd2c90631 EventSequenceValidator: Only record the debug log in debugging level.
The stack trace log may confuse other developers and mistakenly points
to IORap as the bug cause.

cherry-pick from ef5e1a6dbee8c7b2db4f150ea9463a8523a207ec

Bug: 161145462
Test: Make and check the logcat.
Merged-In: I3cb24cace060cff381ab3c5770ff6c1c948a2d89
Change-Id: I3cb24cace060cff381ab3c5770ff6c1c948a2d89
2020-07-19 11:55:16 -07:00
yawanng
dce293b64a DO NOT MERGE: EventSequenceValidator: downgrade the log level.
This class is for sanity check only, downgrade the log level.

Bug: 159947779
Test: Make and check the logcat.
Change-Id: I0c9c125c0208849252db4992dfd4860750a104f8
2020-06-26 16:37:57 +00:00
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 e4533f0e3e163812acc9fa292367a937100a4ee7.

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 aa1ac9309416519dab21a17b8632645860e1431b)
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 7d76f014eb92661f4fb8fdb949ac000ffdce3c65)
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 7cda47a2d1c9a50fee547645ead90559fadc7450.

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