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

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

Issue 1412903007: Fix simulator builds (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 OSThread::GetCurrentThreadId()); 926 OSThread::GetCurrentThreadId());
927 sample->SetAllocationCid(cid); 927 sample->SetAllocationCid(cid);
928 sample->set_vm_tag(VMTag::kEmbedderTagId); 928 sample->set_vm_tag(VMTag::kEmbedderTagId);
929 sample->SetAt(0, pc); 929 sample->SetAt(0, pc);
930 } 930 }
931 } 931 }
932 932
933 933
934 void Profiler::SampleThread(Thread* thread, 934 void Profiler::SampleThread(Thread* thread,
935 const InterruptedThreadState& state) { 935 const InterruptedThreadState& state) {
936 ASSERT(thread != NULL);
937 Isolate* isolate = thread->isolate();
938
936 if (StubCode::HasBeenInitialized() && 939 if (StubCode::HasBeenInitialized() &&
937 StubCode::InJumpToExceptionHandlerStub(state.pc)) { 940 StubCode::InJumpToExceptionHandlerStub(state.pc)) {
938 // The JumpToExceptionHandler stub manually adjusts the stack pointer, 941 // The JumpToExceptionHandler stub manually adjusts the stack pointer,
939 // frame pointer, and some isolate state before jumping to a catch entry. 942 // frame pointer, and some isolate state before jumping to a catch entry.
940 // It is not safe to walk the stack when executing this stub. 943 // It is not safe to walk the stack when executing this stub.
941 return; 944 return;
942 } 945 }
943 946
944 const bool in_dart_code = thread->IsExecutingDartCode(); 947 const bool in_dart_code = thread->IsExecutingDartCode();
945 948
(...skipping 16 matching lines...) Expand all
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698