Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Unified Diff: runtime/vm/intrinsifier_mips.cc

Issue 1985813002: Add an intrinsified early out path for Dart timeline calls (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intrinsifier_mips.cc
diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
index 2398a7b957d512cc3a278c788e4733e2fa33f164..d42bcde0b45e5a20e846cba9ab24383079641d1b 100644
--- a/runtime/vm/intrinsifier_mips.cc
+++ b/runtime/vm/intrinsifier_mips.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 {
@@ -2208,6 +2209,28 @@ void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
__ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
}
+
+void Intrinsifier::Timeline_isDartStreamEnabled(Assembler* assembler) {
+ if (!FLAG_support_timeline) {
+ __ LoadObject(V0, Bool::False());
+ __ Ret();
+ return;
+ }
+ Label true_label;
+ // Load TimelineStream*.
+ __ lw(V0, Address(THR, Thread::dart_stream_offset()));
+ // Load uintptr_t from TimelineStream*.
+ __ lw(V0, Address(V0, TimelineStream::enabled_offset()));
zra 2016/05/17 17:35:49 __ lw(T0, Address(V0, ...)); __ LoadObject(V0, Boo
+ __ bne(V0, ZR, &true_label);
+ // Not enabled.
+ __ LoadObject(V0, Bool::False());
+ __ Ret();
+ // Enabled.
+ __ Bind(&true_label);
+ __ LoadObject(V0, Bool::True());
+ __ Ret();
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_MIPS

Powered by Google App Engine
This is Rietveld 408576698