Commit Graph

120 Commits

Author SHA1 Message Date
Eric Holk
37797b2429 Merge "Merge "[startop] Add an app for testing startup performance" am: e563643312 am: 58ed47d87b am: 7192be9d24" into qt-r1-dev-plus-aosp
am: a101392aa6

Change-Id: I2a44e521b8138e7452e936554a3d8887fcc77585
2019-06-19 16:55:56 -07:00
Eric Holk
7192be9d24 Merge "[startop] Add an app for testing startup performance" am: e563643312
am: 58ed47d87b

Change-Id: I2b502a0cf4e0950f44dc80016c9b8a54ee257173
2019-06-19 15:03:36 -07:00
Igor Murashkin
ccc3ea7a57 startop: Add yawanng@ to OWNERS list
Change-Id: Iaee1a3d608593238284c9b07d34d1042538ec612
2019-06-19 19:28:08 +00:00
Eric Holk
e6e17c734a [startop] Add an app for testing startup performance
This CL includes a simple app for testing aspects of startup performance. It
will probably gain new activities as we focus on different parts in
particular. Currently it has an empty activity and an activity that focuses on
layout inflation.

Test: mma, adb install, adb shell start (see README.md for exact commands)
Change-Id: I4e98994f0c25ce61a89d13f86eda2320a1fdcafa
2019-06-18 15:41:11 -07:00
TreeHugger Robot
75336f5e08 Merge "startop: Add script to analyze block I/O from an ftrace file" 2019-06-11 05:35:37 +00:00
TreeHugger Robot
5d88587672 Merge "startop: Parse camera metrics from logcat for app_startup_runner" 2019-06-11 01:10:47 +00:00
Igor Murashkin
ab37e6ec2d startop: Parse camera metrics from logcat for app_startup_runner
Parse ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED_ms,ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED_ms
from logcat when running Camera app.

Also updates the scripts to support multiple metrics output (previously
only one allowed). Adding future per-app metrics is also possible by
just adding 1 file with 1 function call with a regex pattern.

Bug: 132649131
Change-Id: Ibfc620bb156f733b69faa7654b06ef35f1a34de3
2019-06-10 22:20:16 +00:00
Igor Murashkin
0c65d1c5fa startop: Add script to analyze block I/O from an ftrace file
Adds a simple python parser to convert .ftrace file into
sqlite3 database.

The rest of the analysis logic is done through a series of SQL
commands that build tables/views/select queries.

Bug: 134705245
Test: trace_analyzer some_ftrace_file.trace tmp_file.db
Change-Id: I25274e25a0ab1f091ae4e6161e6726e006e346a5
2019-06-10 22:17:13 +00:00
Igor Murashkin
6295fa7339 startop: iorap script to create custom compiled TraceFile
Input: either pinlist.meta or a text file.
Output: either text file or iorap.TraceFile protobuf.

Also supports looking inside zip files to find out entry offset
automatically.

Bug: 132649131
Change-Id: I638fda1bb11899bb6d123b3aaedb518c0b4d1a80
2019-06-10 21:00:44 +00:00
Igor Murashkin
7ab5c4d6e6 startop: Update app_startup_runner to work with iorapd
Script measures app startup times with/without iorapd-based
prefetching against a cold (or warm) baseline.

mlock/fadvise readahead options now use iorapd to exercise
real code to do prefetching.

Bug: 72170747
Change-Id: I28affac3470271e46febb0e22a6dc9543258b4a4
2019-04-24 15:24:25 -07:00
Mathieu Chartier
27ee83dca3 Merge "Disable iorap test mapping"
am: 46b3d6d05d

Change-Id: Ic644f166fee8f74818e03b8ec72cbae1756795bf
2019-04-22 14:01:38 -07:00
Mathieu Chartier
6aaa03ab91 Disable iorap test mapping
Post submit tests are failing, disable the tests for now.

Bug: 123659771
Bug: 72170747
Bug: 130883339
Test: TH

(cherry picked from commit 6565a34d7f)

Merged-In: I17befa52ebad92413122253f692168cf93cbab6e
Change-Id: Ida6c6cb2ee30ebb08c959df83ae05fabb112d9c2
2019-04-22 12:38:00 -07:00
Igor Murashkin
8298ae0039 startop: Add scripts to dump iorap perfetto/compiler protos
Example:
 $> adb pull /data/../iorapd/perfetto_trace.pb
 $> ./dump_trace_pb perfetto_trace.pb

