ART: Pass current Thread* to Jit::ShouldUsePriorityThreadWeight().

And avoid some instructions from REFRESH_IBASE on x86-64.

Test: testrunner.py --host --interpreter --jit
Test: testrunner.py --target --interpreter --jit on Nexus 6P
Change-Id: Id42545d0d8fb8db0659b6c937ed7e8106d1dcfdb
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 7abf52e..8c27bfe 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -144,9 +144,8 @@
   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 @@
   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;