Commit Graph

244 Commits

Author SHA1 Message Date
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
David Sehr
ac51da9c4e Separate CPU intensive test from system server
Separate into two activities, as they are unrelated.

Bug: none
Test: run the applications
Change-Id: I390c1351d5e9c3ecdd0b863b7aceac03e735ff58
2019-10-23 10:08:25 -07:00
Yan Wang
54658c9995 startop: Change the ino from decimal to hex in test and an import mistake.
Bug: 142958901
Test: pytest
Change-Id: If9870541561c4099cd255efe0afb66a6e5e02cd0
2019-10-18 13:46:01 -07:00
Yan Wang
d8f8b66585 startop: Fix a compiler type mismatch in test.
Bug: 142958901
Test: pytest
Change-Id: Ifa0b0f85464447a5d50495d35276581176380d90
2019-10-18 13:34:56 -07:00
TreeHugger Robot
41a5cd6f38 Merge "iorap: Add tests for AppLaunchEvent." 2019-10-16 20:14:19 +00:00
TreeHugger Robot
0b77cb9903 Merge "Add more system server benchmarks" 2019-10-16 09:05:25 +00:00
TreeHugger Robot
6bc75fcbce Merge changes from topic "reportFullyDrawn"
* changes:
  startop: Add reportFullyDrawn event support in Iorap.
  startop: Add timestamps for IntentStarted and ActivityLaunchFinished.
  startop: Add reportFullyDrawn event support in framework.
2019-10-16 06:15:26 +00:00
Yan Wang
35a4e64df2 iorap: Add tests for AppLaunchEvent.
Test: atest -m libiorap-java-tests
Change-Id: Ib8618dbb3ebd610fe6f68ff40b8886dc1a32f3dd
2019-10-14 12:24:41 -07:00
Eric Holk
6531bc9c7b Add more system server benchmarks
This change adds some of the top binder calls from AppOpsManager, UserManager,
and ConnectivityManager.

Change-Id: I8c87a5d58d68b962927c4886c1bba90f3976d587
2019-10-14 12:01:30 -07:00
Eric Holk
1017c9c2ec Add acquire/release wake lock benchmark
Change-Id: Iae151d18a80f5acfdd205d9af1d2ee677153b8db
2019-10-11 17:12:24 -07:00
Eric Holk
3e4452b275 Add getPackageIntentForSender benchmark
ActivityManagerService.getPackageForIntentSender is the second most common
binder transaction during an MPTS run.

Change-Id: I628857d9f323102db3d66da0311f36554cbd797b
2019-10-11 16:42:31 -07:00
Eric Holk
c62b083fc8 Add non-interactive system server benchmarks
This allows benchmarking system server when not sitting at the device. To use
it, launch the NonInteractiveSystemServerBenchmarkActivity and then wait awhile.

The benchmark results will be available at
/sdcard/Android/data/com.android.startop.test/files/benchmark.csv

Change-Id: If7697657228f6e631846fdb79a5a5acfdaf7fe65
2019-10-11 16:10:56 -07:00
Eric Holk
77743f31c8 Refactor system server benchmarks
This change does a better job of separating the UI code from the benchmark
running code, with the goal of enabling a non-interactive version of the
benchmarks.

Change-Id: Id7a673b9abca69cd9643a487f7b05f965e1f2614
2019-10-11 16:10:48 -07:00
Yan Wang
722d6be12f startop: Add reportFullyDrawn event support in Iorap.
Bug: 137684347
Test: make
Test: run on a crosshatch device and check the reportFullyDrawn event in
the logcat.

Change-Id: Ib8373ecfa1d3579c937242d30cea1ce1396ba632
2019-10-10 16:04:10 -07:00
TreeHugger Robot
bc28861d58 Merge "startop: Only do perfetto trace when needed." 2019-10-10 02:09:34 +00:00
Yan Wang
7c76fcacce startop: Only do perfetto trace when needed.
Bug: 141324324
Test: python app_startup_runner.py  --package com.google.android.GoogleCamera  --readahead fadvise --inodes ../tmp.txt   -d
Test: python app_startup_runner.py  --package com.google.android.GoogleCamera  --readahead cold --inodes ../tmp.txt   -d
Change-Id: Icbf9e253cd3cf9517dca89c8d50efd21012105a9
2019-10-09 17:08:21 -07:00
Yan Wang
87d025efe3 startop: Change the pattern to find the completion of readahead.
The pattern is shown in logcat and should match the text in iorap.

Test: python app_startup_runner.py  --package com.google.android.GoogleCamera  --readahead fadvise --inodes ../tmp.txt   -d
Bug: 142350683
Change-Id: Ia708ea8d29f4c97126e9e721284a0d346e19573b
2019-10-09 16:26:30 -07:00
Eric Holk
4a8970e861 Merge "Refactor DexViewBuilder" am: f5617abe09 am: 0ea5d04aff am: 75f7f68128
am: 17a198c638

Change-Id: I1bb9f0d43a6a3e8324dffe4f905404ca8c453bb4
2019-09-25 10:58:55 -07:00
Treehugger Robot
f5617abe09 Merge "Refactor DexViewBuilder" 2019-09-25 16:57:37 +00:00