summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-02-16 13:51:51 +0000
committerNarayan Kamath <narayan@google.com>2015-02-21 11:19:07 +0000
commit5a2be3f40125af8b25fbbd9d55dc968168c76ed7 (patch)
tree070b920e71c927f112a6922f5e7b59668392f762 /runtime/runtime.h
parentd98ff78976696fdde1e7868d4687719a0439544b (diff)
downloadart-5a2be3f40125af8b25fbbd9d55dc968168c76ed7.tar.gz
art-5a2be3f40125af8b25fbbd9d55dc968168c76ed7.tar.bz2
art-5a2be3f40125af8b25fbbd9d55dc968168c76ed7.zip
Implement a simple count based boot marker.
We write the number of failed boots to the marker and only prune the dalvik cache if the number of consecutive failed boots is higher than a predefined threshold. Note that the code is forgiving of errors related to boot markers; we continue the boot process even if we're unable to create / write or flush the boot marker. bug: 19360096 Change-Id: Ia17c3b783318ddf43c9199d0f7f09c54a4176667
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 118c838397..e7d95fb595 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -516,6 +516,10 @@ class Runtime {
return target_sdk_version_;
}
+ uint32_t GetZygoteMaxFailedBoots() const {
+ return zygote_max_failed_boots_;
+ }
+
private:
static void InitPlatformSignalHandlers();
@@ -682,6 +686,11 @@ class Runtime {
// that there's no native bridge.
bool is_native_bridge_loaded_;
+ // The maximum number of failed boots we allow before pruning the dalvik cache
+ // and trying again. This option is only inspected when we're running as a
+ // zygote.
+ uint32_t zygote_max_failed_boots_;
+
DISALLOW_COPY_AND_ASSIGN(Runtime);
};
std::ostream& operator<<(std::ostream& os, const Runtime::CalleeSaveType& rhs);