Commit Graph

27 Commits

Author SHA1 Message Date
Steven Moreland
0c697ee37f Revert "preloaded-classes: remove core HIDL libs"
This reverts commit 766b425c27.

Appears to be the cause of a 14ms regression in wifi startup time in system server that could be offset here (and potentially other places) by keeping the preload in zygote. A local trial of five showed this revert to take it 111.2ms -> 108ms. The variance is likely too high for this to be significant, however, logically, in the short term, these libraries are being used, and so preloading makes sense. I'll leave further changes to this list to the owners of this list.

Test: boot walleye 5 times w/ and w/o this test, and find small gain in reverting this.
Reason for revert: b/115771598

Change-Id: Ia53dbe8b70900d6f04011b15cbdddf786378fc3b
2018-09-17 18:11:02 +00:00
Steven Moreland
766b425c27 preloaded-classes: remove core HIDL libs
These are being removed from boot jars.

Test: (sanity) boot device, no longer see 'Class not found for preloading'
Bug: 77307025
Change-Id: I854d3397ff362495ff392c2c4ea8594d1b2449bd
2018-09-12 09:17:53 -07:00
Neil Fuller
6f358b1947 Track rename of org.kxml to com.android.org.kxml
Update preloaded-classes to track libcore class renames.

The class renames may have caused a regression in some
performance metrics, though overall boot time was unaffected.
This is probably because the first user is now paying the cost
of the class initialization and that happens to be in the affected
metrics. There's no reason not to update the preloaded-classes.

Metrics affected:
SystemServerTiming_StartUsageService_avg
SystemServerTiming_StartJobScheduler_avg
SystemServerTiming_StartJobScheduler_avg

Test: build only
Bug: 111055375
Bug: 112595254
Change-Id: If1697918046ec7f186c095eaf68864d075989b9c
2018-08-15 10:40:47 +01:00
Chad Brubaker
fd707f670c Do not preload NoPreloadHolder classes
These classes cannot be statically preloaded in Zygote.

Change-Id: I7d9f10e634409bedfdd71f8daa43b8e23516638e
Fixes: 109652611
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testCaCertManagement
2018-06-07 11:51:06 -07:00
Calin Juravle
a9c8b17acf Remove sun.nio.fs.UnixChannelFactory from preloaded-classes
The tests use the preloaded classes to create the core image and
that leads to UnixChannelFactory being initialized despite the
fact that FileDescriptor is not. This manifests with a null pointer
crash in tests.

Bug: 80495283
Test: m test-art-host
Change-Id: I785104e6c69c605b16357a9557b203b489972261
2018-06-06 06:13:39 -07:00
Calin Juravle
4a054198d9 Update the boot image profile and preloaded classes
Data aggregated across 41 dogfood profiles from 10 different
(builds,devices). The threshold for preloaded_classes was 5.

What has changed:
preloaded_classes:  643 added, 1 removed
boot image profile: ~10k  methods and classes added.

Test: m, build & boot
Bug: 73313191
Change-Id: Ic2662255081a5166180f4eb894d75b2e5bd76950
2018-05-30 16:31:01 -07:00
Mathieu Chartier
6ea19ebe05 Update boot image profile and preloaded classes
Data obtained from dogfood device.

Also updated system server profile.

Bug: 73313191
Test: make and flash sailfish

Change-Id: I9cf059f177a10e940e7cda1d12a8ed7429019c3c
2018-05-13 23:56:35 -07:00
John Reck
9d8d99de97 Rename HardwareLayer -> TextureLayer
Update name to reflect meaning/usage

