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

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

Issue 132163005: Version 1.1.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | sdk/lib/io/stdio.dart » ('j') | 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/utils.h" 5 #include "platform/utils.h"
6 6
7 #include "vm/allocation.h" 7 #include "vm/allocation.h"
8 #include "vm/atomic.h" 8 #include "vm/atomic.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 14 matching lines...) Expand all
25 // The stack frame walking code uses the frame pointer to traverse the stack. 25 // The stack frame walking code uses the frame pointer to traverse the stack.
26 // If the VM is compiled without frame pointers (which is the default on 26 // If the VM is compiled without frame pointers (which is the default on
27 // recent GCC versions with optimizing enabled) the stack walking code may 27 // recent GCC versions with optimizing enabled) the stack walking code may
28 // fail (sometimes leading to a crash). 28 // fail (sometimes leading to a crash).
29 // 29 //
30 30
31 #if defined(USING_SIMULATOR) || defined(TARGET_OS_WINDOWS) || \ 31 #if defined(USING_SIMULATOR) || defined(TARGET_OS_WINDOWS) || \
32 defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID) 32 defined(TARGET_OS_MACOS) || defined(TARGET_OS_ANDROID)
33 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler"); 33 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler");
34 #else 34 #else
35 DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler"); 35 DEFINE_FLAG(bool, profile, false, "Enable Sampling Profiler");
36 #endif 36 #endif
37 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates."); 37 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates.");
38 DEFINE_FLAG(charp, profile_dir, NULL, 38 DEFINE_FLAG(charp, profile_dir, NULL,
39 "Enable writing profile data into specified directory."); 39 "Enable writing profile data into specified directory.");
40 DEFINE_FLAG(int, profile_period, 1000, 40 DEFINE_FLAG(int, profile_period, 1000,
41 "Time between profiler samples in microseconds. Minimum 250."); 41 "Time between profiler samples in microseconds. Minimum 250.");
42 42
43 bool Profiler::initialized_ = false; 43 bool Profiler::initialized_ = false;
44 Monitor* Profiler::monitor_ = NULL; 44 Monitor* Profiler::monitor_ = NULL;
45 SampleBuffer* Profiler::sample_buffer_ = NULL; 45 SampleBuffer* Profiler::sample_buffer_ = NULL;
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 return false; 791 return false;
792 } 792 }
793 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); 793 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp);
794 cursor += sizeof(fp); 794 cursor += sizeof(fp);
795 bool r = cursor >= lower_bound_ && cursor < stack_upper_; 795 bool r = cursor >= lower_bound_ && cursor < stack_upper_;
796 return r; 796 return r;
797 } 797 }
798 798
799 799
800 } // namespace dart 800 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | sdk/lib/io/stdio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698