Move go default system properties into prop files
Test: manual
Bug: 110517986
(cherry-picked from commit 732a4cc62f
)
Merged-In: I28f5c18bb9e70c755ece50c49c02434f825878dc
Change-Id: I28f5c18bb9e70c755ece50c49c02434f825878dc
This commit is contained in:
parent
effbc370dc
commit
f39c2c7495
6 changed files with 97 additions and 35 deletions
15
target/board/go_defaults.prop
Normal file
15
target/board/go_defaults.prop
Normal file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# Copyright (C) 2017 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
23
target/board/go_defaults_512.prop
Normal file
23
target/board/go_defaults_512.prop
Normal file
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Copyright (C) 2017 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# 512MB specific properties.
|
||||
|
||||
# lmkd can kill more now.
|
||||
ro.lmk.medium=700
|
||||
|
||||
# madvise random in ART to reduce page cache thrashing.
|
||||
dalvik.vm.madvise-random=true
|
43
target/board/go_defaults_common.prop
Normal file
43
target/board/go_defaults_common.prop
Normal file
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# Copyright (C) 2017 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Sets Android Go recommended default values for propreties.
|
||||
|
||||
# Set lowram options
|
||||
ro.config.low_ram=true
|
||||
ro.lmk.critical_upgrade=true
|
||||
ro.lmk.upgrade_pressure=40
|
||||
ro.lmk.downgrade_pressure=60
|
||||
ro.lmk.kill_heaviest_task=false
|
||||
ro.statsd.enable=false
|
||||
|
||||
# set threshold to filter unused apps
|
||||
pm.dexopt.downgrade_after_inactive_days=10
|
||||
|
||||
# set the compiler filter for shared apks to quicken.
|
||||
# Rationale: speed has a lot of dex code expansion, it uses more ram and space
|
||||
# compared to quicken. Using quicken for shared APKs on Go devices may save RAM.
|
||||
# Note that this is a trade-off: here we trade clean pages for dirty pages,
|
||||
# extra cpu and battery. That's because the quicken files will be jit-ed in all
|
||||
# the processes that load of shared apk and the code cache is not shared.
|
||||
# Some notable apps that will be affected by this are gms and chrome.
|
||||
# b/65591595.
|
||||
pm.dexopt.shared=quicken
|
||||
|
||||
# Default heap sizes. Allow up to 256m for large heaps to make sure a single app
|
||||
# doesn't take all of the RAM.
|
||||
dalvik.vm.heapgrowthlimit=128m
|
||||
dalvik.vm.heapsize=256m
|
|
@ -17,3 +17,6 @@
|
|||
# Inherit common Android Go defaults.
|
||||
$(call inherit-product, build/target/product/go_defaults_common.mk)
|
||||
|
||||
# Add the system properties.
|
||||
TARGET_SYSTEM_PROP += \
|
||||
build/make/target/board/go_defaults.prop
|
||||
|
|
|
@ -17,12 +17,6 @@
|
|||
# Inherit common Android Go defaults.
|
||||
$(call inherit-product, build/target/product/go_defaults_common.mk)
|
||||
|
||||
# 512MB specific properties.
|
||||
|
||||
# lmkd can kill more now.
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.lmk.medium=700 \
|
||||
|
||||
# madvise random in ART to reduce page cache thrashing.
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.madvise-random=true
|
||||
# Add the system properties.
|
||||
TARGET_SYSTEM_PROP += \
|
||||
build/make/target/board/go_defaults_512.prop
|
||||
|
|
|
@ -14,18 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Sets Android Go recommended default values for propreties.
|
||||
|
||||
# Set lowram options
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.config.low_ram=true \
|
||||
ro.lmk.critical_upgrade=true \
|
||||
ro.lmk.upgrade_pressure=40
|
||||
|
||||
# set threshold to filter unused apps
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
pm.dexopt.downgrade_after_inactive_days=10
|
||||
|
||||
# Sets Android Go recommended default product options.
|
||||
|
||||
# Speed profile services and wifi-service to reduce RAM and storage.
|
||||
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
|
||||
|
@ -39,19 +28,14 @@ PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true
|
|||
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true
|
||||
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := frameworks/base/config/boot-image-profile.txt
|
||||
|
||||
# set the compiler filter for shared apks to quicken.
|
||||
# Rationale: speed has a lot of dex code expansion, it uses more ram and space
|
||||
# compared to quicken. Using quicken for shared APKs on Go devices may save RAM.
|
||||
# Note that this is a trade-off: here we trade clean pages for dirty pages,
|
||||
# extra cpu and battery. That's because the quicken files will be jit-ed in all
|
||||
# the processes that load of shared apk and the code cache is not shared.
|
||||
# Some notable apps that will be affected by this are gms and chrome.
|
||||
# b/65591595.
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
pm.dexopt.shared=quicken
|
||||
# Do not generate libartd.
|
||||
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
|
||||
|
||||
# Default heap sizes. Allow up to 256m for large heaps to make sure a single app
|
||||
# doesn't take all of the RAM.
|
||||
PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m
|
||||
PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m
|
||||
# Strip the local variable table and the local variable type table to reduce
|
||||
# the size of the system image. This has no bearing on stack traces, but will
|
||||
# leave less information available via JDWP.
|
||||
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
|
||||
|
||||
# Add the system properties.
|
||||
TARGET_SYSTEM_PROP += \
|
||||
build/make/target/board/go_defaults_common.prop
|
||||
|
|
Loading…
Reference in a new issue