Change-Id: Iddb3621cbca147f96faa83380867baa49c382aab
Fixes: 20461288
Test: builds & boots
2018-02-21 15:55:58 -08:00
Christine Franks
5397f0353a Rename NightDisplayController and -Service
Bug: 68258004
Test: make -j100 && runtest -x
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
&& runtest -c com.android.server.ColorDisplayServiceTest
frameworks-services
Change-Id: I2b89942bd412e4d6958e65b62bc345fb1e60176f
2017-11-08 10:29:01 -08:00
Kurt Nelson
1bb93bf77c Structure StrictMode violations as Throwables
All violations of StrictMode now inherit from one central Violation
class. This unlocks adding penaltyCallback(Violation).
Parsing strings is no longer required to infer what type of violation
something is.
Violation classes have no need to be loaded in Zygote as only developers
opt-in to this feature and will see violations.

Cross-binder thread violation perf test:
before
2872331
2574093
2481208
after
1938227
1742714
2654538

Bug: 64258734
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
Change-Id: I1971feb03ff77cf297c940cacee62fadb5b8422c
2017-11-03 11:14:30 -07:00
Andreas Gampe
6e7768a274 Merge "Frameworks: Move Log holder to be preloaded" into oc-mr1-dev am: 1a17bfa25c
am: fd31b789f9

Change-Id: Ie6e2671e6ecd53e24cf8a2438ce032ecb0af012b
2017-09-28 15:33:25 +00:00
Andreas Gampe
fd31b789f9 Merge "Frameworks: Move Log holder to be preloaded" into oc-mr1-dev
am: 1a17bfa25c

Change-Id: I108472693a5ce73cec529b354e65b1eeed6ee151
2017-09-28 15:25:50 +00:00
Andreas Gampe
61a3e8c23a Frameworks: Move Log holder to be preloaded
To avoid issues with late initialization, let the holder be
initialized in the zygote.

Bug: 65927416
Test: m
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
2017-09-27 15:34:01 -07:00
Sunny Goyal
5b15392c9a Simplifying writeToParcel for various actions
> Using helper methods when writing and reading typed objects
> Moving the tag write outside the action, as it is read outside
  the action as well
> Removing usused tags

Test: am instrument -w -e class android.widget.RemoteViewsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 65574108
Change-Id: Iaf51cae6ef9f82b70dc1f19c2f019af40c4424a2
2017-09-27 08:52:30 -07:00
Victor Chang
e98252d2d7 Merge "Remove StructGroupSourceReq" into oc-mr1-dev-plus-aosp
am: ea8a114743

Change-Id: Ie44da7ca28665a0769da7a1d7231d02cf4942c5d
2017-09-21 01:43:19 +00:00
Victor Chang
ea8a114743 Merge "Remove StructGroupSourceReq" into oc-mr1-dev-plus-aosp 2017-09-20 09:33:23 +00:00
Christine Franks
0321346f38 Handle night display state when timezone changes
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London

Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
(cherry picked from commit 2ce862c3ed)
2017-09-20 03:35:49 +00:00
Christine Franks
1276f357d3 Merge "Handle night display state when timezone changes" into oc-mr1-dev 2017-09-20 00:23:28 +00:00
Christine Franks
2ce862c3ed Handle night display state when timezone changes
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London

Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
2017-09-19 14:37:26 -07:00
Victor Chang
ed707d9cf1 Remove StructGroupSourceReq
- Remove the class as part of removing setsockoptGroupSourceReq from
Os.java
- CtsLibcoreTestCases and CtsLibcoreOjTestCases pass on aosp/master

Bug: 32071916
Test: m
Change-Id: I132190f47cea9f56ec56a824763f7e2b2cfde893
2017-09-19 19:41:46 +01:00
Kurt Nelson
7d5c07a561 Improve StrictMode CTS Testing
* Pass a full object instead of just a string. I will be adding more
detailed assertions making sure cross-binder violations work.
* AOSP format the test class.
* Update to modern junit.
* Lambda-fy.
* Load ViolationLogger in Zygote.

Bug: 62458734
Test: Test improvments.
Change-Id: I2ddc489f845928154269cad449cbdc7b15dabe8e
2017-09-12 17:40:04 -07:00
Paul Duffin
8aedf4d950 Remove org.apache.http classes from preloaded classes
Change I686e3c20f5860e58825e1b88f220f9b8c335849c removed the
org.apache.http.legacy library from the bootclasspath which means that
the classes are no longer available to be preloaded by the zygote. This
change removes the classes that cannot be preloaded from the list of
classes to preload.

