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

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

Issue 1280023003: Fix VM profiler for simulator builds. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // it. Return |false| if anything looks suspicious. 834 // it. Return |false| if anything looks suspicious.
835 static bool GetAndValidateIsolateStackBounds(Isolate* isolate, 835 static bool GetAndValidateIsolateStackBounds(Isolate* isolate,
836 uintptr_t sp, 836 uintptr_t sp,
837 uintptr_t fp, 837 uintptr_t fp,
838 uword* stack_lower, 838 uword* stack_lower,
839 uword* stack_upper) { 839 uword* stack_upper) {
840 ASSERT(isolate != NULL); 840 ASSERT(isolate != NULL);
841 ASSERT(stack_lower != NULL); 841 ASSERT(stack_lower != NULL);
842 ASSERT(stack_upper != NULL); 842 ASSERT(stack_upper != NULL);
843 #if defined(USING_SIMULATOR) 843 #if defined(USING_SIMULATOR)
844 Simulator* simulator = NULL;
845 #endif
846
847 #if defined(USING_SIMULATOR)
848 const bool in_dart_code = ExecutingDart(isolate); 844 const bool in_dart_code = ExecutingDart(isolate);
849 if (in_dart_code) { 845 if (in_dart_code) {
846 Simulator* simulator = isolate->simulator();
850 *stack_lower = simulator->StackBase(); 847 *stack_lower = simulator->StackBase();
851 *stack_upper = simulator->StackTop(); 848 *stack_upper = simulator->StackTop();
852 } else if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper)) { 849 } else if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper)) {
853 // Could not get stack boundary. 850 // Could not get stack boundary.
854 return false; 851 return false;
855 } 852 }
856 if ((*stack_lower == 0) || (*stack_upper == 0)) { 853 if ((*stack_lower == 0) || (*stack_upper == 0)) {
857 return false; 854 return false;
858 } 855 }
859 #else 856 #else
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 uword pc) { 1319 uword pc) {
1323 return vm_isolate->heap()->CodeContains(pc) 1320 return vm_isolate->heap()->CodeContains(pc)
1324 || isolate->heap()->CodeContains(pc); 1321 || isolate->heap()->CodeContains(pc);
1325 } 1322 }
1326 1323
1327 1324
1328 ProcessedSampleBuffer::ProcessedSampleBuffer() { 1325 ProcessedSampleBuffer::ProcessedSampleBuffer() {
1329 } 1326 }
1330 1327
1331 } // namespace dart 1328 } // 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