Bug: 72170747
Change-Id: I3901e2c0d8b33ca7a8fa030203180f754514b4ba
2019-04-17 13:56:30 -07:00
TreeHugger Robot
eb0e0c3b3c Merge "iorap: Add a JobService for idle maintenance trace compilations" 2019-04-08 20:31:45 +00:00
Sasha Smundak
7f0a256a78 Merge "Convert Android.mk file to Android.bp"
am: e6bcf626be

Change-Id: I960027bd43c94d6d9908b83a1a13bffab8973549
2019-04-03 11:39:45 -07:00
Sasha Smundak
a0ce095241 Convert Android.mk file to Android.bp
Files failing automerge from AOSP.
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I92f7584aeaf502336f67e04fbc22634784c9305d
Merged-In: I92f7584aeaf502336f67e04fbc22634784c9305d
2019-03-28 15:11:46 -07:00
Sasha Smundak
b61bab6a58 Convert Android.mk file to Android.bp
Files failing automerge from AOSP.
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I92f7584aeaf502336f67e04fbc22634784c9305d
2019-03-26 15:18:41 -07:00
Colin Cross
cd18790959 Merge "Fix ODR issue in viewcompiler" am: b9879d00c4 am: d1e12a6112
am: bf200e78a8

Change-Id: Ib8afbe33ef39a140e8d9855a13aa1296a6b5bd61
2019-03-21 01:44:16 -07:00
Colin Cross
d1e12a6112 Merge "Fix ODR issue in viewcompiler"
am: b9879d00c4

Change-Id: I2fda6bdf7ebc082a732d75d55694d47f5a755fdc
2019-03-21 01:23:40 -07:00
Colin Cross
d7632929ea Fix ODR issue in viewcompiler
libz is already linked as a static library through
libdexfile_static_defaults, don't also link it as a shared library.
Fixes:
=================================================================
==43189==ERROR: AddressSanitizer: odr-violation (0x55d1ed723a60):
[1] size=48 'inflate_copyright' external/zlib/src/inftrees.c:11:12
[2] size=48 'inflate_copyright' external/zlib/src/inftrees.c:11:12
These globals were registered at these points:
[1]:
 #0 0x55d1ed769a0e (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0xf3a0e)
 #1 0x55d1ed991b1b (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0x31bb1b)

[2]:
 #0 0x55d1ed769a0e (/buildbot/src/android/master/out/soong/host/linux-x86/bin/viewcompiler+0xf3a0e)
 #1 0x7f5dff20a09b (/buildbot/src/android/master/out/soong/host/linux-x86/bin/../lib64/libz-host.so+0x3e09b)

Test: m SANITIZE_HOST=address viewcompiler && viewcompiler
Change-Id: I4ebdf7ef4ec1641488fbc25275dbf6aa0cdbe2eb
2019-03-20 21:19:57 -07:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
Xin Li
b455c3a7f3 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08:00
Chih-hung Hsieh
d8b390c88b Merge "Add default code reviewers into OWNERS" am: e45eefe8ec am: 3a59c9f70e
am: f59468295e

Change-Id: I1f5055c6c83f1659b4a75cc4af2008d89c622195
2019-02-06 22:51:55 -08:00
Chih-hung Hsieh
f59468295e Merge "Add default code reviewers into OWNERS" am: e45eefe8ec
am: 3a59c9f70e

Change-Id: I65f8c7aa64ee34388341c6e8687adc3dbdcfa595
2019-02-06 22:42:47 -08:00
Chih-Hung Hsieh
34cd77a651 Add default code reviewers into OWNERS
Bug: 33166666
Test: gerrit uploader
Change-Id: Ief5d4bf9005bb3a712803101f98dd2b876662eb8
2019-02-06 22:19:19 -08:00
Chih-hung Hsieh
fd1dcbde32 Merge "Work around clang-tidy bug in dex_builder.cc." am: c6036971e7 am: 24a986bfb1
am: acd74cfac0

Change-Id: Id213b483d0439dd03f198552d8ca78831347256a
2019-02-06 14:56:37 -08:00
Chih-hung Hsieh
acd74cfac0 Merge "Work around clang-tidy bug in dex_builder.cc." am: c6036971e7
am: 24a986bfb1

