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

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

Issue 16954003: Changed "%d" to ""%"Pd for platform indenpent printing of intptr_t. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | no next file » | 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 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Finally print the sorted array. 103 // Finally print the sorted array.
104 Class& cls = Class::Handle(); 104 Class& cls = Class::Handle();
105 String& str = String::Handle(); 105 String& str = String::Handle();
106 Library& lib = Library::Handle(); 106 Library& lib = Library::Handle();
107 for (pos = 0; pos < length; pos++) { 107 for (pos = 0; pos < length; pos++) {
108 Element* e = array[pos]; 108 Element* e = array[pos];
109 if (e->count_ > 0) { 109 if (e->count_ > 0) {
110 cls = isolate_->class_table()->At(e->class_id_); 110 cls = isolate_->class_table()->At(e->class_id_);
111 str = cls.Name(); 111 str = cls.Name();
112 lib = cls.library(); 112 lib = cls.library();
113 OS::Print("%9d %7d ", 113 OS::Print("%9"Pd" %7"Pd" ",
114 e->size_ / major_gc_count_, 114 e->size_ / major_gc_count_,
115 e->count_ / major_gc_count_); 115 e->count_ / major_gc_count_);
116 if (e->class_id_ < kInstanceCid) { 116 if (e->class_id_ < kInstanceCid) {
117 OS::Print("`%s`", str.ToCString()); // VM names. 117 OS::Print("`%s`", str.ToCString()); // VM names.
118 } else { 118 } else {
119 OS::Print("%s", str.ToCString()); 119 OS::Print("%s", str.ToCString());
120 } 120 }
121 if (lib.IsNull()) { 121 if (lib.IsNull()) {
122 OS::Print("\n"); 122 OS::Print("\n");
123 } else { 123 } else {
124 str = lib.url(); 124 str = lib.url();
125 OS::Print(", library \'%s\'\n", str.ToCString()); 125 OS::Print(", library \'%s\'\n", str.ToCString());
126 } 126 }
127 } 127 }
128 } 128 }
129 // Deallocate the array for sorting. 129 // Deallocate the array for sorting.
130 free(array); 130 free(array);
131 } 131 }
132 132
133 } // namespace dart 133 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698