summaryrefslogtreecommitdiff
path: root/compiler/jit/jit_compiler.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-06-01 19:12:36 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-06-01 19:55:15 -0700
commit5783a74163878095475596fabc0b9cb04bec467b (patch)
treec6b4bb107841320abbaa1402484df67c3f4a0a3b /compiler/jit/jit_compiler.cc
parent8fa1d6a1371cc452e32808b4e97e81da2310ef60 (diff)
Add clear cache for JIT
Bug: 21572270 Change-Id: I711a9ee2d9688a8e4b59380c401f10f42c6c068e
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r--compiler/jit/jit_compiler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index d0a926f334..a1d8226f36 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -243,6 +243,9 @@ bool JitCompiler::AddToCodeCache(ArtMethod* method, const CompiledMethod* compil
compiled_method, code_reserve, code_reserve + reserve_size, mapping_table_ptr,
vmap_table_ptr, gc_map_ptr);
+ __builtin___clear_cache(reinterpret_cast<char*>(code_ptr),
+ reinterpret_cast<char*>(code_ptr + quick_code->size()));
+
const size_t thumb_offset = compiled_method->CodeDelta();
const uint32_t code_offset = code_ptr - base + thumb_offset;
*out_method = OatFile::OatMethod(base, code_offset);