Change-Id: Ic46821b9512dc4b73ce153202012984a714649c5
2019-02-06 14:34:50 -08:00
Chih-Hung Hsieh
2b61bddc1a Work around clang-tidy bug in dex_builder.cc.
Bug: 123880763
Test: build with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,
    -google-readability-*,-google-runtime-references,-cppcoreguidelines-*,
    -modernize-*,-llvm-*,-bugprone-narrowing-conversions,
    -misc-non-private-member-variables-in-classes,
    -misc-unused-parameters,-hicpp-*,-fuchsia-*

Change-Id: Ibf80f951ae2369a55570770febe8a1c4422181e1
2019-02-05 17:11:05 -08:00
Chih-Hung Hsieh
eb009eb990 Merge "Temporarily disable clang-tidy for dex_builder.cc." am: 171dfad60c am: e6d84ae4c9
am: 6cb189e322

Change-Id: I65741102dfe0989c82f4244ef4c45954129dd513
2019-02-04 22:17:39 -08:00
Chih-Hung Hsieh
6cb189e322 Merge "Temporarily disable clang-tidy for dex_builder.cc." am: 171dfad60c
am: e6d84ae4c9

Change-Id: I13efd650ad82f46e7c060558809109b72de17047
2019-02-04 21:36:52 -08:00
Chih-Hung Hsieh
7ae7f169fb Temporarily disable clang-tidy for dex_builder.cc.
Bug: 123880763
Test: build with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,
-google-readability-*,-google-runtime-references,-cppcoreguidelines-*,
-modernize-*,-llvm-*,-bugprone-narrowing-conversions,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,-hicpp-*,-fuchsia-*

Change-Id: I7be72b9db232a375bf7caf3b2dbeb9c6f7368a8e
2019-02-04 10:35:55 -08:00
Eric Holk
846b59eafa Merge "[viewcompiler] Support more than 16 registers in invoke instructions" am: f96ebc501e am: 18fa74cbe4
am: 1660db4818

Change-Id: Ie3c443c1cff90d5bbceb4a067963f1009259de7f
2019-02-01 13:32:41 -08:00
Igor Murashkin
f010be4784 iorap: Add a JobService for idle maintenance trace compilations
Add a new JobService which executes every 24 hours during idle
maintenance (idle + plugged in). This does no work itself
other than call into iorapd to begin any arbitrary batch jobs.

In a future system/iorap CL, this functionality will be used to
implement trace compilations (converting multiple perfetto trace
protos into a single trace profile proto).

Bug: 72170747
Test: adb shell cmd jobscheduler run -f android 283673059
Change-Id: I46cfcb4f0fa5cf6a1ef03348e93ea949ca1bd07c
2019-02-01 13:29:34 -08:00
Eric Holk
1660db4818 Merge "[viewcompiler] Support more than 16 registers in invoke instructions" am: f96ebc501e
am: 18fa74cbe4

Change-Id: I2bbe8793d7bf3b1e06ec5576ba250f10a0f9c304
2019-02-01 12:44:32 -08:00
Treehugger Robot
f96ebc501e Merge "[viewcompiler] Support more than 16 registers in invoke instructions" 2019-02-01 18:57:18 +00:00
Eric Holk
baa8e66c0e Merge "[viewcompiler] Add PrecompiledLayoutTest to TEST_MAPPING" am: 1cb64c6a85 am: d8ec417dd6
am: 55398cf19d

Change-Id: I55026e983954f5af3913eaf0a5caa93721ffa796
2019-01-31 19:27:53 -08:00
Eric Holk
55398cf19d Merge "[viewcompiler] Add PrecompiledLayoutTest to TEST_MAPPING" am: 1cb64c6a85
am: d8ec417dd6

Change-Id: I12273695d8318900d325436ebb252b287517c367
2019-01-31 19:17:13 -08:00
Eric Holk
d1b4383660 [viewcompiler] Support more than 16 registers in invoke instructions
This was causing the viewcompiler to crash on deeper layout hierarchies.

We fix this by reserving several scratch registers. When an invoke instruction
uses registers that don't fit in a 4-bit field, we move all of these values into
the scratch registers and use an invoke/range instruction instead. The scratch
registers are all above the highest allocated register, so they are guaranteed
not to clobber meaningful values.

Supporting more registers for invoke also required supporting
register-to-register moves, which some how we'd gotten by without so far.

Finally, to make viewcompiler fail more loudly when things go wrong, many
DCHECKs have been changed to CHECKs.

Bug: 123517491
Test: atest
Change-Id: I9eb7c9bcf1fc7d713e664b331804bdcddafc95a4
2019-01-31 15:15:14 -08:00
Eric Holk
8c933e5a9d [viewcompiler] Add PrecompiledLayoutTest to TEST_MAPPING
PrecompiledLayoutTest makes sure that layouts generated by the viewcompiler are
equivalent to inflating from the resource XML file. We'll want to run these
tests when making changes to the viewcompiler.

