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

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

Issue 65983005: Post landing fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/profiler_macos.cc » ('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 <cstdio> 5 #include <cstdio>
6 6
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 8
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/json_stream.h" 10 #include "vm/json_stream.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ASSERT(new_capacity < kMaxProfiledIsolates); 194 ASSERT(new_capacity < kMaxProfiledIsolates);
195 ASSERT(new_capacity > isolates_capacity_); 195 ASSERT(new_capacity > isolates_capacity_);
196 Isolate* isolate = NULL; 196 Isolate* isolate = NULL;
197 isolates_ = reinterpret_cast<Isolate**>( 197 isolates_ = reinterpret_cast<Isolate**>(
198 realloc(isolates_, sizeof(isolate) * new_capacity)); 198 realloc(isolates_, sizeof(isolate) * new_capacity));
199 isolates_capacity_ = new_capacity; 199 isolates_capacity_ = new_capacity;
200 } 200 }
201 201
202 202
203 void ProfilerManager::AddIsolate(Isolate* isolate) { 203 void ProfilerManager::AddIsolate(Isolate* isolate) {
204 if (isolates_ == NULL) {
205 // We are shutting down.
206 return;
207 }
204 // Must be called with monitor_ locked. 208 // Must be called with monitor_ locked.
205 if (isolates_size_ == isolates_capacity_) { 209 if (isolates_size_ == isolates_capacity_) {
206 ResizeIsolates(isolates_capacity_ == 0 ? 16 : isolates_capacity_ * 2); 210 ResizeIsolates(isolates_capacity_ == 0 ? 16 : isolates_capacity_ * 2);
207 } 211 }
208 isolates_[isolates_size_] = isolate; 212 isolates_[isolates_size_] = isolate;
209 isolates_size_++; 213 isolates_size_++;
210 } 214 }
211 215
212 216
213 intptr_t ProfilerManager::FindIsolate(Isolate* isolate) { 217 intptr_t ProfilerManager::FindIsolate(Isolate* isolate) {
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return false; 563 return false;
560 } 564 }
561 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp); 565 uintptr_t cursor = reinterpret_cast<uintptr_t>(fp);
562 cursor += sizeof(fp); 566 cursor += sizeof(fp);
563 bool r = cursor >= stack_lower_ && cursor <= stack_upper_; 567 bool r = cursor >= stack_lower_ && cursor <= stack_upper_;
564 return r; 568 return r;
565 } 569 }
566 570
567 571
568 } // namespace dart 572 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/profiler_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698