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

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

Issue 14927003: Revert 22380 to investigate windows build break. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/heap.h" 5 #include "vm/heap.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/heap_profiler.h" 10 #include "vm/heap_profiler.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 ASSERT(file_open != NULL); 314 ASSERT(file_open != NULL);
315 Dart_FileWriteCallback file_write = Isolate::file_write_callback(); 315 Dart_FileWriteCallback file_write = Isolate::file_write_callback();
316 ASSERT(file_write != NULL); 316 ASSERT(file_write != NULL);
317 Dart_FileCloseCallback file_close = Isolate::file_close_callback(); 317 Dart_FileCloseCallback file_close = Isolate::file_close_callback();
318 ASSERT(file_close != NULL); 318 ASSERT(file_close != NULL);
319 Isolate* isolate = Isolate::Current(); 319 Isolate* isolate = Isolate::Current();
320 const char* format = "%s-%s.hprof"; 320 const char* format = "%s-%s.hprof";
321 intptr_t len = OS::SNPrint(NULL, 0, format, isolate->name(), reason); 321 intptr_t len = OS::SNPrint(NULL, 0, format, isolate->name(), reason);
322 char* filename = isolate->current_zone()->Alloc<char>(len + 1); 322 char* filename = isolate->current_zone()->Alloc<char>(len + 1);
323 OS::SNPrint(filename, len + 1, format, isolate->name(), reason); 323 OS::SNPrint(filename, len + 1, format, isolate->name(), reason);
324 void* file = (*file_open)(filename, true); 324 void* file = (*file_open)(filename);
325 if (file != NULL) { 325 if (file != NULL) {
326 Profile(file_write, file); 326 Profile(file_write, file);
327 (*file_close)(file); 327 (*file_close)(file);
328 } 328 }
329 } 329 }
330 330
331 331
332 const char* Heap::GCReasonToString(GCReason gc_reason) { 332 const char* Heap::GCReasonToString(GCReason gc_reason) {
333 switch (gc_reason) { 333 switch (gc_reason) {
334 case kNewSpace: 334 case kNewSpace:
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 heap->DisableGrowthControl(); 487 heap->DisableGrowthControl();
488 } 488 }
489 489
490 490
491 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 491 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
492 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 492 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
493 heap->SetGrowthControlState(current_growth_controller_state_); 493 heap->SetGrowthControlState(current_growth_controller_state_);
494 } 494 }
495 495
496 } // namespace dart 496 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698