OSDN Git Service

Fix braino when parsing invoke transition weight.
authorNicolas Geoffray <ngeoffray@google.com>
Fri, 6 May 2016 15:52:36 +0000 (16:52 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Tue, 10 May 2016 08:13:57 +0000 (09:13 +0100)
bug:27865109

(cherry picked from commit 95bc2f29ef2e9e6b7a71cd123df0c4a1063be1d7)

Change-Id: I56e21714bf803b8fefa2bd8087cd385c7a57564c

runtime/jit/jit.cc

index e9317a5..dcc6300 100644 (file)
@@ -103,13 +103,13 @@ JitOptions* JitOptions::CreateFromRuntimeArguments(const RuntimeArgumentMap& opt
   }
 
   if (options.Exists(RuntimeArgumentMap::JITInvokeTransitionWeight)) {
+    jit_options->invoke_transition_weight_ =
+        *options.Get(RuntimeArgumentMap::JITInvokeTransitionWeight);
     if (jit_options->invoke_transition_weight_ > jit_options->warmup_threshold_) {
       LOG(FATAL) << "Invoke transition weight is above the warmup threshold.";
     } else if (jit_options->invoke_transition_weight_  == 0) {
-      LOG(FATAL) << "Invoke transition ratio cannot be 0.";
+      LOG(FATAL) << "Invoke transition weight cannot be 0.";
     }
-    jit_options->invoke_transition_weight_ =
-        *options.Get(RuntimeArgumentMap::JITInvokeTransitionWeight);
   } else {
     jit_options->invoke_transition_weight_ = std::max(
         jit_options->warmup_threshold_ / Jit::kDefaultInvokeTransitionWeightRatio,