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

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

Issue 608913002: Track references to allocation stubs via static_calls_table, instead of keeping two referencers ali… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_arm.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) 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 367
368 void Heap::UpdatePretenurePolicy() { 368 void Heap::UpdatePretenurePolicy() {
369 if (FLAG_disable_alloc_stubs_after_gc) { 369 if (FLAG_disable_alloc_stubs_after_gc) {
370 ClassTable* table = isolate_->class_table(); 370 ClassTable* table = isolate_->class_table();
371 for (intptr_t cid = 1; cid < table->NumCids(); ++cid) { 371 for (intptr_t cid = 1; cid < table->NumCids(); ++cid) {
372 if (((cid >= kNumPredefinedCids) || (cid == kArrayCid)) && 372 if (((cid >= kNumPredefinedCids) || (cid == kArrayCid)) &&
373 table->IsValidIndex(cid) && 373 table->IsValidIndex(cid) &&
374 table->HasValidClassAt(cid)) { 374 table->HasValidClassAt(cid)) {
375 const Class& cls = Class::Handle(isolate_, table->At(cid)); 375 const Class& cls = Class::Handle(isolate_, table->At(cid));
376 cls.SwitchAllocationStub(); 376 cls.DisableAllocationStub();
377 } 377 }
378 } 378 }
379 } 379 }
380 ClassHeapStats* stats = 380 ClassHeapStats* stats =
381 isolate_->class_table()->StatsWithUpdatedSize(kOneByteStringCid); 381 isolate_->class_table()->StatsWithUpdatedSize(kOneByteStringCid);
382 int allocated = stats->pre_gc.new_count; 382 int allocated = stats->pre_gc.new_count;
383 int promo_percent = (allocated == 0) ? 0 : 383 int promo_percent = (allocated == 0) ? 0 :
384 (100 * stats->promoted_count) / allocated; 384 (100 * stats->promoted_count) / allocated;
385 if (promo_percent >= FLAG_pretenure_threshold) { 385 if (promo_percent >= FLAG_pretenure_threshold) {
386 pretenure_policy_ += FLAG_pretenure_interval; 386 pretenure_policy_ += FLAG_pretenure_interval;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 heap->DisableGrowthControl(); 717 heap->DisableGrowthControl();
718 } 718 }
719 719
720 720
721 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 721 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
722 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 722 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
723 heap->SetGrowthControlState(current_growth_controller_state_); 723 heap->SetGrowthControlState(current_growth_controller_state_);
724 } 724 }
725 725
726 } // namespace dart 726 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698