Index: runtime/vm/intrinsifier_arm64.cc |
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc |
index 88512e81816c74ca911ac4b1e266215bb48cee89..7a95406e4e57e306debe81b53292055264544fb7 100644 |
--- a/runtime/vm/intrinsifier_arm64.cc |
+++ b/runtime/vm/intrinsifier_arm64.cc |
@@ -14,6 +14,7 @@ |
#include "vm/object_store.h" |
#include "vm/regexp_assembler.h" |
#include "vm/symbols.h" |
+#include "vm/timeline.h" |
namespace dart { |
@@ -2178,6 +2179,29 @@ void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
__ ret(); |
} |
+ |
+void Intrinsifier::Timeline_isDartStreamEnabled(Assembler* assembler) { |
+ if (!FLAG_support_timeline) { |
+ __ LoadObject(R0, Bool::False()); |
+ __ ret(); |
+ return; |
+ } |
+ Label true_label; |
+ // Load TimelineStream*. |
+ __ ldr(R0, Address(THR, Thread::dart_stream_offset())); |
+ // Load uintptr_t from TimelineStream*. |
+ __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); |
+ __ cmp(R0, Operand(0)); |
zra
2016/05/17 17:35:49
__ cmp(R0, Operand(0));
__ LoadObject(R0, Bool::Fa
|
+ __ b(&true_label, NE); |
+ // Not enabled. |
+ __ LoadObject(R0, Bool::False()); |
+ __ ret(); |
+ // Enabled. |
+ __ Bind(&true_label); |
+ __ LoadObject(R0, Bool::True()); |
+ __ ret(); |
+} |
+ |
} // namespace dart |
#endif // defined TARGET_ARCH_ARM64 |