Turn on PGO for Skia on Android
This patch is to turn on PGO for skia on Android, which will provide a performance improvement of 7.6% for hwui when applied PGO for both. The patch specified a skia.profdata file, which locates in internal google_data/pgo_profile directory, to work as the profile to feed PGO. This profdata can be re-collected with PGO build system support. PGO can be turned off by setting ANDROID_PGO_NO_PROFILE_USE environment variable or set variable to false. Test: Build skia successfully and verified the performance improvement on device through benchmark. BUG=skia: Change-Id: I826f417569b2853630f6d4fcce236b5bc36547fa Reviewed-on: https://skia-review.googlesource.com/82880 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: John Reck <jreck@google.com>
This commit is contained in:
parent
58a3fcd4b3
commit
e18b77972b
@ -91,7 +91,24 @@ cc_library_static {
|
||||
},
|
||||
},
|
||||
|
||||
defaults: ["skia_deps"],
|
||||
defaults: ["skia_deps",
|
||||
"skia_pgo",
|
||||
],
|
||||
}
|
||||
|
||||
// Build libskia with PGO by default.
|
||||
// Location of PGO profile data is defined in build/soong/cc/pgo.go
|
||||
// and is separate from skia.
|
||||
// To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
|
||||
// or set enable_profile_use property to false.
|
||||
cc_defaults {
|
||||
name: "skia_pgo",
|
||||
pgo: {
|
||||
instrumentation: true,
|
||||
profile_file: "skia/skia.profdata",
|
||||
benchmarks: ["hwui", "skia"],
|
||||
enable_profile_use: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
|
Loading…
Reference in New Issue
Block a user