Bug: 111895153
Test: atest
Change-Id: Iffa6f0f01c3f43d43feaabd1a5cd36be76650975
2019-01-31 21:22:06 +00:00
Mathieu Chartier
6565a34d7f Disable iorap test mapping
Post submit tests are failing, disable the tests for now.

Bug: 123659771
Bug: 72170747
Test: TH
Change-Id: I17befa52ebad92413122253f692168cf93cbab6e
2019-01-31 09:36:55 -08:00
Mathieu Chartier
40938a5543 iorap: Fix ro.iorapd.enable property naming
Rename from iorapd.enable to ro.iorapd.enable to match init scripts.

This avoids logspam when iorapd is disabled.

Bug: 123637697
Test: reboot and look at logcat
Change-Id: I741071918ba16191890f3fe3de3764013e0e4ee1
2019-01-30 21:04:45 +00:00
Mathieu Chartier
d8695d069d Disable presubmit test until it works with disabled iorap by default
Bug: 123595428
Bug: 72170747
Test: TH

Change-Id: I752e81732a516e56fca6f0df2c5b7cbb1d3214e5
2019-01-30 00:33:07 +00:00
Orion Hodson
f34d9f7354 Merge "startop: use static_lib dependency on libdexfile." am: ff1aa4e49a am: db28e6e8b1
am: 0c024ea711

Change-Id: Iaf750da3c21946f10646a385258094de462a92b1
2019-01-28 21:15:13 -08:00
Orion Hodson
0c024ea711 Merge "startop: use static_lib dependency on libdexfile." am: ff1aa4e49a
am: db28e6e8b1

Change-Id: I64907bda16a8f248a27eb643b6a4621860c30928
2019-01-28 20:54:34 -08:00
Orion Hodson
ca1b80b52e startop: use static_lib dependency on libdexfile.
libdexfile.so is moving to APEX and the external API doesn't include
the features needed for startop.

Bug: 119632407
Test: Builds
Change-Id: I6d33e8737341a508637321921ca732af913827a3
2019-01-28 13:32:37 +00:00
TreeHugger Robot
ecc22e2f0e Merge changes I789db896,I19e91f0f
* changes:
  iorap: Handle binder failures by gracefully attempting to reconnect
  iorap: Update AppLaunchEvent binder calls to use protobuf
2019-01-25 19:10:34 +00:00
Igor Murashkin
9d33ee90ce iorap: Handle binder failures by gracefully attempting to reconnect
Also hide down functionality behind setprops:
* Debug logging (log.tag.ForwardingService VERBOSE)
* Log.wtf instead of crashing (iorapd.forwarding_service.wtf_crash true)
* Don't connect to binder if iorapd is disabled (iorapd.enable true)

The primary benefit of this is that:
a) If iorapd acts funny (or crashes) for any reason, it doesn't take down system server.
b) If developer manually runs 'adb shell stop iorapd', it won't crash
system server, and it doesn't need a restart ('adb shell stop/start') to
re-establish the binder connection.

Reconnections are done by sleeping forever in a 1-second loop.

Bug: 72170747
Test: adb shell stop && adb shell start # and manually set adb shell props
Test: atest system/iorap
Change-Id: I789db8962dc8498b1028639274cd34a0310b84c1
2019-01-24 14:39:49 -08:00
Mathieu Chartier
55d66bb419 Fix OWNERS sorting
Was not alphabetical before.

Test: N/A

Change-Id: I2dcd11076ae1580ca0714747d4b11b808866f72e
2019-01-23 10:15:20 -08:00
Mathieu Chartier
1e3c00cb28 Add mathieuc to OWNERS for startop
Bug: 111397239
Test: n/a
Change-Id: Ib4765833140c8c53806b48e4fcd4a3870931ea5d
2019-01-22 15:39:50 -08:00
Igor Murashkin
e9e439a47c iorap: Update AppLaunchEvent binder calls to use protobuf
* Also makes a minor change to android.os.Intent to allow writing it
into a protobuf without needing an outer field ID. This makes it
directly unserializable into a C++ code-generated protobuf as a root
proto.

Bug: 72170747
Change-Id: I19e91f0f9c5e5a37810a430e9c483e7752af54d7
Test: atest system/iorap
2019-01-22 14:39:06 -08:00