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

Side by Side Diff: runtime/vm/profiler.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 years, 4 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "platform/address_sanitizer.h" 5 #include "platform/address_sanitizer.h"
6 #include "platform/memory_sanitizer.h" 6 #include "platform/memory_sanitizer.h"
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 8
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 uword pc() { 197 uword pc() {
198 return pc_; 198 return pc_;
199 } 199 }
200 200
201 // Returns false on failure. 201 // Returns false on failure.
202 bool LocateReturnAddress(uword* return_address); 202 bool LocateReturnAddress(uword* return_address);
203 203
204 // Returns offset into code object. 204 // Returns offset into code object.
205 intptr_t RelativePC() { 205 intptr_t RelativePC() {
206 ASSERT(pc() >= code_.EntryPoint()); 206 ASSERT(pc() >= code_.PayloadStart());
207 return static_cast<intptr_t>(pc() - code_.EntryPoint()); 207 return static_cast<intptr_t>(pc() - code_.PayloadStart());
208 } 208 }
209 209
210 uint8_t* CodePointer(intptr_t offset) { 210 uint8_t* CodePointer(intptr_t offset) {
211 const intptr_t size = code_.Size(); 211 const intptr_t size = code_.Size();
212 ASSERT(offset < size); 212 ASSERT(offset < size);
213 uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code_.EntryPoint()); 213 uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code_.PayloadStart());
214 code_pointer += offset; 214 code_pointer += offset;
215 return code_pointer; 215 return code_pointer;
216 } 216 }
217 217
218 uword StackAt(intptr_t i) { 218 uword StackAt(intptr_t i) {
219 ASSERT(i >= 0); 219 ASSERT(i >= 0);
220 ASSERT(i < Sample::kStackBufferSizeInWords); 220 ASSERT(i < Sample::kStackBufferSizeInWords);
221 return stack_buffer_[i]; 221 return stack_buffer_[i];
222 } 222 }
223 223
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1255 }
1256 1256
1257 1257
1258 1258
1259 CodeDescriptor::CodeDescriptor(const Code& code) : code_(code) { 1259 CodeDescriptor::CodeDescriptor(const Code& code) : code_(code) {
1260 ASSERT(!code_.IsNull()); 1260 ASSERT(!code_.IsNull());
1261 } 1261 }
1262 1262
1263 1263
1264 uword CodeDescriptor::Entry() const { 1264 uword CodeDescriptor::Entry() const {
1265 return code_.EntryPoint(); 1265 // BOGUS?
Florian Schneider 2016/08/10 02:32:14 Left-over?
rmacnak 2016/08/11 00:17:49 Renamed as Start
1266 return code_.PayloadStart();
1266 } 1267 }
1267 1268
1268 1269
1269 uword CodeDescriptor::Size() const { 1270 uword CodeDescriptor::Size() const {
1270 return code_.Size(); 1271 return code_.Size();
1271 } 1272 }
1272 1273
1273 1274
1274 int64_t CodeDescriptor::CompileTimestamp() const { 1275 int64_t CodeDescriptor::CompileTimestamp() const {
1275 return code_.compile_timestamp(); 1276 return code_.compile_timestamp();
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 1582
1582 1583
1583 ProcessedSampleBuffer::ProcessedSampleBuffer() 1584 ProcessedSampleBuffer::ProcessedSampleBuffer()
1584 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { 1585 : code_lookup_table_(new CodeLookupTable(Thread::Current())) {
1585 ASSERT(code_lookup_table_ != NULL); 1586 ASSERT(code_lookup_table_ != NULL);
1586 } 1587 }
1587 1588
1588 #endif // !PRODUCT 1589 #endif // !PRODUCT
1589 1590
1590 } // namespace dart 1591 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698