summaryrefslogtreecommitdiff
path: root/test/MultiDexModifiedSecondary
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-10-22 17:18:34 -0700
committerMathieu Chartier <mathieuc@google.com>2014-10-23 23:11:22 +0000
commitc63a505ae9992cc6ad154179734f078594c72d01 (patch)
tree2c57e9929825764a4b2a7ea540996683ee2ca819 /test/MultiDexModifiedSecondary
parent4b4af816f2c5924cc173c84bc62c12d57123442e (diff)
Fix concurrent start bytes race
Previously, we set concurrent start bytes to max int when we requested a concurrent GC, but there was a race if another thread was doing another GC and had already completed GrowForUtilization but had not yet finished the GC. This meant that the thread doing the GC would update the concurrent start bytes properly, but the allocating thread would re-update it to max int. Then when the concurrent GC thread woke up, it would call WaitForGcToComplete and see that there was a collector running and avoid doing the concurrent GC, leaving the concurrent start bytes set to max int. This meant that there would be no more concurrent GC until either the next explicit GC or the next GC for alloc. The fix is to only set concurrent start bytes to max int inside of the CollectGarbageInternal code such that there isn't any way for two threads to race. Bug: 17942071 Change-Id: I2a4b067d99ae0aeebcc32fa4970024dcdff2ddc3 (cherry picked from commit 0133ec454d8dd3fa5ffe35649b5704aa18f15a49)
Diffstat (limited to 'test/MultiDexModifiedSecondary')
0 files changed, 0 insertions, 0 deletions