Fix race in CommitCodeInternal and cleanup
JitCodeCache::CommitCodeInternal had a race where it gained the
code-cache lock to allocate memory, then drops it and potentially
suspends. It relied on the time for a code-collect being strictly more
than the time this function took, creating a race. This CL Changes the
lock ordering of CHA to allow us to cleanup the CommitCodeInternal
function and remove the race.
Test: ./test.py --host --jit
Change-Id: I13c7ec6c56f07660778009ad8ce9c8c10bc2d57d
5 files changed