diff options
| author | 2017-04-28 14:56:39 +0100 | |
|---|---|---|
| committer | 2017-04-28 14:56:39 +0100 | |
| commit | 46847395470e414cd2aa1c6ea13e9a3d08e2b46b (patch) | |
| tree | 58855458907fe55c863e74be0b9a554664c0ee61 /compiler/driver/compiler_driver.cc | |
| parent | cf7d5d6b352442a7abf02a5b53a4575d395d0e97 (diff) | |
Honor --force-determinism for vdex.
b/37442966
Test: build
Change-Id: I220450ad204cf41ed24c2c98cdfc35aa9041a35e
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
| -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 f77b3ddfe0..f41ccc23cd 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2088,16 +2088,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); } |