diff options
Diffstat (limited to 'runtime/gc/heap.h')
-rw-r--r-- | runtime/gc/heap.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 9eda422902..2925591333 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -36,6 +36,7 @@ #include "globals.h" #include "object_callbacks.h" #include "offsets.h" +#include "process_state.h" #include "safe_map.h" #include "verify_object.h" @@ -116,14 +117,6 @@ static constexpr bool kUseRosAlloc = true; // If true, use thread-local allocation stack. static constexpr bool kUseThreadLocalAllocationStack = true; -// The process state passed in from the activity manager, used to determine when to do trimming -// and compaction. -enum ProcessState { - kProcessStateJankPerceptible = 0, - kProcessStateJankImperceptible = 1, -}; -std::ostream& operator<<(std::ostream& os, const ProcessState& process_state); - class Heap { public: // If true, measure the total allocation time. @@ -382,7 +375,7 @@ class Heap { collector::GcType WaitForGcToComplete(GcCause cause, Thread* self) REQUIRES(!*gc_complete_lock_); // Update the heap's process state to a new value, may cause compaction to occur. - void UpdateProcessState(ProcessState process_state) + void UpdateProcessState(ProcessState old_process_state, ProcessState new_process_state) REQUIRES(!*pending_task_lock_, !*gc_complete_lock_); bool HaveContinuousSpaces() const NO_THREAD_SAFETY_ANALYSIS { @@ -664,11 +657,6 @@ class Heap { void DumpGcPerformanceInfo(std::ostream& os) REQUIRES(!*gc_complete_lock_); void ResetGcPerformanceInfo() REQUIRES(!*gc_complete_lock_); - // Returns true if we currently care about pause times. - bool CareAboutPauseTimes() const { - return process_state_ == kProcessStateJankPerceptible; - } - // Thread pool. void CreateThreadPool(); void DeleteThreadPool(); @@ -1152,9 +1140,6 @@ class Heap { // Whether or not we need to run finalizers in the next native allocation. bool native_need_to_run_finalization_; - // Whether or not we currently care about pause times. - ProcessState process_state_; - // When num_bytes_allocated_ exceeds this amount then a concurrent GC should be requested so that // it completes ahead of an allocation failing. size_t concurrent_start_bytes_; |