OSDN Git Service

Adjust ProfileSaver strategy
authorCalin Juravle <calin@google.com>
Fri, 29 Apr 2016 15:44:11 +0000 (16:44 +0100)
committerCalin Juravle <calin@google.com>
Mon, 16 May 2016 22:57:50 +0000 (23:57 +0100)
commit5fbb0fe0625a1f76aa33cd78ccf1a17b00d8f6d1
treef135225b9674534a7a16fab3f8fd556e80a9eb2a
parent04f511b82dd06e91b443e17b1654f5d0e14473d8
Adjust ProfileSaver strategy

Change to a notification based strategy (instead of polling):
- the JIT notifies the ProfileSaver everytime it attempts a compilation
or generate (in a task) a ProfileInfo object for the method
- once a certain number of hot methods notification are received,
ProfileSaver wakes up the thread to do the analysis
- a wake up does not equal to I/O since the during processing we might
realized that's actually not enough new data.
- ProfileSaver throtles the request and ensures it doesn't do the
processing more often than kMinSavePeriodNs.

The new strategy avoids waking the thread unnecessary during extended
idle periods when we don't JIT.

Bug: 26815940

Change-Id: I24cb15daead5c5a5395ae6f5f79549e39e2f3011
runtime/jit/jit.cc
runtime/jit/profile_saver.cc
runtime/jit/profile_saver.h