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

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

Issue 1391473002: Add Metrics for heap high water marks (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/metrics.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/isolate.h" 10 #include "vm/isolate.h"
(...skipping 29 matching lines...) Expand all
40 "Enables heap verification after GC."); 40 "Enables heap verification after GC.");
41 DEFINE_FLAG(bool, verify_before_gc, false, 41 DEFINE_FLAG(bool, verify_before_gc, false,
42 "Enables heap verification before GC."); 42 "Enables heap verification before GC.");
43 DEFINE_FLAG(bool, pretenure_all, false, "Global pretenuring (for testing)."); 43 DEFINE_FLAG(bool, pretenure_all, false, "Global pretenuring (for testing).");
44 44
45 45
46 Heap::Heap(Isolate* isolate, 46 Heap::Heap(Isolate* isolate,
47 intptr_t max_new_gen_semi_words, 47 intptr_t max_new_gen_semi_words,
48 intptr_t max_old_gen_words, 48 intptr_t max_old_gen_words,
49 intptr_t max_external_words) 49 intptr_t max_external_words)
50 : new_space_(this, max_new_gen_semi_words, kNewObjectAlignmentOffset), 50 : isolate_(isolate),
51 new_space_(this, max_new_gen_semi_words, kNewObjectAlignmentOffset),
51 old_space_(this, max_old_gen_words, max_external_words), 52 old_space_(this, max_old_gen_words, max_external_words),
52 isolate_(isolate),
53 read_only_(false), 53 read_only_(false),
54 gc_in_progress_(false), 54 gc_in_progress_(false),
55 pretenure_policy_(0) { 55 pretenure_policy_(0) {
56 for (int sel = 0; 56 for (int sel = 0;
57 sel < kNumWeakSelectors; 57 sel < kNumWeakSelectors;
58 sel++) { 58 sel++) {
59 new_weak_tables_[sel] = new WeakTable(); 59 new_weak_tables_[sel] = new WeakTable();
60 old_weak_tables_[sel] = new WeakTable(); 60 old_weak_tables_[sel] = new WeakTable();
61 } 61 }
62 stats_.num_ = 0; 62 stats_.num_ = 0;
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 Dart::vm_isolate()->heap()->WriteProtect(false); 781 Dart::vm_isolate()->heap()->WriteProtect(false);
782 } 782 }
783 783
784 784
785 WritableVMIsolateScope::~WritableVMIsolateScope() { 785 WritableVMIsolateScope::~WritableVMIsolateScope() {
786 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 786 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
787 Dart::vm_isolate()->heap()->WriteProtect(true); 787 Dart::vm_isolate()->heap()->WriteProtect(true);
788 } 788 }
789 789
790 } // namespace dart 790 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698