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

Side by Side Diff: src/global-handles.cc

Issue 1867383002: Revert of Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « src/disassembler.cc ('k') | src/heap/gc-idle-time-handler.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/global-handles.h" 5 #include "src/global-handles.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "src/vm-state-inl.h" 9 #include "src/vm-state-inl.h"
10 10
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 void ObjectGroupsTracer::PrintInternalFields(JSObject* js_object) { 881 void ObjectGroupsTracer::PrintInternalFields(JSObject* js_object) {
882 for (int i = 0; i < js_object->GetInternalFieldCount(); ++i) { 882 for (int i = 0; i < js_object->GetInternalFieldCount(); ++i) {
883 if (i != 0) { 883 if (i != 0) {
884 PrintF(", "); 884 PrintF(", ");
885 } 885 }
886 PrintF("%p", js_object->GetInternalField(i)); 886 PrintF("%p", js_object->GetInternalField(i));
887 } 887 }
888 } 888 }
889 889
890 void ObjectGroupsTracer::PrintObjectGroup(ObjectGroup* group) { 890 void ObjectGroupsTracer::PrintObjectGroup(ObjectGroup* group) {
891 PrintIsolate(isolate_, "ObjectGroup (size: %" PRIuS ")\n", group->length); 891 PrintIsolate(isolate_, "ObjectGroup (size: %lu)\n", group->length);
892 Object*** objects = group->objects; 892 Object*** objects = group->objects;
893 893
894 for (size_t i = 0; i < group->length; ++i) { 894 for (size_t i = 0; i < group->length; ++i) {
895 PrintIsolate(isolate_, " - Member: "); 895 PrintIsolate(isolate_, " - Member: ");
896 PrintObject(*objects[i]); 896 PrintObject(*objects[i]);
897 } 897 }
898 } 898 }
899 899
900 void ObjectGroupsTracer::PrintImplicitRefGroup(ImplicitRefGroup* group) { 900 void ObjectGroupsTracer::PrintImplicitRefGroup(ImplicitRefGroup* group) {
901 PrintIsolate(isolate_, "ImplicitRefGroup (children count: %" PRIuS ")\n", 901 PrintIsolate(isolate_, "ImplicitRefGroup (children count: %lu)\n",
902 group->length); 902 group->length);
903 PrintIsolate(isolate_, " - Parent: "); 903 PrintIsolate(isolate_, " - Parent: ");
904 PrintObject(*(group->parent)); 904 PrintObject(*(group->parent));
905 905
906 Object*** children = group->children; 906 Object*** children = group->children;
907 for (size_t i = 0; i < group->length; ++i) { 907 for (size_t i = 0; i < group->length; ++i) {
908 PrintIsolate(isolate_, " - Child: "); 908 PrintIsolate(isolate_, " - Child: ");
909 PrintObject(*children[i]); 909 PrintObject(*children[i]);
910 } 910 }
911 } 911 }
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 1216
1217 for (NodeIterator it(this); !it.done(); it.Advance()) { 1217 for (NodeIterator it(this); !it.done(); it.Advance()) {
1218 total++; 1218 total++;
1219 if (it.node()->state() == Node::WEAK) weak++; 1219 if (it.node()->state() == Node::WEAK) weak++;
1220 if (it.node()->state() == Node::PENDING) pending++; 1220 if (it.node()->state() == Node::PENDING) pending++;
1221 if (it.node()->state() == Node::NEAR_DEATH) near_death++; 1221 if (it.node()->state() == Node::NEAR_DEATH) near_death++;
1222 if (it.node()->state() == Node::FREE) destroyed++; 1222 if (it.node()->state() == Node::FREE) destroyed++;
1223 } 1223 }
1224 1224
1225 PrintF("Global Handle Statistics:\n"); 1225 PrintF("Global Handle Statistics:\n");
1226 PrintF(" allocated memory = %" PRIuS "B\n", total * sizeof(Node)); 1226 PrintF(" allocated memory = %" V8_SIZET_PREFIX V8_PTR_PREFIX "dB\n",
1227 total * sizeof(Node));
1227 PrintF(" # weak = %d\n", weak); 1228 PrintF(" # weak = %d\n", weak);
1228 PrintF(" # pending = %d\n", pending); 1229 PrintF(" # pending = %d\n", pending);
1229 PrintF(" # near_death = %d\n", near_death); 1230 PrintF(" # near_death = %d\n", near_death);
1230 PrintF(" # free = %d\n", destroyed); 1231 PrintF(" # free = %d\n", destroyed);
1231 PrintF(" # total = %d\n", total); 1232 PrintF(" # total = %d\n", total);
1232 } 1233 }
1233 1234
1234 1235
1235 void GlobalHandles::Print() { 1236 void GlobalHandles::Print() {
1236 PrintF("Global handles:\n"); 1237 PrintF("Global handles:\n");
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 blocks_[block][offset] = object; 1482 blocks_[block][offset] = object;
1482 if (isolate->heap()->InNewSpace(object)) { 1483 if (isolate->heap()->InNewSpace(object)) {
1483 new_space_indices_.Add(size_); 1484 new_space_indices_.Add(size_);
1484 } 1485 }
1485 *index = size_++; 1486 *index = size_++;
1486 } 1487 }
1487 1488
1488 1489
1489 } // namespace internal 1490 } // namespace internal
1490 } // namespace v8 1491 } // namespace v8
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698