OLD | NEW |
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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 | 943 |
944 const bool in_dart_code = thread->IsExecutingDartCode(); | 944 const bool in_dart_code = thread->IsExecutingDartCode(); |
945 | 945 |
946 uintptr_t sp = 0; | 946 uintptr_t sp = 0; |
947 uintptr_t fp = state.fp; | 947 uintptr_t fp = state.fp; |
948 uintptr_t pc = state.pc; | 948 uintptr_t pc = state.pc; |
949 #if defined(USING_SIMULATOR) | 949 #if defined(USING_SIMULATOR) |
950 Simulator* simulator = NULL; | 950 Simulator* simulator = NULL; |
951 #endif | 951 #endif |
952 | 952 |
| 953 ASSERT(thread != NULL); |
| 954 Isolate* isolate = thread->isolate(); |
| 955 |
953 if (in_dart_code) { | 956 if (in_dart_code) { |
954 // If we're in Dart code, use the Dart stack pointer. | 957 // If we're in Dart code, use the Dart stack pointer. |
955 #if defined(USING_SIMULATOR) | 958 #if defined(USING_SIMULATOR) |
956 simulator = isolate->simulator(); | 959 simulator = isolate->simulator(); |
957 sp = simulator->get_register(SPREG); | 960 sp = simulator->get_register(SPREG); |
958 fp = simulator->get_register(FPREG); | 961 fp = simulator->get_register(FPREG); |
959 pc = simulator->get_pc(); | 962 pc = simulator->get_pc(); |
960 #else | 963 #else |
961 sp = state.dsp; | 964 sp = state.dsp; |
962 #endif | 965 #endif |
963 } else { | 966 } else { |
964 // If we're in runtime code, use the C stack pointer. | 967 // If we're in runtime code, use the C stack pointer. |
965 sp = state.csp; | 968 sp = state.csp; |
966 } | 969 } |
967 | 970 |
968 if (!InitialRegisterCheck(pc, fp, sp)) { | 971 if (!InitialRegisterCheck(pc, fp, sp)) { |
969 return; | 972 return; |
970 } | 973 } |
971 | 974 |
972 ASSERT(thread != NULL); | |
973 Isolate* isolate = thread->isolate(); | |
974 if (!CheckIsolate(isolate)) { | 975 if (!CheckIsolate(isolate)) { |
975 return; | 976 return; |
976 } | 977 } |
977 | 978 |
978 if (!thread->IsMutatorThread()) { | 979 if (!thread->IsMutatorThread()) { |
979 // Not a mutator thread. | 980 // Not a mutator thread. |
980 // TODO(johnmccutchan): Profile all threads with an isolate. | 981 // TODO(johnmccutchan): Profile all threads with an isolate. |
981 return; | 982 return; |
982 } | 983 } |
983 | 984 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 uword pc) { | 1259 uword pc) { |
1259 return vm_isolate->heap()->CodeContains(pc) | 1260 return vm_isolate->heap()->CodeContains(pc) |
1260 || isolate->heap()->CodeContains(pc); | 1261 || isolate->heap()->CodeContains(pc); |
1261 } | 1262 } |
1262 | 1263 |
1263 | 1264 |
1264 ProcessedSampleBuffer::ProcessedSampleBuffer() { | 1265 ProcessedSampleBuffer::ProcessedSampleBuffer() { |
1265 } | 1266 } |
1266 | 1267 |
1267 } // namespace dart | 1268 } // namespace dart |
OLD | NEW |