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

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

Issue 113133010: Only interrupt thread don't record sample. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 <cstdio> 5 #include <cstdio>
6 6
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 8
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (profiler_data == NULL) { 126 if (profiler_data == NULL) {
127 return; 127 return;
128 } 128 }
129 SampleBuffer* sample_buffer = profiler_data->sample_buffer(); 129 SampleBuffer* sample_buffer = profiler_data->sample_buffer();
130 if (sample_buffer == NULL) { 130 if (sample_buffer == NULL) {
131 return; 131 return;
132 } 132 }
133 Sample* sample = sample_buffer->ReserveSample(); 133 Sample* sample = sample_buffer->ReserveSample();
134 sample->Init(Sample::kIsolateStart, isolate, OS::GetCurrentTimeMicros(), 134 sample->Init(Sample::kIsolateStart, isolate, OS::GetCurrentTimeMicros(),
135 Thread::GetCurrentThreadId()); 135 Thread::GetCurrentThreadId());
136 ThreadInterrupter::Register(RecordSampleInterruptCallback, isolate); 136 ThreadInterrupter::Register(ThreadInterruptNoOp, isolate);
137 } 137 }
138 138
139 139
140 void Profiler::EndExecution(Isolate* isolate) { 140 void Profiler::EndExecution(Isolate* isolate) {
141 if (isolate == NULL) { 141 if (isolate == NULL) {
142 return; 142 return;
143 } 143 }
144 if (!FLAG_profile) { 144 if (!FLAG_profile) {
145 return; 145 return;
146 } 146 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 return false; 513 return false;
514 } 514 }
515 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); 515 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp);
516 cursor += sizeof(fp); 516 cursor += sizeof(fp);
517 bool r = cursor >= lower_bound_ && cursor < stack_upper_; 517 bool r = cursor >= lower_bound_ && cursor < stack_upper_;
518 return r; 518 return r;
519 } 519 }
520 520
521 521
522 } // namespace dart 522 } // 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