diff options
Diffstat (limited to 'runtime/runtime.cc')
| -rw-r--r-- | runtime/runtime.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index d0aec116a4..2074f1e5f5 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -844,6 +844,18 @@ bool Runtime::Start() { 0); } + // In case we have a profile path passed as a command line argument, + // register the current class path for profiling now. Note that we cannot do + // this before we create the JIT and having it here is the most convenient way. + // This is used when testing profiles with dalvikvm command as there is no + // framework to register the dex files for profiling. + if (jit_.get() != nullptr && jit_options_->GetSaveProfilingInfo() && + !jit_options_->GetProfileSaverOptions().GetProfilePath().empty()) { + std::vector<std::string> dex_filenames; + Split(class_path_string_, ':', &dex_filenames); + RegisterAppInfo(dex_filenames, jit_options_->GetProfileSaverOptions().GetProfilePath()); + } + return true; } @@ -2410,18 +2422,6 @@ void Runtime::CreateJit() { LOG(WARNING) << "Failed to create JIT " << error_msg; return; } - - // In case we have a profile path passed as a command line argument, - // register the current class path for profiling now. Note that we cannot do - // this before we create the JIT and having it here is the most convenient way. - // This is used when testing profiles with dalvikvm command as there is no - // framework to register the dex files for profiling. - if (jit_options_->GetSaveProfilingInfo() && - !jit_options_->GetProfileSaverOptions().GetProfilePath().empty()) { - std::vector<std::string> dex_filenames; - Split(class_path_string_, ':', &dex_filenames); - RegisterAppInfo(dex_filenames, jit_options_->GetProfileSaverOptions().GetProfilePath()); - } } bool Runtime::CanRelocate() const { |