summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Second.java
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2019-05-29 13:16:25 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2019-06-01 01:48:14 +0000
commitdbb57f3f8e3bc895ddc0dd1cd80cfa16bb1283db (patch)
treee6caa7d9e1a96400658818c18359703232fea031 /test/ProfileTestMultiDex/Second.java
parentf98a38740bfdc361e55956ace6a3b937a83faeb3 (diff)
Remove skipped blocks reuse mechanism
We had a fairly elaborate mechanism for dealing with the case in which two threads raced to copy an object. They would both copy, and we would then put the copied object from the loser into a special data structure, whose contents we could reuse for allocation if we otherwise ran out of memory. It was tricky to correctly account for this space. This replaces that code with a simpler heuristic mechanism to avoid copying the same large object twice. If we do copy an object twice, we just drop it on the floor. I believe this better handles the one case in which it really matters: A large object that all threads need and thus immediately start copying after a flip. It is hard to convince oneself that any of this matters. In my two experiments booting and running AOSP for a little with logging, I saw one race each time, with an average object size of 20 bytes. Bug: 132625279 Test: Boot AOSP with logging twice. Change-Id: Ie0e7dbd8f68c9f4e13ec418c26ff460d3977e10d
Diffstat (limited to 'test/ProfileTestMultiDex/Second.java')
0 files changed, 0 insertions, 0 deletions