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

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

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/heap.cc ('k') | runtime/vm/heap_profiler.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_histogram.h" 5 #include "vm/heap_histogram.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/json_stream.h" 10 #include "vm/json_stream.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Finally print the sorted array. 117 // Finally print the sorted array.
118 Class& cls = Class::Handle(); 118 Class& cls = Class::Handle();
119 String& str = String::Handle(); 119 String& str = String::Handle();
120 Library& lib = Library::Handle(); 120 Library& lib = Library::Handle();
121 for (intptr_t pos = 0; pos < length; pos++) { 121 for (intptr_t pos = 0; pos < length; pos++) {
122 Element* e = array[pos]; 122 Element* e = array[pos];
123 if (e->count_ > 0) { 123 if (e->count_ > 0) {
124 cls = isolate_->class_table()->At(e->class_id_); 124 cls = isolate_->class_table()->At(e->class_id_);
125 str = cls.Name(); 125 str = cls.Name();
126 lib = cls.library(); 126 lib = cls.library();
127 OS::Print("%9"Pd" %7"Pd" ", 127 OS::Print("%9" Pd " %7" Pd " ",
128 e->size_ / major_gc_count_, 128 e->size_ / major_gc_count_,
129 e->count_ / major_gc_count_); 129 e->count_ / major_gc_count_);
130 if (e->class_id_ < kInstanceCid) { 130 if (e->class_id_ < kInstanceCid) {
131 OS::Print("`%s`", str.ToCString()); // VM names. 131 OS::Print("`%s`", str.ToCString()); // VM names.
132 } else { 132 } else {
133 OS::Print("%s", str.ToCString()); 133 OS::Print("%s", str.ToCString());
134 } 134 }
135 if (lib.IsNull()) { 135 if (lib.IsNull()) {
136 OS::Print("\n"); 136 OS::Print("\n");
137 } else { 137 } else {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 stream->PrintProperty("count", count_sum); 196 stream->PrintProperty("count", count_sum);
197 stream->CloseObject(); 197 stream->CloseObject();
198 stream->CloseObject(); 198 stream->CloseObject();
199 199
200 // Deallocate the array for sorting. 200 // Deallocate the array for sorting.
201 free(array); 201 free(array);
202 } 202 }
203 203
204 204
205 } // namespace dart 205 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/heap_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698