diff options
| author | 2017-09-13 11:28:14 +0000 | |
|---|---|---|
| committer | 2017-09-13 11:28:14 +0000 | |
| commit | 640a32f7d7ed4f4720282c63e4aa5ab62dbcd9ee (patch) | |
| tree | 0acf91737b29f2c4659968478e0946c5d36afe9f /runtime/jit/jit.cc | |
| parent | 857a1605b93e85e75f3dcb8cec8446f19dbf9b70 (diff) | |
| parent | a710d91a57c5c7de0f448c2dbfaa24cac53b52f9 (diff) | |
Merge "ART: Pass current Thread* to Jit::ShouldUsePriorityThreadWeight()."
Diffstat (limited to 'runtime/jit/jit.cc')
| -rw-r--r-- | runtime/jit/jit.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc index 7abf52ea60..8c27bfe85e 100644 --- a/runtime/jit/jit.cc +++ b/runtime/jit/jit.cc @@ -144,9 +144,8 @@ JitOptions* JitOptions::CreateFromRuntimeArguments(const RuntimeArgumentMap& opt return jit_options; } -bool Jit::ShouldUsePriorityThreadWeight() { - return Runtime::Current()->InJankPerceptibleProcessState() - && Thread::Current()->IsJitSensitiveThread(); +bool Jit::ShouldUsePriorityThreadWeight(Thread* self) { + return self->IsJitSensitiveThread() && Runtime::Current()->InJankPerceptibleProcessState(); } void Jit::DumpInfo(std::ostream& os) { @@ -653,7 +652,7 @@ void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_ DCHECK_LE(priority_thread_weight_, hot_method_threshold_); int32_t starting_count = method->GetCounter(); - if (Jit::ShouldUsePriorityThreadWeight()) { + if (Jit::ShouldUsePriorityThreadWeight(self)) { count *= priority_thread_weight_; } int32_t new_count = starting_count + count; // int32 here to avoid wrap-around; |