Move process state into runtime
Clean up.
Bug: 27420435
(cherry picked from commit f8484c8b55f4b423048f94dfabbe44110a039a9b)
Change-Id: Ia20781ee36e6a31c88ca41d3866b26813cff434d
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 36ad7f1..ac6e689 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -35,6 +35,7 @@
#include "method_reference.h"
#include "object_callbacks.h"
#include "offsets.h"
+#include "process_state.h"
#include "profiler_options.h"
#include "quick/quick_method_frame_info.h"
#include "runtime_stats.h"
@@ -626,6 +627,13 @@
pruned_dalvik_cache_ = pruned;
}
+ void UpdateProcessState(ProcessState process_state);
+
+ // Returns true if we currently care about long mutator pause.
+ bool InJankPerceptibleProcessState() const {
+ return process_state_ == kProcessStateJankPerceptible;
+ }
+
private:
static void InitPlatformSignalHandlers();
@@ -844,6 +852,9 @@
// Whether the dalvik cache was pruned when initializing the runtime.
bool pruned_dalvik_cache_;
+ // Whether or not we currently care about pause times.
+ ProcessState process_state_;
+
DISALLOW_COPY_AND_ASSIGN(Runtime);
};
std::ostream& operator<<(std::ostream& os, const Runtime::CalleeSaveType& rhs);