blob: ae474da7c08396a3f3ad53c9df3bf7441206e333 [file] [log] [blame]
Mathieu Chartiere5f13e52015-02-24 09:37:21 -08001/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "jit.h"
18
19#include <dlfcn.h>
20
Mathieu Chartiere401d142015-04-22 13:56:20 -070021#include "art_method-inl.h"
Andreas Gampe542451c2016-07-26 09:02:02 -070022#include "base/enums.h"
Andreas Gampe0897e1c2017-05-16 08:36:56 -070023#include "base/memory_tool.h"
Andreas Gampe2a5c4682015-08-14 08:22:54 -070024#include "debugger.h"
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080025#include "entrypoints/runtime_asm_entrypoints.h"
26#include "interpreter/interpreter.h"
Andreas Gampec15a2f42017-04-21 12:09:39 -070027#include "java_vm_ext.h"
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080028#include "jit_code_cache.h"
Calin Juravle31f2c152015-10-23 17:56:15 +010029#include "oat_file_manager.h"
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +000030#include "oat_quick_method_header.h"
Calin Juravle33083d62017-01-18 15:29:12 -080031#include "profile_compilation_info.h"
Calin Juravle4d77b6a2015-12-01 18:38:09 +000032#include "profile_saver.h"
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080033#include "runtime.h"
34#include "runtime_options.h"
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +000035#include "stack_map.h"
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +010036#include "thread_list.h"
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080037#include "utils.h"
38
39namespace art {
40namespace jit {
41
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +000042static constexpr bool kEnableOnStackReplacement = true;
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +010043// At what priority to schedule jit threads. 9 is the lowest foreground priority on device.
44static constexpr int kJitPoolThreadPthreadPriority = 9;
Nicolas Geoffraye8662132016-02-15 10:00:42 +000045
Mathieu Chartier72918ea2016-03-24 11:07:06 -070046// JIT compiler
47void* Jit::jit_library_handle_= nullptr;
48void* Jit::jit_compiler_handle_ = nullptr;
49void* (*Jit::jit_load_)(bool*) = nullptr;
50void (*Jit::jit_unload_)(void*) = nullptr;
51bool (*Jit::jit_compile_method_)(void*, ArtMethod*, Thread*, bool) = nullptr;
52void (*Jit::jit_types_loaded_)(void*, mirror::Class**, size_t count) = nullptr;
53bool Jit::generate_debug_info_ = false;
54
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080055JitOptions* JitOptions::CreateFromRuntimeArguments(const RuntimeArgumentMap& options) {
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080056 auto* jit_options = new JitOptions;
Calin Juravleffc87072016-04-20 14:22:09 +010057 jit_options->use_jit_compilation_ = options.GetOrDefault(RuntimeArgumentMap::UseJitCompilation);
Nicolas Geoffray83f080a2016-03-08 16:50:21 +000058
Nicolas Geoffray0a3be162015-11-18 11:15:22 +000059 jit_options->code_cache_initial_capacity_ =
60 options.GetOrDefault(RuntimeArgumentMap::JITCodeCacheInitialCapacity);
61 jit_options->code_cache_max_capacity_ =
62 options.GetOrDefault(RuntimeArgumentMap::JITCodeCacheMaxCapacity);
Mathieu Chartiera4885cb2015-03-09 15:38:54 -070063 jit_options->dump_info_on_shutdown_ =
64 options.Exists(RuntimeArgumentMap::DumpJITInfoOnShutdown);
Calin Juravle138dbff2016-06-28 19:36:58 +010065 jit_options->profile_saver_options_ =
66 options.GetOrDefault(RuntimeArgumentMap::ProfileSaverOpts);
Nicolas Geoffray83f080a2016-03-08 16:50:21 +000067
68 jit_options->compile_threshold_ = options.GetOrDefault(RuntimeArgumentMap::JITCompileThreshold);
69 if (jit_options->compile_threshold_ > std::numeric_limits<uint16_t>::max()) {
70 LOG(FATAL) << "Method compilation threshold is above its internal limit.";
71 }
72
73 if (options.Exists(RuntimeArgumentMap::JITWarmupThreshold)) {
74 jit_options->warmup_threshold_ = *options.Get(RuntimeArgumentMap::JITWarmupThreshold);
75 if (jit_options->warmup_threshold_ > std::numeric_limits<uint16_t>::max()) {
76 LOG(FATAL) << "Method warmup threshold is above its internal limit.";
77 }
78 } else {
79 jit_options->warmup_threshold_ = jit_options->compile_threshold_ / 2;
80 }
81
82 if (options.Exists(RuntimeArgumentMap::JITOsrThreshold)) {
83 jit_options->osr_threshold_ = *options.Get(RuntimeArgumentMap::JITOsrThreshold);
84 if (jit_options->osr_threshold_ > std::numeric_limits<uint16_t>::max()) {
85 LOG(FATAL) << "Method on stack replacement threshold is above its internal limit.";
86 }
87 } else {
88 jit_options->osr_threshold_ = jit_options->compile_threshold_ * 2;
89 if (jit_options->osr_threshold_ > std::numeric_limits<uint16_t>::max()) {
90 jit_options->osr_threshold_ = std::numeric_limits<uint16_t>::max();
91 }
92 }
93
Calin Juravleb2771b42016-04-07 17:09:25 +010094 if (options.Exists(RuntimeArgumentMap::JITPriorityThreadWeight)) {
95 jit_options->priority_thread_weight_ =
96 *options.Get(RuntimeArgumentMap::JITPriorityThreadWeight);
97 if (jit_options->priority_thread_weight_ > jit_options->warmup_threshold_) {
98 LOG(FATAL) << "Priority thread weight is above the warmup threshold.";
99 } else if (jit_options->priority_thread_weight_ == 0) {
100 LOG(FATAL) << "Priority thread weight cannot be 0.";
101 }
102 } else {
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100103 jit_options->priority_thread_weight_ = std::max(
104 jit_options->warmup_threshold_ / Jit::kDefaultPriorityThreadWeightRatio,
105 static_cast<size_t>(1));
Calin Juravleb2771b42016-04-07 17:09:25 +0100106 }
107
Calin Juravle155ff3d2016-04-27 14:14:58 +0100108 if (options.Exists(RuntimeArgumentMap::JITInvokeTransitionWeight)) {
Nicolas Geoffray7c9f3ba2016-05-06 16:52:36 +0100109 jit_options->invoke_transition_weight_ =
110 *options.Get(RuntimeArgumentMap::JITInvokeTransitionWeight);
Calin Juravle155ff3d2016-04-27 14:14:58 +0100111 if (jit_options->invoke_transition_weight_ > jit_options->warmup_threshold_) {
112 LOG(FATAL) << "Invoke transition weight is above the warmup threshold.";
113 } else if (jit_options->invoke_transition_weight_ == 0) {
Nicolas Geoffray7c9f3ba2016-05-06 16:52:36 +0100114 LOG(FATAL) << "Invoke transition weight cannot be 0.";
Calin Juravle155ff3d2016-04-27 14:14:58 +0100115 }
Calin Juravle155ff3d2016-04-27 14:14:58 +0100116 } else {
117 jit_options->invoke_transition_weight_ = std::max(
118 jit_options->warmup_threshold_ / Jit::kDefaultInvokeTransitionWeightRatio,
Mathieu Chartier6beced42016-11-15 15:51:31 -0800119 static_cast<size_t>(1));
Calin Juravle155ff3d2016-04-27 14:14:58 +0100120 }
121
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800122 return jit_options;
123}
124
Calin Juravleb2771b42016-04-07 17:09:25 +0100125bool Jit::ShouldUsePriorityThreadWeight() {
Calin Juravle97cbc922016-04-15 16:16:35 +0100126 return Runtime::Current()->InJankPerceptibleProcessState()
127 && Thread::Current()->IsJitSensitiveThread();
Calin Juravleb2771b42016-04-07 17:09:25 +0100128}
129
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700130void Jit::DumpInfo(std::ostream& os) {
Nicolas Geoffraybcd94c82016-03-03 13:23:33 +0000131 code_cache_->Dump(os);
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700132 cumulative_timings_.Dump(os);
Nicolas Geoffraya4f81542016-03-08 16:57:48 +0000133 MutexLock mu(Thread::Current(), lock_);
134 memory_use_.PrintMemoryUse(os);
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700135}
136
Calin Juravleb8e69992016-03-09 15:37:48 +0000137void Jit::DumpForSigQuit(std::ostream& os) {
138 DumpInfo(os);
139 ProfileSaver::DumpInstanceInfo(os);
140}
141
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700142void Jit::AddTimingLogger(const TimingLogger& logger) {
143 cumulative_timings_.AddLogger(logger);
144}
145
Mathieu Chartier72918ea2016-03-24 11:07:06 -0700146Jit::Jit() : dump_info_on_shutdown_(false),
Nicolas Geoffraya25dce92016-01-12 16:41:10 +0000147 cumulative_timings_("JIT timings"),
Nicolas Geoffraya4f81542016-03-08 16:57:48 +0000148 memory_use_("Memory used for compilation", 16),
149 lock_("JIT memory use lock"),
Andreas Gampe4471e4f2017-01-30 16:40:49 +0000150 use_jit_compilation_(true),
151 hot_method_threshold_(0),
152 warm_method_threshold_(0),
153 osr_method_threshold_(0),
154 priority_thread_weight_(0),
155 invoke_transition_weight_(0) {}
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800156
157Jit* Jit::Create(JitOptions* options, std::string* error_msg) {
Calin Juravle138dbff2016-06-28 19:36:58 +0100158 DCHECK(options->UseJitCompilation() || options->GetProfileSaverOptions().IsEnabled());
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800159 std::unique_ptr<Jit> jit(new Jit);
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700160 jit->dump_info_on_shutdown_ = options->DumpJitInfoOnShutdown();
Mathieu Chartier72918ea2016-03-24 11:07:06 -0700161 if (jit_compiler_handle_ == nullptr && !LoadCompiler(error_msg)) {
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800162 return nullptr;
163 }
Nicolas Geoffray0a3be162015-11-18 11:15:22 +0000164 jit->code_cache_.reset(JitCodeCache::Create(
Nicolas Geoffraya25dce92016-01-12 16:41:10 +0000165 options->GetCodeCacheInitialCapacity(),
166 options->GetCodeCacheMaxCapacity(),
167 jit->generate_debug_info_,
168 error_msg));
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800169 if (jit->GetCodeCache() == nullptr) {
170 return nullptr;
171 }
Calin Juravleffc87072016-04-20 14:22:09 +0100172 jit->use_jit_compilation_ = options->UseJitCompilation();
Calin Juravle138dbff2016-06-28 19:36:58 +0100173 jit->profile_saver_options_ = options->GetProfileSaverOptions();
Nicolas Geoffraybcd94c82016-03-03 13:23:33 +0000174 VLOG(jit) << "JIT created with initial_capacity="
Nicolas Geoffray0a3be162015-11-18 11:15:22 +0000175 << PrettySize(options->GetCodeCacheInitialCapacity())
176 << ", max_capacity=" << PrettySize(options->GetCodeCacheMaxCapacity())
Calin Juravle4d77b6a2015-12-01 18:38:09 +0000177 << ", compile_threshold=" << options->GetCompileThreshold()
Calin Juravle138dbff2016-06-28 19:36:58 +0100178 << ", profile_saver_options=" << options->GetProfileSaverOptions();
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100179
180
181 jit->hot_method_threshold_ = options->GetCompileThreshold();
182 jit->warm_method_threshold_ = options->GetWarmupThreshold();
183 jit->osr_method_threshold_ = options->GetOsrThreshold();
Nicolas Geoffrayba6aae02016-04-14 14:17:29 +0100184 jit->priority_thread_weight_ = options->GetPriorityThreadWeight();
Calin Juravle155ff3d2016-04-27 14:14:58 +0100185 jit->invoke_transition_weight_ = options->GetInvokeTransitionWeight();
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100186
187 jit->CreateThreadPool();
188
189 // Notify native debugger about the classes already loaded before the creation of the jit.
190 jit->DumpTypeInfoForLoadedTypes(Runtime::Current()->GetClassLinker());
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800191 return jit.release();
192}
193
Mathieu Chartierc1bc4152016-03-24 17:22:52 -0700194bool Jit::LoadCompilerLibrary(std::string* error_msg) {
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800195 jit_library_handle_ = dlopen(
196 kIsDebugBuild ? "libartd-compiler.so" : "libart-compiler.so", RTLD_NOW);
197 if (jit_library_handle_ == nullptr) {
198 std::ostringstream oss;
199 oss << "JIT could not load libart-compiler.so: " << dlerror();
200 *error_msg = oss.str();
201 return false;
202 }
Nicolas Geoffray5b82d332016-02-18 14:22:32 +0000203 jit_load_ = reinterpret_cast<void* (*)(bool*)>(dlsym(jit_library_handle_, "jit_load"));
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800204 if (jit_load_ == nullptr) {
205 dlclose(jit_library_handle_);
206 *error_msg = "JIT couldn't find jit_load entry point";
207 return false;
208 }
209 jit_unload_ = reinterpret_cast<void (*)(void*)>(
210 dlsym(jit_library_handle_, "jit_unload"));
211 if (jit_unload_ == nullptr) {
212 dlclose(jit_library_handle_);
213 *error_msg = "JIT couldn't find jit_unload entry point";
214 return false;
215 }
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000216 jit_compile_method_ = reinterpret_cast<bool (*)(void*, ArtMethod*, Thread*, bool)>(
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800217 dlsym(jit_library_handle_, "jit_compile_method"));
218 if (jit_compile_method_ == nullptr) {
219 dlclose(jit_library_handle_);
220 *error_msg = "JIT couldn't find jit_compile_method entry point";
221 return false;
222 }
Tamas Berghammerfffbee42016-01-15 13:09:34 +0000223 jit_types_loaded_ = reinterpret_cast<void (*)(void*, mirror::Class**, size_t)>(
224 dlsym(jit_library_handle_, "jit_types_loaded"));
225 if (jit_types_loaded_ == nullptr) {
Tamas Berghammer160e6df2016-01-05 14:29:02 +0000226 dlclose(jit_library_handle_);
Tamas Berghammerfffbee42016-01-15 13:09:34 +0000227 *error_msg = "JIT couldn't find jit_types_loaded entry point";
Tamas Berghammer160e6df2016-01-05 14:29:02 +0000228 return false;
229 }
Mathieu Chartierc1bc4152016-03-24 17:22:52 -0700230 return true;
231}
232
233bool Jit::LoadCompiler(std::string* error_msg) {
234 if (jit_library_handle_ == nullptr && !LoadCompilerLibrary(error_msg)) {
235 return false;
236 }
Nicolas Geoffraya25dce92016-01-12 16:41:10 +0000237 bool will_generate_debug_symbols = false;
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800238 VLOG(jit) << "Calling JitLoad interpreter_only="
239 << Runtime::Current()->GetInstrumentation()->InterpretOnly();
Nicolas Geoffray5b82d332016-02-18 14:22:32 +0000240 jit_compiler_handle_ = (jit_load_)(&will_generate_debug_symbols);
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800241 if (jit_compiler_handle_ == nullptr) {
242 dlclose(jit_library_handle_);
243 *error_msg = "JIT couldn't load compiler";
244 return false;
245 }
Nicolas Geoffraya25dce92016-01-12 16:41:10 +0000246 generate_debug_info_ = will_generate_debug_symbols;
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800247 return true;
248}
249
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000250bool Jit::CompileMethod(ArtMethod* method, Thread* self, bool osr) {
Calin Juravleffc87072016-04-20 14:22:09 +0100251 DCHECK(Runtime::Current()->UseJitCompilation());
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800252 DCHECK(!method->IsRuntimeMethod());
Nicolas Geoffrayd9994f02016-02-11 17:35:55 +0000253
Nicolas Geoffray73be1e82015-09-17 15:22:56 +0100254 // Don't compile the method if it has breakpoints.
Mathieu Chartierd8565452015-03-26 09:41:50 -0700255 if (Dbg::IsDebuggerActive() && Dbg::MethodHasAnyBreakpoints(method)) {
David Sehr709b0702016-10-13 09:12:37 -0700256 VLOG(jit) << "JIT not compiling " << method->PrettyMethod() << " due to breakpoint";
Mathieu Chartierd8565452015-03-26 09:41:50 -0700257 return false;
258 }
Nicolas Geoffray73be1e82015-09-17 15:22:56 +0100259
260 // Don't compile the method if we are supposed to be deoptimized.
261 instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation();
262 if (instrumentation->AreAllMethodsDeoptimized() || instrumentation->IsDeoptimized(method)) {
David Sehr709b0702016-10-13 09:12:37 -0700263 VLOG(jit) << "JIT not compiling " << method->PrettyMethod() << " due to deoptimization";
Nicolas Geoffray73be1e82015-09-17 15:22:56 +0100264 return false;
265 }
266
Nicolas Geoffrayd9994f02016-02-11 17:35:55 +0000267 // If we get a request to compile a proxy method, we pass the actual Java method
268 // of that proxy method, as the compiler does not expect a proxy method.
Andreas Gampe542451c2016-07-26 09:02:02 -0700269 ArtMethod* method_to_compile = method->GetInterfaceMethodIfProxy(kRuntimePointerSize);
Nicolas Geoffrayd9994f02016-02-11 17:35:55 +0000270 if (!code_cache_->NotifyCompilationOf(method_to_compile, self, osr)) {
Nicolas Geoffray73be1e82015-09-17 15:22:56 +0100271 return false;
272 }
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100273
274 VLOG(jit) << "Compiling method "
David Sehr709b0702016-10-13 09:12:37 -0700275 << ArtMethod::PrettyMethod(method_to_compile)
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100276 << " osr=" << std::boolalpha << osr;
Nicolas Geoffrayd9994f02016-02-11 17:35:55 +0000277 bool success = jit_compile_method_(jit_compiler_handle_, method_to_compile, self, osr);
buzbee454b3b62016-04-07 14:42:47 -0700278 code_cache_->DoneCompiling(method_to_compile, self, osr);
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100279 if (!success) {
280 VLOG(jit) << "Failed to compile method "
David Sehr709b0702016-10-13 09:12:37 -0700281 << ArtMethod::PrettyMethod(method_to_compile)
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100282 << " osr=" << std::boolalpha << osr;
283 }
Andreas Gampe320ba912016-11-18 17:39:45 -0800284 if (kIsDebugBuild) {
285 if (self->IsExceptionPending()) {
286 mirror::Throwable* exception = self->GetException();
287 LOG(FATAL) << "No pending exception expected after compiling "
288 << ArtMethod::PrettyMethod(method)
289 << ": "
290 << exception->Dump();
291 }
292 }
Nicolas Geoffray73be1e82015-09-17 15:22:56 +0100293 return success;
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800294}
295
296void Jit::CreateThreadPool() {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100297 // There is a DCHECK in the 'AddSamples' method to ensure the tread pool
298 // is not null when we instrument.
Andreas Gampe4471e4f2017-01-30 16:40:49 +0000299
300 // We need peers as we may report the JIT thread, e.g., in the debugger.
301 constexpr bool kJitPoolNeedsPeers = true;
302 thread_pool_.reset(new ThreadPool("Jit thread pool", 1, kJitPoolNeedsPeers));
303
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100304 thread_pool_->SetPthreadPriority(kJitPoolThreadPthreadPriority);
Nicolas Geoffray021c5f22016-12-16 11:22:05 +0000305 Start();
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800306}
307
308void Jit::DeleteThreadPool() {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100309 Thread* self = Thread::Current();
310 DCHECK(Runtime::Current()->IsShuttingDown(self));
311 if (thread_pool_ != nullptr) {
Andreas Gampe0897e1c2017-05-16 08:36:56 -0700312 std::unique_ptr<ThreadPool> pool;
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100313 {
314 ScopedSuspendAll ssa(__FUNCTION__);
315 // Clear thread_pool_ field while the threads are suspended.
316 // A mutator in the 'AddSamples' method will check against it.
Andreas Gampe0897e1c2017-05-16 08:36:56 -0700317 pool = std::move(thread_pool_);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100318 }
Andreas Gampe0897e1c2017-05-16 08:36:56 -0700319
320 // When running sanitized, let all tasks finish to not leak. Otherwise just clear the queue.
321 if (!RUNNING_ON_MEMORY_TOOL) {
322 pool->StopWorkers(self);
323 pool->RemoveAllTasks(self);
324 }
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100325 // We could just suspend all threads, but we know those threads
326 // will finish in a short period, so it's not worth adding a suspend logic
327 // here. Besides, this is only done for shutdown.
Andreas Gampe0897e1c2017-05-16 08:36:56 -0700328 pool->Wait(self, false, false);
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800329 }
330}
331
Calin Juravle4d77b6a2015-12-01 18:38:09 +0000332void Jit::StartProfileSaver(const std::string& filename,
Calin Juravle77651c42017-03-03 18:04:02 -0800333 const std::vector<std::string>& code_paths) {
Calin Juravle138dbff2016-06-28 19:36:58 +0100334 if (profile_saver_options_.IsEnabled()) {
335 ProfileSaver::Start(profile_saver_options_,
336 filename,
337 code_cache_.get(),
Calin Juravle77651c42017-03-03 18:04:02 -0800338 code_paths);
Calin Juravle31f2c152015-10-23 17:56:15 +0100339 }
Calin Juravle4d77b6a2015-12-01 18:38:09 +0000340}
341
342void Jit::StopProfileSaver() {
Calin Juravle138dbff2016-06-28 19:36:58 +0100343 if (profile_saver_options_.IsEnabled() && ProfileSaver::IsStarted()) {
Calin Juravleb8e69992016-03-09 15:37:48 +0000344 ProfileSaver::Stop(dump_info_on_shutdown_);
Calin Juravle31f2c152015-10-23 17:56:15 +0100345 }
346}
347
Siva Chandra05d24152016-01-05 17:43:17 -0800348bool Jit::JitAtFirstUse() {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100349 return HotMethodThreshold() == 0;
Siva Chandra05d24152016-01-05 17:43:17 -0800350}
351
Nicolas Geoffray35122442016-03-02 12:05:30 +0000352bool Jit::CanInvokeCompiledCode(ArtMethod* method) {
353 return code_cache_->ContainsPc(method->GetEntryPointFromQuickCompiledCode());
354}
355
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800356Jit::~Jit() {
Calin Juravle138dbff2016-06-28 19:36:58 +0100357 DCHECK(!profile_saver_options_.IsEnabled() || !ProfileSaver::IsStarted());
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700358 if (dump_info_on_shutdown_) {
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700359 DumpInfo(LOG_STREAM(INFO));
Nicolas Geoffray4e92c3c2017-05-08 09:34:26 +0100360 Runtime::Current()->DumpDeoptimizations(LOG_STREAM(INFO));
Mathieu Chartiera4885cb2015-03-09 15:38:54 -0700361 }
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800362 DeleteThreadPool();
363 if (jit_compiler_handle_ != nullptr) {
364 jit_unload_(jit_compiler_handle_);
Mathieu Chartier72918ea2016-03-24 11:07:06 -0700365 jit_compiler_handle_ = nullptr;
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800366 }
367 if (jit_library_handle_ != nullptr) {
368 dlclose(jit_library_handle_);
Mathieu Chartier72918ea2016-03-24 11:07:06 -0700369 jit_library_handle_ = nullptr;
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800370 }
371}
372
Tamas Berghammer160e6df2016-01-05 14:29:02 +0000373void Jit::NewTypeLoadedIfUsingJit(mirror::Class* type) {
Calin Juravleffc87072016-04-20 14:22:09 +0100374 if (!Runtime::Current()->UseJitCompilation()) {
375 // No need to notify if we only use the JIT to save profiles.
376 return;
377 }
Tamas Berghammer160e6df2016-01-05 14:29:02 +0000378 jit::Jit* jit = Runtime::Current()->GetJit();
Calin Juravleffc87072016-04-20 14:22:09 +0100379 if (jit->generate_debug_info_) {
Tamas Berghammerfffbee42016-01-15 13:09:34 +0000380 DCHECK(jit->jit_types_loaded_ != nullptr);
381 jit->jit_types_loaded_(jit->jit_compiler_handle_, &type, 1);
382 }
383}
384
385void Jit::DumpTypeInfoForLoadedTypes(ClassLinker* linker) {
386 struct CollectClasses : public ClassVisitor {
Mathieu Chartier28357fa2016-10-18 16:27:40 -0700387 bool operator()(ObjPtr<mirror::Class> klass) OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) {
388 classes_.push_back(klass.Ptr());
Tamas Berghammerfffbee42016-01-15 13:09:34 +0000389 return true;
390 }
Mathieu Chartier9b1c9b72016-02-02 10:09:58 -0800391 std::vector<mirror::Class*> classes_;
Tamas Berghammerfffbee42016-01-15 13:09:34 +0000392 };
393
394 if (generate_debug_info_) {
395 ScopedObjectAccess so(Thread::Current());
396
397 CollectClasses visitor;
398 linker->VisitClasses(&visitor);
399 jit_types_loaded_(jit_compiler_handle_, visitor.classes_.data(), visitor.classes_.size());
Tamas Berghammer160e6df2016-01-05 14:29:02 +0000400 }
401}
402
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000403extern "C" void art_quick_osr_stub(void** stack,
404 uint32_t stack_size_in_bytes,
405 const uint8_t* native_pc,
406 JValue* result,
407 const char* shorty,
408 Thread* self);
409
410bool Jit::MaybeDoOnStackReplacement(Thread* thread,
411 ArtMethod* method,
412 uint32_t dex_pc,
413 int32_t dex_pc_offset,
414 JValue* result) {
Nicolas Geoffraye8662132016-02-15 10:00:42 +0000415 if (!kEnableOnStackReplacement) {
416 return false;
417 }
418
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000419 Jit* jit = Runtime::Current()->GetJit();
420 if (jit == nullptr) {
421 return false;
422 }
423
Nicolas Geoffrayb88d59e2016-02-17 11:31:49 +0000424 if (UNLIKELY(__builtin_frame_address(0) < thread->GetStackEnd())) {
425 // Don't attempt to do an OSR if we are close to the stack limit. Since
426 // the interpreter frames are still on stack, OSR has the potential
427 // to stack overflow even for a simple loop.
428 // b/27094810.
429 return false;
430 }
431
Nicolas Geoffrayd9bc4332016-02-05 23:32:25 +0000432 // Get the actual Java method if this method is from a proxy class. The compiler
433 // and the JIT code cache do not expect methods from proxy classes.
Andreas Gampe542451c2016-07-26 09:02:02 -0700434 method = method->GetInterfaceMethodIfProxy(kRuntimePointerSize);
Nicolas Geoffrayd9bc4332016-02-05 23:32:25 +0000435
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000436 // Cheap check if the method has been compiled already. That's an indicator that we should
437 // osr into it.
438 if (!jit->GetCodeCache()->ContainsPc(method->GetEntryPointFromQuickCompiledCode())) {
439 return false;
440 }
441
Nicolas Geoffrayc0b27962016-02-16 12:06:05 +0000442 // Fetch some data before looking up for an OSR method. We don't want thread
443 // suspension once we hold an OSR method, as the JIT code cache could delete the OSR
444 // method while we are being suspended.
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000445 const size_t number_of_vregs = method->GetCodeItem()->registers_size_;
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000446 const char* shorty = method->GetShorty();
David Sehr709b0702016-10-13 09:12:37 -0700447 std::string method_name(VLOG_IS_ON(jit) ? method->PrettyMethod() : "");
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000448 void** memory = nullptr;
449 size_t frame_size = 0;
450 ShadowFrame* shadow_frame = nullptr;
451 const uint8_t* native_pc = nullptr;
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000452
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000453 {
Mathieu Chartier268764d2016-09-13 12:09:38 -0700454 ScopedAssertNoThreadSuspension sts("Holding OSR method");
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000455 const OatQuickMethodHeader* osr_method = jit->GetCodeCache()->LookupOsrMethodHeader(method);
456 if (osr_method == nullptr) {
457 // No osr method yet, just return to the interpreter.
458 return false;
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000459 }
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000460
461 CodeInfo code_info = osr_method->GetOptimizedCodeInfo();
David Srbecky09ed0982016-02-12 21:58:43 +0000462 CodeInfoEncoding encoding = code_info.ExtractEncoding();
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000463
464 // Find stack map starting at the target dex_pc.
465 StackMap stack_map = code_info.GetOsrStackMapForDexPc(dex_pc + dex_pc_offset, encoding);
466 if (!stack_map.IsValid()) {
467 // There is no OSR stack map for this dex pc offset. Just return to the interpreter in the
468 // hope that the next branch has one.
469 return false;
470 }
471
Aart Bik29bdaee2016-05-18 15:44:07 -0700472 // Before allowing the jump, make sure the debugger is not active to avoid jumping from
473 // interpreter to OSR while e.g. single stepping. Note that we could selectively disable
474 // OSR when single stepping, but that's currently hard to know at this point.
475 if (Dbg::IsDebuggerActive()) {
476 return false;
477 }
478
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000479 // We found a stack map, now fill the frame with dex register values from the interpreter's
480 // shadow frame.
481 DexRegisterMap vreg_map =
482 code_info.GetDexRegisterMapOf(stack_map, encoding, number_of_vregs);
483
484 frame_size = osr_method->GetFrameSizeInBytes();
485
486 // Allocate memory to put shadow frame values. The osr stub will copy that memory to
487 // stack.
488 // Note that we could pass the shadow frame to the stub, and let it copy the values there,
489 // but that is engineering complexity not worth the effort for something like OSR.
490 memory = reinterpret_cast<void**>(malloc(frame_size));
491 CHECK(memory != nullptr);
492 memset(memory, 0, frame_size);
493
494 // Art ABI: ArtMethod is at the bottom of the stack.
495 memory[0] = method;
496
497 shadow_frame = thread->PopShadowFrame();
498 if (!vreg_map.IsValid()) {
499 // If we don't have a dex register map, then there are no live dex registers at
500 // this dex pc.
501 } else {
502 for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) {
503 DexRegisterLocation::Kind location =
504 vreg_map.GetLocationKind(vreg, number_of_vregs, code_info, encoding);
505 if (location == DexRegisterLocation::Kind::kNone) {
Nicolas Geoffrayc0b27962016-02-16 12:06:05 +0000506 // Dex register is dead or uninitialized.
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000507 continue;
508 }
509
510 if (location == DexRegisterLocation::Kind::kConstant) {
511 // We skip constants because the compiled code knows how to handle them.
512 continue;
513 }
514
David Srbecky7dc11782016-02-25 13:23:56 +0000515 DCHECK_EQ(location, DexRegisterLocation::Kind::kInStack);
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000516
517 int32_t vreg_value = shadow_frame->GetVReg(vreg);
518 int32_t slot_offset = vreg_map.GetStackOffsetInBytes(vreg,
519 number_of_vregs,
520 code_info,
521 encoding);
522 DCHECK_LT(slot_offset, static_cast<int32_t>(frame_size));
523 DCHECK_GT(slot_offset, 0);
524 (reinterpret_cast<int32_t*>(memory))[slot_offset / sizeof(int32_t)] = vreg_value;
525 }
526 }
527
Mathieu Chartier575d3e62017-02-06 11:00:40 -0800528 native_pc = stack_map.GetNativePcOffset(encoding.stack_map.encoding, kRuntimeISA) +
David Srbecky09ed0982016-02-12 21:58:43 +0000529 osr_method->GetEntryPoint();
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000530 VLOG(jit) << "Jumping to "
531 << method_name
532 << "@"
533 << std::hex << reinterpret_cast<uintptr_t>(native_pc);
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000534 }
535
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000536 {
537 ManagedStack fragment;
538 thread->PushManagedStackFragment(&fragment);
539 (*art_quick_osr_stub)(memory,
540 frame_size,
541 native_pc,
542 result,
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000543 shorty,
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000544 thread);
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000545
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000546 if (UNLIKELY(thread->GetException() == Thread::GetDeoptimizationException())) {
547 thread->DeoptimizeWithDeoptimizationException(result);
548 }
549 thread->PopManagedStackFragment(fragment);
550 }
551 free(memory);
552 thread->PushShadowFrame(shadow_frame);
Nicolas Geoffrayd186dd82016-02-16 10:03:44 +0000553 VLOG(jit) << "Done running OSR code for " << method_name;
Nicolas Geoffrayb331feb2016-02-05 16:51:53 +0000554 return true;
555}
556
Nicolas Geoffraya4f81542016-03-08 16:57:48 +0000557void Jit::AddMemoryUsage(ArtMethod* method, size_t bytes) {
558 if (bytes > 4 * MB) {
559 LOG(INFO) << "Compiler allocated "
560 << PrettySize(bytes)
561 << " to compile "
David Sehr709b0702016-10-13 09:12:37 -0700562 << ArtMethod::PrettyMethod(method);
Nicolas Geoffraya4f81542016-03-08 16:57:48 +0000563 }
564 MutexLock mu(Thread::Current(), lock_);
565 memory_use_.AddValue(bytes);
566}
567
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100568class JitCompileTask FINAL : public Task {
569 public:
570 enum TaskKind {
571 kAllocateProfile,
572 kCompile,
573 kCompileOsr
574 };
575
576 JitCompileTask(ArtMethod* method, TaskKind kind) : method_(method), kind_(kind) {
577 ScopedObjectAccess soa(Thread::Current());
578 // Add a global ref to the class to prevent class unloading until compilation is done.
579 klass_ = soa.Vm()->AddGlobalRef(soa.Self(), method_->GetDeclaringClass());
580 CHECK(klass_ != nullptr);
581 }
582
583 ~JitCompileTask() {
584 ScopedObjectAccess soa(Thread::Current());
585 soa.Vm()->DeleteGlobalRef(soa.Self(), klass_);
586 }
587
588 void Run(Thread* self) OVERRIDE {
589 ScopedObjectAccess soa(self);
590 if (kind_ == kCompile) {
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100591 Runtime::Current()->GetJit()->CompileMethod(method_, self, /* osr */ false);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100592 } else if (kind_ == kCompileOsr) {
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100593 Runtime::Current()->GetJit()->CompileMethod(method_, self, /* osr */ true);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100594 } else {
595 DCHECK(kind_ == kAllocateProfile);
596 if (ProfilingInfo::Create(self, method_, /* retry_allocation */ true)) {
David Sehr709b0702016-10-13 09:12:37 -0700597 VLOG(jit) << "Start profiling " << ArtMethod::PrettyMethod(method_);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100598 }
599 }
Calin Juravlea2638922016-04-29 16:44:11 +0100600 ProfileSaver::NotifyJitActivity();
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100601 }
602
603 void Finalize() OVERRIDE {
604 delete this;
605 }
606
607 private:
608 ArtMethod* const method_;
609 const TaskKind kind_;
610 jobject klass_;
611
612 DISALLOW_IMPLICIT_CONSTRUCTORS(JitCompileTask);
613};
614
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100615void Jit::AddSamples(Thread* self, ArtMethod* method, uint16_t count, bool with_backedges) {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100616 if (thread_pool_ == nullptr) {
617 // Should only see this when shutting down.
618 DCHECK(Runtime::Current()->IsShuttingDown(self));
619 return;
620 }
621
Nicolas Geoffray250a3782016-04-20 16:27:53 +0100622 if (method->IsClassInitializer() || method->IsNative() || !method->IsCompilable()) {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100623 // We do not want to compile such methods.
624 return;
625 }
626 DCHECK(thread_pool_ != nullptr);
627 DCHECK_GT(warm_method_threshold_, 0);
628 DCHECK_GT(hot_method_threshold_, warm_method_threshold_);
629 DCHECK_GT(osr_method_threshold_, hot_method_threshold_);
630 DCHECK_GE(priority_thread_weight_, 1);
631 DCHECK_LE(priority_thread_weight_, hot_method_threshold_);
632
633 int32_t starting_count = method->GetCounter();
634 if (Jit::ShouldUsePriorityThreadWeight()) {
635 count *= priority_thread_weight_;
636 }
637 int32_t new_count = starting_count + count; // int32 here to avoid wrap-around;
638 if (starting_count < warm_method_threshold_) {
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100639 if ((new_count >= warm_method_threshold_) &&
Andreas Gampe542451c2016-07-26 09:02:02 -0700640 (method->GetProfilingInfo(kRuntimePointerSize) == nullptr)) {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100641 bool success = ProfilingInfo::Create(self, method, /* retry_allocation */ false);
642 if (success) {
David Sehr709b0702016-10-13 09:12:37 -0700643 VLOG(jit) << "Start profiling " << method->PrettyMethod();
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100644 }
645
646 if (thread_pool_ == nullptr) {
647 // Calling ProfilingInfo::Create might put us in a suspended state, which could
648 // lead to the thread pool being deleted when we are shutting down.
649 DCHECK(Runtime::Current()->IsShuttingDown(self));
650 return;
651 }
652
653 if (!success) {
654 // We failed allocating. Instead of doing the collection on the Java thread, we push
655 // an allocation to a compiler thread, that will do the collection.
656 thread_pool_->AddTask(self, new JitCompileTask(method, JitCompileTask::kAllocateProfile));
657 }
658 }
659 // Avoid jumping more than one state at a time.
660 new_count = std::min(new_count, hot_method_threshold_ - 1);
Calin Juravleffc87072016-04-20 14:22:09 +0100661 } else if (use_jit_compilation_) {
662 if (starting_count < hot_method_threshold_) {
663 if ((new_count >= hot_method_threshold_) &&
664 !code_cache_->ContainsPc(method->GetEntryPointFromQuickCompiledCode())) {
665 DCHECK(thread_pool_ != nullptr);
666 thread_pool_->AddTask(self, new JitCompileTask(method, JitCompileTask::kCompile));
667 }
668 // Avoid jumping more than one state at a time.
669 new_count = std::min(new_count, osr_method_threshold_ - 1);
670 } else if (starting_count < osr_method_threshold_) {
671 if (!with_backedges) {
672 // If the samples don't contain any back edge, we don't increment the hotness.
673 return;
674 }
675 if ((new_count >= osr_method_threshold_) && !code_cache_->IsOsrCompiled(method)) {
676 DCHECK(thread_pool_ != nullptr);
677 thread_pool_->AddTask(self, new JitCompileTask(method, JitCompileTask::kCompileOsr));
678 }
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100679 }
680 }
681 // Update hotness counter
682 method->SetCounter(new_count);
683}
684
685void Jit::MethodEntered(Thread* thread, ArtMethod* method) {
Calin Juravleffc87072016-04-20 14:22:09 +0100686 Runtime* runtime = Runtime::Current();
687 if (UNLIKELY(runtime->UseJitCompilation() && runtime->GetJit()->JitAtFirstUse())) {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100688 // The compiler requires a ProfilingInfo object.
689 ProfilingInfo::Create(thread, method, /* retry_allocation */ true);
690 JitCompileTask compile_task(method, JitCompileTask::kCompile);
691 compile_task.Run(thread);
692 return;
693 }
694
Andreas Gampe542451c2016-07-26 09:02:02 -0700695 ProfilingInfo* profiling_info = method->GetProfilingInfo(kRuntimePointerSize);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100696 // Update the entrypoint if the ProfilingInfo has one. The interpreter will call it
697 // instead of interpreting the method.
Nicolas Geoffray480d5102016-04-18 12:09:30 +0100698 if ((profiling_info != nullptr) && (profiling_info->GetSavedEntryPoint() != nullptr)) {
699 Runtime::Current()->GetInstrumentation()->UpdateMethodsCode(
700 method, profiling_info->GetSavedEntryPoint());
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100701 } else {
Nicolas Geoffray71cd50f2016-04-14 15:00:33 +0100702 AddSamples(thread, method, 1, /* with_backedges */false);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100703 }
704}
705
Mathieu Chartieref41db72016-10-25 15:08:01 -0700706void Jit::InvokeVirtualOrInterface(ObjPtr<mirror::Object> this_object,
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100707 ArtMethod* caller,
708 uint32_t dex_pc,
709 ArtMethod* callee ATTRIBUTE_UNUSED) {
Mathieu Chartier268764d2016-09-13 12:09:38 -0700710 ScopedAssertNoThreadSuspension ants(__FUNCTION__);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100711 DCHECK(this_object != nullptr);
Andreas Gampe542451c2016-07-26 09:02:02 -0700712 ProfilingInfo* info = caller->GetProfilingInfo(kRuntimePointerSize);
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100713 if (info != nullptr) {
Nicolas Geoffray274fe4a2016-04-12 16:33:24 +0100714 info->AddInvokeInfo(dex_pc, this_object->GetClass());
715 }
716}
717
718void Jit::WaitForCompilationToFinish(Thread* self) {
719 if (thread_pool_ != nullptr) {
720 thread_pool_->Wait(self, false, false);
721 }
722}
723
Nicolas Geoffray021c5f22016-12-16 11:22:05 +0000724void Jit::Stop() {
725 Thread* self = Thread::Current();
726 // TODO(ngeoffray): change API to not require calling WaitForCompilationToFinish twice.
727 WaitForCompilationToFinish(self);
728 GetThreadPool()->StopWorkers(self);
729 WaitForCompilationToFinish(self);
730}
731
732void Jit::Start() {
733 GetThreadPool()->StartWorkers(Thread::Current());
734}
735
Andreas Gampef149b3f2016-11-16 14:58:24 -0800736ScopedJitSuspend::ScopedJitSuspend() {
737 jit::Jit* jit = Runtime::Current()->GetJit();
738 was_on_ = (jit != nullptr) && (jit->GetThreadPool() != nullptr);
739 if (was_on_) {
Nicolas Geoffray021c5f22016-12-16 11:22:05 +0000740 jit->Stop();
Andreas Gampef149b3f2016-11-16 14:58:24 -0800741 }
742}
743
744ScopedJitSuspend::~ScopedJitSuspend() {
745 if (was_on_) {
746 DCHECK(Runtime::Current()->GetJit() != nullptr);
747 DCHECK(Runtime::Current()->GetJit()->GetThreadPool() != nullptr);
Nicolas Geoffray021c5f22016-12-16 11:22:05 +0000748 Runtime::Current()->GetJit()->Start();
Andreas Gampef149b3f2016-11-16 14:58:24 -0800749 }
750}
751
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800752} // namespace jit
753} // namespace art