Adpf:raviole: enable heuristic boost.

Heuristic boost will adjust the ADPF boost profile when the
powerhal detects the power session is very janky, providing more
boost for deadline sensitive threads managed in the session.

Bug: 341111433
Test: adb shell dumpsys android.hardware.power.IPower/default;
      check the device adpf sessions' traces.
Change-Id: I850a5e9e2132c0f62097f41cc77e81d1ff6986f0
This commit is contained in:
guibing 2024-05-16 18:30:54 +00:00 committed by Wei Wang
parent 43646cd025
commit 918e2cd8ec
6 changed files with 180 additions and 18 deletions

View file

@ -1239,7 +1239,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 83333330, "ReportingRateLimitNs": 83333330,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1263,7 +1272,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 111111110, "ReportingRateLimitNs": 111111110,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1287,7 +1305,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 166666660, "ReportingRateLimitNs": 166666660,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",

View file

@ -1756,7 +1756,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 83333330, "ReportingRateLimitNs": 83333330,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1781,7 +1790,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 111111110, "ReportingRateLimitNs": 111111110,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1806,7 +1824,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 166666660, "ReportingRateLimitNs": 166666660,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",

View file

@ -1220,7 +1220,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 83333330, "ReportingRateLimitNs": 83333330,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1244,7 +1253,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 111111110, "ReportingRateLimitNs": 111111110,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1268,7 +1286,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 166666660, "ReportingRateLimitNs": 166666660,
"TargetTimeFactor": 1, "TargetTimeFactor": 1,
"StaleTimeFactor": 15 "StaleTimeFactor": 15,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",

View file

@ -1737,7 +1737,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 83333330, "ReportingRateLimitNs": 83333330,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1762,7 +1771,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 111111110, "ReportingRateLimitNs": 111111110,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1787,7 +1805,16 @@
"SamplingWindow_D": 1, "SamplingWindow_D": 1,
"ReportingRateLimitNs": 166666660, "ReportingRateLimitNs": 166666660,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 15.0 "StaleTimeFactor": 15.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",

View file

@ -1511,7 +1511,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1536,7 +1545,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1561,7 +1579,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",

View file

@ -1478,7 +1478,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_90FPS", "Name": "REFRESH_90FPS",
@ -1503,7 +1512,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "REFRESH_60FPS", "Name": "REFRESH_60FPS",
@ -1528,7 +1546,16 @@
"EarlyBoost_On": false, "EarlyBoost_On": false,
"EarlyBoost_TimeFactor": 0.0, "EarlyBoost_TimeFactor": 0.0,
"TargetTimeFactor": 1.0, "TargetTimeFactor": 1.0,
"StaleTimeFactor": 20.0 "StaleTimeFactor": 20.0,
"HeuristicBoost_On": true,
"HBoostOnMissedCycles": 8,
"HBoostOffMaxAvgRatio": 4.0,
"HBoostOffMissedCycles": 5,
"HBoostPidPuFactor": 0.5,
"HBoostUclampMin": 722,
"JankCheckTimeFactor": 1.2,
"LowFrameRateThreshold": 25,
"MaxRecordsNum": 300
}, },
{ {
"Name": "UiHighBoostWithoutPid", "Name": "UiHighBoostWithoutPid",