summaryrefslogtreecommitdiff
path: root/compiler/jit
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-03-10 10:47:57 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-03-10 10:47:57 +0000
commite87fe952e94ae97ebdf84e342d91eeb8b9aef06b (patch)
tree69e14ce007f842ca72fe7e07164ca2374ec5cf6a /compiler/jit
parent93e46b2a14050d8f65088ccb44d6fab6c1c46b2c (diff)
parentb6e20ae17d0881a66c22532e4152ce6779454a92 (diff)
Merge "Clear inline caches at each full GC."
Diffstat (limited to 'compiler/jit')
-rw-r--r--compiler/jit/jit_compiler.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 9a779464f6..cda2e274ce 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -169,13 +169,14 @@ JitCompiler::JitCompiler() {
compiler_driver_->SetDedupeEnabled(false);
compiler_driver_->SetSupportBootImageFixup(false);
+ size_t thread_count = compiler_driver_->GetThreadCount();
if (compiler_options_->GetGenerateDebugInfo()) {
#ifdef __ANDROID__
const char* prefix = "/data/misc/trace";
#else
const char* prefix = "/tmp";
#endif
- DCHECK_EQ(compiler_driver_->GetThreadCount(), 1u)
+ DCHECK_EQ(thread_count, 1u)
<< "Generating debug info only works with one compiler thread";
std::string perf_filename = std::string(prefix) + "/perf-" + std::to_string(getpid()) + ".map";
perf_file_.reset(OS::CreateEmptyFileWriteOnly(perf_filename.c_str()));
@@ -184,6 +185,10 @@ JitCompiler::JitCompiler() {
" Are you on a user build? Perf only works on userdebug/eng builds";
}
}
+
+ size_t inline_depth_limit = compiler_driver_->GetCompilerOptions().GetInlineDepthLimit();
+ DCHECK_LT(thread_count * inline_depth_limit, std::numeric_limits<uint16_t>::max())
+ << "ProfilingInfo's inline counter can potentially overflow";
}
JitCompiler::~JitCompiler() {