Bug: 18027885
Test: make droid, flash, check log for "Class not found for preloading"
Change-Id: I57032355d805feb08720c9fcb1076f8e267d73dd
2017-09-12 13:08:15 +01:00
Mathieu Chartier
d62dd932dd Add some extra zygote preloads
Slow to initialize classes used by camera, instagram, facebook,
etc.

Obtained by go/ag/2877672 and looking at logcat during application
startup for: Camera, Instagram, Maps, and Facebook.

Test: build and flash
Bug: 65493113

Merged-In: Ic7a5641560e3b7de6f4db14f452d567104ce315c

(cherry picked from commit e4e553dab5)

Change-Id: Ie7837df6310496a3d840475aa7aa0ccba876efef
2017-09-11 12:01:48 -07:00
Mathieu Chartier
1c2d2afcec Move to using a profile for boot image
Updated the system server profile, moved to using a profile for the
boot image.

Use cases for obtaining profiles:
Automated CUJ tests
Automated app launches
Manual usage of dialer, navigation, playstore, and play music.

Storage savings:
Boot art+vdex+oat size: 78305556->61539326 (-17MB)

New system server profile has more methods (1.5MB -> 4MB oat) since it
has more coverage from use cases.

Ram savings (sample averages for CUJ test):
Average PSS of 3 runs (~100 samples total):
.Boot_vdex: 9359K -> 9902K
.oat_mmap: 21857K -> 13372K
.Heap: 29779K -> 29483K
.Boot_art: 15736K -> 18096K
.LinearAlloc: 9112K -> 8965K
Total PSS: 85846K -> 79819K (-6MB)

Average pages read from flash (512MB device) for CUJ tests (3 samples):
1508MB -> 1183MB

TODO: Investigate why .art goes up, maybe we are missing some classes
in the profiles.

Bug: 37966211
Bug: 63178181

Test: make and flash

Change-Id: I2031c52eab7b868c59d4c5a46cad50bfbc6cd714
2017-09-01 16:14:41 -07:00
Mathieu Chartier
f72073a84f Add CollationRoot to preloaded classes
It was determined this would save RAM.

Test: ./generate-preloaded-classes.sh base.txt preloaded-classes-blacklist preloaded-classes-extra  > preloaded-classes
Test: Look at the generated file
Bug: 63444758
Change-Id: Ib49b1218e94e4a4a2211071da189cf917559248b
2017-08-16 13:58:47 -07:00
Fyodor Kupolov
6e3461b67c Log timings for shutdown stages
Renamed BootTimingsTraceLog to TimingsTraceLog. It is now used for
 boot and shutdown logging.

Added measurements for main stages of shutdown in the system server:
ShutdownTiming: SendShutdownBroadcast took to complete: 734ms
ShutdownTiming: ShutdownActivityManager took to complete: 203ms
ShutdownTiming: ShutdownPackageManager took to complete: 17ms
ShutdownTiming: ShutdownBt took to complete: 533ms
ShutdownTiming: ShutdownRadio took to complete: 534ms
ShutdownTiming: ShutdownNfc took to complete: 1536ms
ShutdownTiming: ShutdownRadios took to complete: 1538ms
ShutdownTiming: ShutdownStorageManager took to complete: 906ms
ShutdownTiming: SystemServerShutdown took to complete: 3918ms

Bug: 64569080
Test: shutdown/reboot and check logs
Change-Id: I636c045852cd1ed6be1c58af6608f70e95756389
2017-08-14 11:23:29 -07:00
Mathieu Chartier
a023b86c3b Add frameworks base config and move text blobs there
Bug: 64259751
Test: clean oat files && make and flash
Change-Id: I7c898d69e66257fe0a7827ebbab1fcff4aa6473e
2017-08-11 15:21:13 -07:00