From bcd5e9daecad39f0dab3246808b4835caec29ea6 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 13 Nov 2013 14:33:28 -0800 Subject: Manually manage thread pool stacks. We now allocate the thread pool worker stack using a MemMap. This enables us to name the maps so that we get more descriptive output for debugging leaks. Appears to fix the mips build 5/5 successful clean-oat and builds. This is probably since glibc caches up to 40 MB of thread stacks before releasing them. Change-Id: I1df2de50cb95838aa0d272a09807021404ba410c --- compiler/driver/compiler_driver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 4af492bf6e..d74383e33b 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -505,7 +505,7 @@ void CompilerDriver::CompileAll(jobject class_loader, const std::vector& dex_files, base::TimingLogger& timings) { DCHECK(!Runtime::Current()->IsStarted()); - UniquePtr thread_pool(new ThreadPool(thread_count_ - 1)); + UniquePtr thread_pool(new ThreadPool("Compiler driver thread pool", thread_count_ - 1)); PreCompile(class_loader, dex_files, *thread_pool.get(), timings); Compile(class_loader, dex_files, *thread_pool.get(), timings); if (dump_stats_) { @@ -568,7 +568,7 @@ void CompilerDriver::CompileOne(const mirror::ArtMethod* method, base::TimingLog std::vector dex_files; dex_files.push_back(dex_file); - UniquePtr thread_pool(new ThreadPool(0U)); + UniquePtr thread_pool(new ThreadPool("Compiler driver thread pool", 0U)); PreCompile(jclass_loader, dex_files, *thread_pool.get(), timings); uint32_t method_idx = method->GetDexMethodIndex(); -- cgit v1.2.3-59-g8ed1b