Add ART profile to Connectivity service.
This CL adds an ART profile to the Connectivity service. The profile was generated by profiling the Connectivity service on Droidfood population. The ART profile is expected to reduce the size of the Connectivity service generated code size by 3.9MB! Background: A profile is a list of classes and methods that are frequently used, which ART uses to compile parts of the code ahead of time, and the rest of the code can be interpreted and Jitted on the fly if needed, this improves app-startup, memory and disk space significantly! For system server modules (like Connectivity), the current behavoir is to Speed compile (compile everything), which for sure compiles unnecessary code. By moving the speed-profile mode we are saving around 3.9MB of disk space which also decreases the load on memory! The new behavior is guarded by a new build feature `RELEASE_ART_COMPILE_CONNECTIVITY_SERVICE_SPEED_PROFILE` Bug: 241823638 Flag: build.RELEASE_ART_COMPILE_CONNECTIVITY_SERVICE_SPEED_PROFILE Test: `m` Test: with flag on: go/art-benchmark?p=BootImageProfileId:54912&f=CandidateName:in:54914 (code size reduction by -3.9MB) Test: with flag off: go/art-benchmark?p=BootImageProfileId:54912&f=CandidateName:in:54913 (no code change or metric changes) Change-Id: I5d44eaaa77c5241403d6e75b05d28d6256b6df68
This commit is contained in:
parent
fc432f5dec
commit
5965628f5e
1 changed files with 341 additions and 0 deletions
|
|
@ -328,6 +328,14 @@ java_library {
|
|||
name: "service-connectivity",
|
||||
defaults: ["service-connectivity-defaults"],
|
||||
installable: true,
|
||||
dex_preopt: {
|
||||
// The profile is updated monthly or before mainline releases if requested, with the
|
||||
// aggregated profiles collected from Droidfooders. go/boot-image-profiles.
|
||||
profile: select(release_flag("RELEASE_ART_COMPILE_CONNECTIVITY_SERVICE_SPEED_PROFILE"), {
|
||||
true: "art-profile",
|
||||
false: "",
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
java_library_static {
|
||||
|
|
|
|||
Loading…
Reference in a new issue