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

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

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/report_test.cc ('k') | runtime/vm/service.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 heap_->RecordData(kStoreBufferEntries, total_count); 539 heap_->RecordData(kStoreBufferEntries, total_count);
540 heap_->RecordData(kDataUnused1, 0); 540 heap_->RecordData(kDataUnused1, 0);
541 heap_->RecordData(kDataUnused2, 0); 541 heap_->RecordData(kDataUnused2, 0);
542 // Done iterating through old objects remembered in the store buffers. 542 // Done iterating through old objects remembered in the store buffers.
543 visitor->VisitingOldObject(NULL); 543 visitor->VisitingOldObject(NULL);
544 } 544 }
545 545
546 546
547 void Scavenger::IterateObjectIdTable(Isolate* isolate, 547 void Scavenger::IterateObjectIdTable(Isolate* isolate,
548 ScavengerVisitor* visitor) { 548 ScavengerVisitor* visitor) {
549 if (!FLAG_support_service) {
550 return;
551 }
549 ObjectIdRing* ring = isolate->object_id_ring(); 552 ObjectIdRing* ring = isolate->object_id_ring();
550 if (ring == NULL) { 553 if (ring == NULL) {
551 // --gc_at_alloc can get us here before the ring has been initialized. 554 // --gc_at_alloc can get us here before the ring has been initialized.
552 ASSERT(FLAG_gc_at_alloc); 555 ASSERT(FLAG_gc_at_alloc);
553 return; 556 return;
554 } 557 }
555 ring->VisitPointers(visitor); 558 ring->VisitPointers(visitor);
556 } 559 }
557 560
558 561
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 830 }
828 831
829 832
830 void Scavenger::WriteProtect(bool read_only) { 833 void Scavenger::WriteProtect(bool read_only) {
831 ASSERT(!scavenging_); 834 ASSERT(!scavenging_);
832 to_->WriteProtect(read_only); 835 to_->WriteProtect(read_only);
833 } 836 }
834 837
835 838
836 void Scavenger::PrintToJSONObject(JSONObject* object) const { 839 void Scavenger::PrintToJSONObject(JSONObject* object) const {
840 if (!FLAG_support_service) {
841 return;
842 }
837 Isolate* isolate = Isolate::Current(); 843 Isolate* isolate = Isolate::Current();
838 ASSERT(isolate != NULL); 844 ASSERT(isolate != NULL);
839 JSONObject space(object, "new"); 845 JSONObject space(object, "new");
840 space.AddProperty("type", "HeapSpace"); 846 space.AddProperty("type", "HeapSpace");
841 space.AddProperty("name", "new"); 847 space.AddProperty("name", "new");
842 space.AddProperty("vmName", "Scavenger"); 848 space.AddProperty("vmName", "Scavenger");
843 space.AddProperty("collections", collections()); 849 space.AddProperty("collections", collections());
844 if (collections() > 0) { 850 if (collections() > 0) {
845 int64_t run_time = OS::GetCurrentTimeMicros() - isolate->start_time(); 851 int64_t run_time = OS::GetCurrentTimeMicros() - isolate->start_time();
846 run_time = Utils::Maximum(run_time, static_cast<int64_t>(0)); 852 run_time = Utils::Maximum(run_time, static_cast<int64_t>(0));
(...skipping 18 matching lines...) Expand all
865 } 871 }
866 872
867 873
868 void Scavenger::FreeExternal(intptr_t size) { 874 void Scavenger::FreeExternal(intptr_t size) {
869 ASSERT(size >= 0); 875 ASSERT(size >= 0);
870 external_size_ -= size; 876 external_size_ -= size;
871 ASSERT(external_size_ >= 0); 877 ASSERT(external_size_ >= 0);
872 } 878 }
873 879
874 } // namespace dart 880 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/report_test.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698