summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorMisha Wagner <mishaw@google.com>2021-09-20 13:53:00 +0100
committerMisha Wagner <mishaw@google.com>2021-09-20 18:16:56 +0000
commit665e91e17196c499462553e2c463c39727ba8738 (patch)
treee11b4ca258bfd7956588ef4e15b993fa3f81e854 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent7d611c750c3d518794b2e580539bf9a22222a41f (diff)
Use Process.getRss instead of mProfile.getLastRss in CacheOomRanker.
RSS values are cached in ProcessStateRecord, and repopulated when they are >10s old. mProfile.getLastRss values can be 15s-2h stale, which is why we're using this implementation. My understanding is that the best solution would be to populate mProfile.getLastRss more often - but it is currently populated alongside PSS, which is more expensive to calculate. Therefore, rather than the more complex change of splitting up PSS & RSS collection, we opt for this simple (if not optimal) approach as CacheOomRanker is still experimental. Upon successful launch, we can revisit this. When logging the duration of CacheOomRanker calculations, we saw no significant increase in computation time with this change. If we turn off caching RSS values, we see a 10x increase in computation time. Test: atest CacheOomRankerTest Bug: 196031723 Merged-In: I8e80db2aab338df07f07842131a9d4b55bebd054 Change-Id: I8e80db2aab338df07f07842131a9d4b55bebd054 (cherry picked from commit 8bd226e360e0594f3421fa12abfa36340df170e4)
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions