summaryrefslogtreecommitdiff
path: root/core/java/android/util/ArrayMap.java
diff options
context:
space:
mode:
authorMisha Wagner <mishaw@google.com>2021-08-10 14:17:32 +0100
committerMisha Wagner <mishaw@google.com>2021-09-03 14:24:36 +0100
commit8bd226e360e0594f3421fa12abfa36340df170e4 (patch)
tree77132f4fd201d795fb686f6ad16b7201f8eb8358 /core/java/android/util/ArrayMap.java
parenta5294fb6f93df088f34851b6527585b916ccd9d4 (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 Change-Id: I8e80db2aab338df07f07842131a9d4b55bebd054
Diffstat (limited to 'core/java/android/util/ArrayMap.java')
0 files changed, 0 insertions, 0 deletions