OSDN Git Service

ART: Speed up stack guard page install
authorAndreas Gampe <agampe@google.com>
Fri, 18 Mar 2016 04:27:19 +0000 (21:27 -0700)
committerAndreas Gampe <agampe@google.com>
Fri, 18 Mar 2016 17:32:25 +0000 (10:32 -0700)
commit2c2d2a05eaf81d07df27418f8dfd68de6fa28ac1
treef7d49c6caf3e3ed1fa1d59699c00b4ede6921b2f
parentdb1f7dac02f6dcecac3e032f10abbcdbf3cf4331
ART: Speed up stack guard page install

Only the main thread doesn't have its stack mapped in under normal
conditions. Reading each page is a lot of overhead and we should
try to avoid it.

Rewrite to first try a (non-fatal) protect. If the outcome is a
success, finish. Otherwise do the stack mapping, and try again.

Bug: 27718174
Change-Id: I16b214567585ed2f09970f618ccdec7eed219fd3
runtime/thread.cc
runtime/thread.h