diff options
| author | 2016-03-07 14:29:04 +0000 | |
|---|---|---|
| committer | 2016-03-09 17:25:19 +0000 | |
| commit | b6e20ae17d0881a66c22532e4152ce6779454a92 (patch) | |
| tree | 35d7fbfb812aef11ea51010794dce26eb91c1ae4 /compiler/jit/jit_compiler.cc | |
| parent | 8a8c84114b16b8971bc2d3c5c7e0e31470d1a68b (diff) | |
Clear inline caches at each full GC.
This fixes occasional failures of 141-class-unload.
Also fix a bug where clearing inline caches also cleared the dex
pc associated with it.
bug:26846185
bug:23128949
Change-Id: I77bf1dee229d7764c3cc21440829c7fba7b37001
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
| -rw-r--r-- | compiler/jit/jit_compiler.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index 6ff1e2e95e..eeb25763a7 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -168,13 +168,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())); @@ -183,6 +184,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() { |