summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorMisha Wagner <mishaw@google.com>2021-09-20 13:42:27 +0100
committerMisha Wagner <mishaw@google.com>2021-09-20 18:16:31 +0000
commit7d611c750c3d518794b2e580539bf9a22222a41f (patch)
treedfaf68c2ff225e86cee7e12787ac47a39e447366 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentf81d50e255b53cb2e3e54d7159978a8035b162f7 (diff)
Change CacheOomRanker's "uses" feature.
The previous implementation was incorrect, as an app goes in and out of the cache several times during oom_adj calculation. If all apps started at the same time, then this would be OK - as they all get incremented the same amount, plus get incremented when they actually go in and out of the cache. This would result in the relative counts being correct. However, as all apps aren't started at the same time, the old implementation is instead a measure of how long the app has been started. So instead we use mSetProcState, which isn't changed on each oom_adj calculation. This measure should accurately reflect the number of times the process is used - whether that's by a user app open, or a content receiver call, or an intent being broadcast. See go/sim-v-impl for more details. Test: atest CacheOomRankerTest Bug: 196031723 Change-Id: I49d02362b8277f8472355e78412f79256c2289a1 Merged-In: I49d02362b8277f8472355e78412f79256c2289a1 (cherry picked from commit 480cc3123c5ee6ae4fff56599124794a0ff25aa4)
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions