summaryrefslogtreecommitdiff
path: root/compiler/utils/jni_macro_assembler.h
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2017-06-06 16:09:59 +0100
committer Roland Levillain <rpl@google.com> 2017-08-10 18:17:47 +0100
commit2b03a1f24600c8c9558fb13d3f8bca1ef0f8ee40 (patch)
tree4d5fb728acd7f98f8949c84364375a804ff0ba63 /compiler/utils/jni_macro_assembler.h
parent461ec567f16039374dff35e2f3b808986c100249 (diff)
Instrument ARM64 generated code to check the Marking Register.
Generate run-time code in the Optimizing compiler checking that the Marking Register's value matches `self.tls32_.is.gc_marking` in debug mode (on target; and on host with JIT, or with AOT when compiling the core image). If a check fails, abort. Test: m test-art-target Test: m test-art-target with tree built with ART_USE_READ_BARRIER=false Test: ARM64 device boot test with libartd. Bug: 37707231 Change-Id: Ie9b322b22b3d26654a06821e1db71dbda3c43061
Diffstat (limited to 'compiler/utils/jni_macro_assembler.h')
-rw-r--r--compiler/utils/jni_macro_assembler.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h
index 59a1a48e20..a8ca1119e5 100644
--- a/compiler/utils/jni_macro_assembler.h
+++ b/compiler/utils/jni_macro_assembler.h
@@ -216,8 +216,15 @@ class JNIMacroAssembler : public DeletableArenaObject<kArenaAllocAssembler> {
*/
virtual DebugFrameOpCodeWriterForAssembler& cfi() = 0;
+ void SetEmitRunTimeChecksInDebugMode(bool value) {
+ emit_run_time_checks_in_debug_mode_ = value;
+ }
+
protected:
- explicit JNIMacroAssembler() {}
+ JNIMacroAssembler() {}
+
+ // Should run-time checks be emitted in debug mode?
+ bool emit_run_time_checks_in_debug_mode_ = false;
};
// A "Label" class used with the JNIMacroAssembler