-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sfanalysis:通过注入自定义动态库,推测并向外部传递渲染开始、渲染提交滞后、渲染结束事件 Sfanalysis:增加自适应动态刷新率、自适应vsync信号滞后间隔 Sfanalysis:在SELinux的权限范围内,向外部传递信号,因此不需要关闭SELinux才能使用 Sfanalysis:在一加7Pro(Android 10)、坚果Pro2(Android 8.1)、Nexus9(Android 7.1)测试通过 uperf:增加Sfanalysis,响应从surfaceflinger传递来的渲染事件 uperf:增加HintSflag,在收到渲染提交滞后之后,在观察到掉帧之前,拉升到最大性能保持0.015秒 uperf:借助Sfanalysis的渲染结束事件,hint提前结束延时从0.2s降低到0.06s uperf:限制进入sfLag次数限制,每超过400ms间隔可用次数+1,最大到15次 uperf:修复当之前的最低频高于后来的最高频时,设置会无效 uperf:增加DelayedWork,改善定时器资源利用 uperf:尝试修复AffinityHelper死循环 uperf:uxaffinity类型knob交给affinity helper去重 uperf:进入standby后休眠PmMonitor线程 uperf:重构inotifier,改进逻辑一致性 状态转移:备份进入overlay类型hint之前的base类型hint 配置文件生成器:sfLag动作如果是3集群例如sdm855,负载大多数时候在中核,因此中核需要更高的频率 配置文件生成器:高通EAS的费电模式提供更多性能 配置文件生成器:上调一点Exynos 9820中核频率 安装脚本:细分解析msm8916,修复sdm615平台始终安装失败 Makefile:迁移到ndkbuild,编译后二进制大小67k->51k,或许能改进兼容性问题 Signed-off-by: Matt Yang <[email protected]>
- Loading branch information
Showing
10 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/system/bin/sh | ||
# Surfaceflinger Analysis Library | ||
# https://github.com/yc9559/ | ||
# Author: Matt Yang | ||
# Version: 20200426 | ||
|
||
BASEDIR="$(dirname "$0")" | ||
. $BASEDIR/pathinfo.sh | ||
. $BASEDIR/libcommon.sh | ||
|
||
############################### | ||
# PATHs | ||
############################### | ||
|
||
SFA_REL="$BIN_DIR" | ||
SFA_NAME="injector" | ||
SFA_LIB="libsfanalysis.so" | ||
|
||
############################### | ||
# SfAnalysis tool functions | ||
############################### | ||
|
||
sfa_start() | ||
{ | ||
# raise inotify limit | ||
lock_val "131072" /proc/sys/fs/inotify/max_queued_events | ||
lock_val "131072" /proc/sys/fs/inotify/max_user_watches | ||
lock_val "1024" /proc/sys/fs/inotify/max_user_instances | ||
|
||
local lib_path | ||
if [ "$(is_aarch64)" == "true" ]; then | ||
lib_path="/system/lib64/$SFA_LIB" | ||
else | ||
lib_path="/system/lib/$SFA_LIB" | ||
fi | ||
|
||
"$MODULE_PATH/$SFA_REL/$SFA_NAME" "/system/bin/surfaceflinger" "$lib_path" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# Uperf Setup | ||
# https://github.com/yc9559/ | ||
# Author: Matt Yang & cjybyjk ([email protected]) | ||
# Version: 20200421 | ||
# Version: 20200428 | ||
|
||
BASEDIR="$(dirname $(readlink -f "$0"))" | ||
|
||
|
@@ -35,6 +35,15 @@ _set_perm_recursive() { | |
done | ||
} | ||
|
||
_is_aarch64() | ||
{ | ||
if [ "$(getprop ro.product.cpu.abi)" == "arm64-v8a" ]; then | ||
echo "true" | ||
else | ||
echo "false" | ||
fi | ||
} | ||
|
||
_is_eas() | ||
{ | ||
if [ "$(grep sched /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)" != "" ]; then | ||
|
@@ -61,6 +70,15 @@ _get_maxfreq() | |
echo "$maxfreq" | ||
} | ||
|
||
_get_socid() | ||
{ | ||
if [ -f /sys/devices/soc0/soc_id ]; then | ||
echo "$(cat /sys/devices/soc0/soc_id)" | ||
else | ||
echo "$(cat /sys/devices/system/soc/soc0/id)" | ||
fi | ||
} | ||
|
||
_get_sm6150_type() | ||
{ | ||
[ -f /sys/devices/soc0/soc_id ] && SOC_ID="$(cat /sys/devices/soc0/soc_id)" | ||
|
@@ -86,6 +104,16 @@ _get_sdm865_type() | |
fi | ||
} | ||
|
||
_get_msm8916_type() | ||
{ | ||
case "$(_get_socid)" in | ||
"206"|"247"|"248"|"249"|"250") echo "msm8916" ;; | ||
"233"|"240"|"242") echo "sdm610" ;; | ||
"239"|"241"|"263"|"268"|"269"|"270"|"271") echo "sdm616" ;; | ||
*) echo "msm8916" ;; | ||
esac | ||
} | ||
|
||
_get_sdm636_type() | ||
{ | ||
if [ "$(_is_eas)" == "true" ]; then | ||
|
@@ -212,6 +240,7 @@ _get_cfgname() | |
"lito") ret="sdm765" ;; | ||
"sm6150") ret="$(_get_sm6150_type)" ;; | ||
"sdm710") ret="sdm710" ;; | ||
"msm8916") ret="$(_get_msm8916_type)" ;; | ||
"msm8939") ret="sdm616" ;; | ||
"msm8953") ret="$(_get_sdm625_type)" ;; | ||
"msm8953pro") ret="$(_get_sdm626_type)" ;; | ||
|
@@ -239,7 +268,7 @@ uperf_print_banner() | |
echo "" | ||
echo "* Uperf https://github.com/yc9559/uperf/" | ||
echo "* Author: Matt Yang" | ||
echo "* Version: DEV 20200421" | ||
echo "* Version: DEV 20200428" | ||
echo "" | ||
} | ||
|
||
|
@@ -269,5 +298,28 @@ uperf_install() | |
echo "- Uperf installation was successful." | ||
} | ||
|
||
sfa_install() | ||
{ | ||
local sfanalysis_path | ||
local target_lib_path | ||
if [ "$(_is_aarch64)" == "true" ]; then | ||
sfanalysis_path="$BASEDIR/sfanalysis/arm64-v8a" | ||
target_lib_path="$BASEDIR/system/lib64" | ||
else | ||
sfanalysis_path="$BASEDIR/sfanalysis/armeabi-v7a" | ||
target_lib_path="$BASEDIR/system/lib" | ||
fi | ||
|
||
mkdir -p "$target_lib_path" | ||
cp "$sfanalysis_path/injector" "$BASEDIR/bin/" | ||
cp "$sfanalysis_path/libsfanalysis.so" "$target_lib_path" | ||
|
||
_set_perm "$BASEDIR/bin/injector" 0 0 0755 u:object_r:system_file:s0 | ||
_set_perm "$target_lib_path/libsfanalysis.so" 0 0 0644 u:object_r:system_lib_file:s0 | ||
# in case of set_perm_recursive is broken | ||
chmod 0755 $BASEDIR/bin/* | ||
} | ||
|
||
uperf_print_banner | ||
uperf_install | ||
sfa_install |
Binary file not shown.
Binary file not shown.