diff options
author | 2016-12-15 17:58:48 +0000 | |
---|---|---|
committer | 2016-12-15 18:01:52 +0000 | |
commit | ed015acdd0fbb1b837b3f74e8c5f624956189691 (patch) | |
tree | b8ec86c504bf665cd59074fae49136dfe7c6c9f5 /compiler/optimizing/optimizing_compiler.cc | |
parent | 9538f9e2a5d03f1b1bc07ebfbd93b61dcf8ad604 (diff) |
Flush JIT data cache when committing code.
Otherwise, executing compiled code may see old data from
the data cache.
Test: ART_TEST_JIT=true test-art-target on arm/arm64
Test: run-libcore-tests.sh (especially jsr166) on arm/arm64
Change-Id: Id037c68897aa0e9ccacd4c5121f3743fb722c6f3
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index ba7012ab1a..0d0f62a55c 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1193,7 +1193,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, } uint8_t* stack_map_data = nullptr; uint8_t* roots_data = nullptr; - code_cache->ReserveData( + uint32_t data_size = code_cache->ReserveData( self, stack_map_size, number_of_roots, method, &stack_map_data, &roots_data); if (stack_map_data == nullptr || roots_data == nullptr) { return false; @@ -1212,6 +1212,7 @@ bool OptimizingCompiler::JitCompile(Thread* self, codegen->GetFpuSpillMask(), code_allocator.GetMemory().data(), code_allocator.GetSize(), + data_size, osr, roots, codegen->GetGraph()->HasShouldDeoptimizeFlag(), |