summaryrefslogtreecommitdiff
path: root/compiler/jit/jit_compiler.cc
diff options
context:
space:
mode:
author Tamas Berghammer <tberghammer@google.com> 2016-01-28 12:06:37 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-01-28 12:06:37 +0000
commit5faf22c1d4eb5d711f792b73d3e5773d67160c8f (patch)
tree5e64d132ab1a03ca4d291138aa0ac1aaa360d9a9 /compiler/jit/jit_compiler.cc
parent8bfdf83aa73a19233f62b7a8d4761e84b1713db4 (diff)
parentf0615a3a8ca649a562e67219ab8b9c6a023f4928 (diff)
Merge "Don't crash if the perf map creation failed"
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r--compiler/jit/jit_compiler.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 478d169290..67747586c4 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -179,7 +179,7 @@ JitCompiler::JitCompiler() : total_time_(0) {
if (compiler_options_->GetGenerateDebugInfo()) {
#ifdef __ANDROID__
- const char* prefix = GetAndroidData();
+ const char* prefix = "/data/misc/trace";
#else
const char* prefix = "/tmp";
#endif
@@ -188,7 +188,8 @@ JitCompiler::JitCompiler() : total_time_(0) {
std::string perf_filename = std::string(prefix) + "/perf-" + std::to_string(getpid()) + ".map";
perf_file_.reset(OS::CreateEmptyFileWriteOnly(perf_filename.c_str()));
if (perf_file_ == nullptr) {
- LOG(FATAL) << "Could not create perf file at " << perf_filename;
+ LOG(ERROR) << "Could not create perf file at " << perf_filename <<
+ " Are you on a user build? Perf only works on userdebug/eng builds";
}
}
}
@@ -223,7 +224,7 @@ bool JitCompiler::CompileMethod(Thread* self, ArtMethod* method) {
ArtMethod* method_to_compile = method->GetInterfaceMethodIfProxy(sizeof(void*));
JitCodeCache* const code_cache = runtime->GetJit()->GetCodeCache();
success = compiler_driver_->GetCompiler()->JitCompile(self, code_cache, method_to_compile);
- if (success && compiler_options_->GetGenerateDebugInfo()) {
+ if (success && perf_file_ != nullptr) {
const void* ptr = method_to_compile->GetEntryPointFromQuickCompiledCode();
std::ostringstream stream;
stream << std::hex