Commit Graph

215 Commits

Author SHA1 Message Date
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
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
Steven Moreland
400c091a44 Merge "Host users of libutils trace use libcutils." am: 4a17a712f5 am: 330c15e273 am: fb59c94709
am: c1e240aa7a

Change-Id: I507ef7554513ad0221b6fa95b2854c9066e8f9f3
2019-09-23 09:57:00 -07:00
Steven Moreland
598bda8624 Host users of libutils trace use libcutils.
Reducing device/host differences. This is now required since libutils
Trace.h always calls the libcutils functions, instead of before where
it only called these functions on device.

Bug: 124524556
Test: build & boot
Change-Id: Ic096ed7caf8ca59292b3427a16c4e2545d12dfd9
2019-09-20 11:27:59 -07:00
David Sehr
decc2b716d Add a threaded CPU-intensive benchmark to test
In order to understand how simpleperf reports percentages from a whole
system, craft a benchmark set that runs a CPU-intensive thread a number
of times.

Bug: none
Test: run the app
Change-Id: I7c8748f9b5da89be20775a5af60b223d4673023b
2019-09-20 15:32:50 +00:00
Eric Holk
5c6a1a516b Refactor DexViewBuilder
The code was previously pretty messy and hard to follow. This reworks some
things to make it more manageable. Among the changes:

* Pull out fragments of code into their own method, so the high level steps are
  more apparent in methods like DexViewBuilder::Start.
* Pull frequently used types into global constants in dex_layout_compiler.cc.
* Rework register handling to track liveness so a strict stack discipline is no
  longer needed.

Change-Id: Idb4b41f88c96a1ac4efb2c7b9bed05c2de0da999
2019-09-18 17:04:50 -07:00
TreeHugger Robot
eae6b54054 Merge "Add more system_server benchmarks" 2019-09-18 00:17:18 +00:00
Eric Holk
e5cdca764b Make Startop Test App run on O and higher
Change-Id: I60af3e06680aa9d3473be11f8d93447166e5fe71
2019-09-12 10:39:17 -07:00
Yan Wang
90c2b028dc startop: Fix the if condition to prevent duplicate filename for file id
0 in host compiler.

Test: pytest
Bug: 140655545
Change-Id: I952db4cf06060483cfcf8e42352324ad0d710d3b
2019-09-11 14:08:24 -07:00
TreeHugger Robot
f242babff2 Merge changes I3e6b6b44,I467e4264
* changes:
  Run system_server benchmarks for 5 seconds
  Add additional system_server benchmarks
2019-09-11 01:20:40 +00:00
TreeHugger Robot
9c06a0f55a Merge "Initial system server benchmark activity" 2019-09-10 23:11:33 +00:00
Eric Holk
c2d4071b2a Add more system_server benchmarks
This CL adds:
* getLaunchIntentForPackage
* getPackagesForUid
* getPackageUid
* checkPermission
* checkSignatures
* queryBroadcastReceivers
* hasSystemFeature
* resolveService
* getRunningAppProcesses

Bug: 140743821
Change-Id: I61118f29ee4b4113b6d0f9b95458de3798bc4ce7
2019-09-10 15:20:35 -07:00
Eric Holk
4777ee0621 Run system_server benchmarks for 5 seconds
Especially for short running methods, this gives us better results and also
gives us more data for things like simpleperf to work on.

Since we don't know ahead of time how many times each benchmark will run, we had
to switch the mean and standard deviation formulas to one that supports running
updates. This has the advantage of making it constant space.

Bug: 140743821
Change-Id: I3e6b6b44d3bd573bad8afc8831226194147b108a
2019-09-10 14:22:12 -07:00
Yan Wang
75015c32eb startop: add compiler type support to host and device switch.
When using device, the python modules for host are not loaded to be
compatiable in tradefed.

Test: pytest
Test: python app_startup_runner.py --package com.google.android.GoogleCamera --readahead fadvise --inodes textcache --output output.txt -lc 1 -d

Change-Id: I9fe54045fbabda5f66ebe1cfe6d0a5461fff0640
2019-09-10 11:47:23 -07:00
Eric Holk
13926c385c Add additional system_server benchmarks
This CL adds benchmarks for the following PackageManager APIs:
* getInstalledApplications
* getInstalledPackages
* getPackageInfo
* getApplicationInfo
* getResourcesForApplication
* getActivityInfo

Bug: 140743821
Change-Id: I467e4264a5e8f5c1c34194c7ad4b4c415387da9e
2019-09-10 09:46:08 -07:00
Eric Holk
aec05a2cdd Initial system server benchmark activity
This adds a simple activity to the Startop Test App for non-scientific
interactive benchmark running for system_server APIs.

