summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-07-15 18:10:25 -0700
committerMathieu Chartier <mathieuc@google.com>2014-07-15 18:32:02 -0700
commit251755cd511463260e60be98bf138b6aa1c14bf3 (patch)
tree03c0e714efa3c9b54c2218cd4d5e64b27be01811 /runtime/entrypoints/entrypoint_utils.cc
parent76e6773dfed9e9bf382bbb8d6c8654525fa44b0c (diff)
downloadandroid_art-251755cd511463260e60be98bf138b6aa1c14bf3.tar.gz
android_art-251755cd511463260e60be98bf138b6aa1c14bf3.tar.bz2
android_art-251755cd511463260e60be98bf138b6aa1c14bf3.zip
Use sched_yield in Monitor::MonitorEnter.
Previously we used NanoSleep(1000), but this was unreliable. It could result in waiting for >= 40ms instead of 1us. Since this was in a loop it was especially bad if the GC was trying to suspend all the threads when we were sleeping. This resulted in thread suspension occasionally taking longer than a second. Results on the provided picasso-sample app on Nexus 5: Longest GC pause before: ~1.5s. Longest GC pause after: <5ms. Also added a warning if thread suspension takes longer than a threshold (currently 5ms). Bug: 16307460 External bug: https://code.google.com/p/android-developer-preview/issues/detail?id=367 Change-Id: I3c2a9636357e255f38634615101eff8ca84e632f
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
0 files changed, 0 insertions, 0 deletions