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

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

Issue 302433007: WakeUp thread interrupter when isolate is made current (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « 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/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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 if (!FLAG_profile) { 145 if (!FLAG_profile) {
146 return; 146 return;
147 } 147 }
148 ASSERT(initialized_); 148 ASSERT(initialized_);
149 IsolateProfilerData* profiler_data = isolate->profiler_data(); 149 IsolateProfilerData* profiler_data = isolate->profiler_data();
150 if (profiler_data == NULL) { 150 if (profiler_data == NULL) {
151 return; 151 return;
152 } 152 }
153 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate); 153 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate);
154 ThreadInterrupter::WakeUp();
154 } 155 }
155 156
156 157
157 void Profiler::EndExecution(Isolate* isolate) { 158 void Profiler::EndExecution(Isolate* isolate) {
158 if (isolate == NULL) { 159 if (isolate == NULL) {
159 return; 160 return;
160 } 161 }
161 if (!FLAG_profile) { 162 if (!FLAG_profile) {
162 return; 163 return;
163 } 164 }
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 ProfilerDartStackWalker stackWalker(sample); 1861 ProfilerDartStackWalker stackWalker(sample);
1861 stackWalker.walk(); 1862 stackWalker.walk();
1862 } else { 1863 } else {
1863 // TODO(johnmccutchan): Support collecting only Dart frames with 1864 // TODO(johnmccutchan): Support collecting only Dart frames with
1864 // ProfilerNativeStackWalker. 1865 // ProfilerNativeStackWalker.
1865 } 1866 }
1866 } 1867 }
1867 } 1868 }
1868 1869
1869 } // namespace dart 1870 } // 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