Bug: 140743821
Change-Id: I5485152bde4a791035c71d7b3f23e8cff9649292
2019-09-09 15:53:29 -07:00
TreeHugger Robot
17d2f38b5f Merge "[view compiler] Add test coverage for layouts compiled from APK" 2019-09-05 19:28:04 +00:00
TreeHugger Robot
924fdc625b Merge "iorap: Fix data race in AppLaunchObserver on the binder remote" 2019-09-05 18:24:46 +00:00
Eric Holk
06a213820d [view compiler] Add test coverage for layouts compiled from APK
The existing LayoutCompilerTest only covered compiled layouts generated from
text XML files. It did not cover layouts that were extracted from the APK. This
is an important area to cover.

This test works by calling `pm compile --compile-layouts` on the test APK, and
then directly loads the `compiled_view.dex` file. From there, it pulls out the
compiled layouts and executes their inflater. This makes sure the generated DEX
files validate and execute without error.

Bug: 111895153
Merged-In: Ifc6719c2f438474b5474def02422ef68eee800b2
Change-Id: I7024069bb4d77a81871366f259fb34ae54a55aac
2019-09-05 11:20:05 -07:00
Yan Wang
ab89ecbc82 startop: Fix comments in gerrit CL 9172239.
Test: pytest
Change-Id: I706730c8d54e575e26ff0e2bdbb668d2e70a5c2e
2019-09-03 11:18:15 -07:00
Igor Murashkin
325bccfea5 iorap: Fix data race in AppLaunchObserver on the binder remote
Bug: 139545079
Change-Id: I2797a5fe098a2a7a81f0b5928844e8a61cc6bb96
2019-09-03 09:59:17 -07:00
Eric Holk
960a1a4bc9 [view compiler] Add test coverage for layouts compiled from APK
The existing LayoutCompilerTest only covered compiled layouts generated from
text XML files. It did not cover layouts that were extracted from the APK. This
is an important area to cover.

This test works by calling `pm compile --compile-layouts` on the test APK, and
then directly loads the `compiled_view.dex` file. From there, it pulls out the
compiled layouts and executes their inflater. This makes sure the generated DEX
files validate and execute without error.

Bug: 111895153
Change-Id: Ifc6719c2f438474b5474def02422ef68eee800b2
2019-08-28 13:59:40 -07:00
Yan Wang
2ae4f03578 startop: Change trace duration in compiler.py to timedelta.
The time in timestamp is second, while the trace duration is
millisecond. Using timedelta to fix this ambiguity.

Test: pytest compiler_test.py
Change-Id: I6c445c3dac1b60aec77ead14df021b8a2dda7b5e
2019-08-08 18:34:36 -07:00
Eric Holk
363eab80b2 Merge "[view compiler] Remove dex_builder_test.cc" am: 63f6a62163 am: 130c3cc2b1 am: 08c3ae702a am: f28ef60b1e
am: f5bf3d19b0

Change-Id: I951eeb726c6906f4d88f91316b688e6853100927
2019-08-05 10:54:23 -07:00
Eric Holk
130c3cc2b1 Merge "[view compiler] Remove dex_builder_test.cc"
am: 63f6a62163

Change-Id: Ib73ed6f1fee41358eabe4b93fd99fe96339c205d
2019-08-05 10:06:15 -07:00
Eric Holk
e167823f12 [view compiler] Remove dex_builder_test.cc
This test is problematic because it links against libdexfile and we would like
to remove this dependency. All of the functionality covered by this test is also
tested more thoroughly by the on-device dex-builder-test, so there's no reason
to test it here as well.

Change-Id: Ie45d4a1c99668b68476168fc072a220fa5db3695
2019-08-02 09:32:02 -07:00
Eric Holk
f810ad659e Merge "[view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag" am: 94d801a515 am: f6b04a5e3b am: 19c844d26a am: 89bdbbea18
am: c1af399b0d

Change-Id: I5e7504349c1d6974667d4d5b8635343e233b8afc
2019-08-01 09:24:11 -07:00
TreeHugger Robot
e001e5fd8d Merge "startop: Add support for trace duration." 2019-08-01 00:40:35 +00:00
Eric Holk
f6b04a5e3b Merge "[view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag"
am: 94d801a515

Change-Id: I19439c000c8372db0ee3f68f904d9ebe84c74a06
2019-07-31 16:24:46 -07:00
Treehugger Robot
94d801a515 Merge "[view compiler] Cleanup: Delete duplicate LayoutValidationVisitor::VisitStartTag" 2019-07-31 22:03:46 +00:00
Yan Wang
6ddab32f68 startop: Add support for trace duration.
Test: pytest app_startup/
Bug: 138233470
Change-Id: Ic8e99b369d3385015d7c86624a61bb6d5e8fdc70
2019-07-31 14:38:40 -07:00