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

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
« no previous file with comments | « runtime/vm/isolate.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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 void Scavenger::WriteProtect(bool read_only) { 831 void Scavenger::WriteProtect(bool read_only) {
832 ASSERT(!scavenging_); 832 ASSERT(!scavenging_);
833 ASSERT(from_ == NULL); 833 ASSERT(from_ == NULL);
834 to_->WriteProtect(read_only); 834 to_->WriteProtect(read_only);
835 } 835 }
836 836
837 837
838 void Scavenger::PrintToJSONObject(JSONObject* object) { 838 void Scavenger::PrintToJSONObject(JSONObject* object) {
839 JSONObject space(object, "new"); 839 JSONObject space(object, "new");
840 space.AddProperty("type", "@Scavenger"); 840 space.AddProperty("type", "Scavenger");
841 space.AddProperty("id", "heaps/new"); 841 space.AddProperty("id", "heaps/new");
842 space.AddProperty("name", "Scavenger"); 842 space.AddProperty("name", "Scavenger");
843 space.AddProperty("user_name", "new"); 843 space.AddProperty("user_name", "new");
844 space.AddProperty("collections", collections()); 844 space.AddProperty("collections", collections());
845 space.AddProperty("used", UsedInWords() * kWordSize); 845 space.AddProperty("used", UsedInWords() * kWordSize);
846 space.AddProperty("capacity", CapacityInWords() * kWordSize); 846 space.AddProperty("capacity", CapacityInWords() * kWordSize);
847 space.AddProperty("external", ExternalInWords() * kWordSize); 847 space.AddProperty("external", ExternalInWords() * kWordSize);
848 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros())); 848 space.AddProperty("time", MicrosecondsToSeconds(gc_time_micros()));
849 } 849 }
850 850
851 851
852 void Scavenger::AllocateExternal(intptr_t size) { 852 void Scavenger::AllocateExternal(intptr_t size) {
853 ASSERT(size >= 0); 853 ASSERT(size >= 0);
854 external_size_ += size; 854 external_size_ += size;
855 } 855 }
856 856
857 857
858 void Scavenger::FreeExternal(intptr_t size) { 858 void Scavenger::FreeExternal(intptr_t size) {
859 ASSERT(size >= 0); 859 ASSERT(size >= 0);
860 external_size_ -= size; 860 external_size_ -= size;
861 ASSERT(external_size_ >= 0); 861 ASSERT(external_size_ >= 0);
862 } 862 }
863 863
864 } // namespace dart 864 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698