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

Side by Side Diff: runtime/vm/intrinsifier_arm64.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
11 #include "vm/dart_entry.h" 11 #include "vm/dart_entry.h"
12 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
13 #include "vm/object.h" 13 #include "vm/object.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/regexp_assembler.h" 15 #include "vm/regexp_assembler.h"
16 #include "vm/symbols.h" 16 #include "vm/symbols.h"
17 #include "vm/timeline.h"
17 18
18 namespace dart { 19 namespace dart {
19 20
20 // When entering intrinsics code: 21 // When entering intrinsics code:
21 // R4: Arguments descriptor 22 // R4: Arguments descriptor
22 // LR: Return address 23 // LR: Return address
23 // The R4 register can be destroyed only if there is no slow-path, i.e. 24 // The R4 register can be destroyed only if there is no slow-path, i.e.
24 // if the intrinsified method always executes a return. 25 // if the intrinsified method always executes a return.
25 // The FP register should not be modified, because it is used by the profiler. 26 // The FP register should not be modified, because it is used by the profiler.
26 // The PP and THR registers (see constants_arm64.h) must be preserved. 27 // The PP and THR registers (see constants_arm64.h) must be preserved.
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 __ ret(); 2172 __ ret();
2172 } 2173 }
2173 2174
2174 2175
2175 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2176 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2176 __ LoadIsolate(R0); 2177 __ LoadIsolate(R0);
2177 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2178 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2178 __ ret(); 2179 __ ret();
2179 } 2180 }
2180 2181
2182
2183 void Intrinsifier::Timeline_isDartStreamEnabled(Assembler* assembler) {
2184 if (!FLAG_support_timeline) {
2185 __ LoadObject(R0, Bool::False());
2186 __ ret();
2187 return;
2188 }
2189 Label true_label;
2190 // Load TimelineStream*.
2191 __ ldr(R0, Address(THR, Thread::dart_stream_offset()));
2192 // Load uintptr_t from TimelineStream*.
2193 __ ldr(R0, Address(R0, TimelineStream::enabled_offset()));
2194 __ cmp(R0, Operand(0));
zra 2016/05/17 17:35:49 __ cmp(R0, Operand(0)); __ LoadObject(R0, Bool::Fa
2195 __ b(&true_label, NE);
2196 // Not enabled.
2197 __ LoadObject(R0, Bool::False());
2198 __ ret();
2199 // Enabled.
2200 __ Bind(&true_label);
2201 __ LoadObject(R0, Bool::True());
2202 __ ret();
2203 }
2204
2181 } // namespace dart 2205 } // namespace dart
2182 2206
2183 #endif // defined TARGET_ARCH_ARM64 2207 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698