diff options
| author | 2017-05-08 12:04:24 +0000 | |
|---|---|---|
| committer | 2017-05-08 12:04:26 +0000 | |
| commit | f5ccfb506c3a8f8c0377e65cc9f0f832be64fec8 (patch) | |
| tree | 1f215957e975e60f1dc6931070ab6f99228f3e3e /compiler | |
| parent | 81c50bf31d9f9e35890404a2baf93f2c1e061ad9 (diff) | |
| parent | 46847395470e414cd2aa1c6ea13e9a3d08e2b46b (diff) | |
Merge "Honor --force-determinism for vdex."
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index fbfa087cfd..a8ab7c6091 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2030,16 +2030,18 @@ void CompilerDriver::Verify(jobject jclass_loader, } } - // Note: verification should not be pulling in classes anymore when compiling the boot image, - // as all should have been resolved before. As such, doing this in parallel should still - // be deterministic. + // Verification updates VerifierDeps and needs to run single-threaded to be deterministic. + bool force_determinism = GetCompilerOptions().IsForceDeterminism(); + ThreadPool* verify_thread_pool = + force_determinism ? single_thread_pool_.get() : parallel_thread_pool_.get(); + size_t verify_thread_count = force_determinism ? 1U : parallel_thread_count_; for (const DexFile* dex_file : dex_files) { CHECK(dex_file != nullptr); VerifyDexFile(jclass_loader, *dex_file, dex_files, - parallel_thread_pool_.get(), - parallel_thread_count_, + verify_thread_pool, + verify_thread_count, timings); } |