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

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

Issue 342513004: Visual refresh of allocation profile page (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 void Scavenger::WriteProtect(bool read_only) { 810 void Scavenger::WriteProtect(bool read_only) {
811 ASSERT(!scavenging_); 811 ASSERT(!scavenging_);
812 ASSERT(from_ == NULL); 812 ASSERT(from_ == NULL);
813 to_->WriteProtect(read_only); 813 to_->WriteProtect(read_only);
814 } 814 }
815 815
816 816
817 void Scavenger::PrintToJSONObject(JSONObject* object) { 817 void Scavenger::PrintToJSONObject(JSONObject* object) {
818 JSONObject space(object, "new"); 818 JSONObject space(object, "new");
819 space.AddProperty("type", "@Scavenger"); 819 space.AddProperty("type", "Scavenger");
820 space.AddProperty("id", "heaps/new"); 820 space.AddProperty("id", "heaps/new");
821 space.AddProperty("name", "Scavenger"); 821 space.AddProperty("name", "Scavenger");
822 space.AddProperty("user_name", "new"); 822 space.AddProperty("user_name", "new");
823 space.AddProperty("collections", collections()); 823 space.AddProperty("collections", collections());
824 space.AddProperty("used", UsedInWords() * kWordSize); 824 space.AddProperty("used", UsedInWords() * kWordSize);
825 space.AddProperty("capacity", CapacityInWords() * kWordSize); 825 space.AddProperty("capacity", CapacityInWords() * kWordSize);
826 space.AddProperty("external", ExternalInWords() * kWordSize); 826 space.AddProperty("external", ExternalInWords() * kWordSize);
827 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros())); 827 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros()));
828 } 828 }
829 829
830 830
831 void Scavenger::AllocateExternal(intptr_t size) { 831 void Scavenger::AllocateExternal(intptr_t size) {
832 ASSERT(size >= 0); 832 ASSERT(size >= 0);
833 external_size_ += size; 833 external_size_ += size;
834 } 834 }
835 835
836 836
837 void Scavenger::FreeExternal(intptr_t size) { 837 void Scavenger::FreeExternal(intptr_t size) {
838 ASSERT(size >= 0); 838 ASSERT(size >= 0);
839 external_size_ -= size; 839 external_size_ -= size;
840 ASSERT(external_size_ >= 0); 840 ASSERT(external_size_ >= 0);
841 } 841 }
842 842
843 } // namespace dart 843 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698