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

Side by Side Diff: src/objects-printer.cc

Issue 23463047: Add field nested_sites to AllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A few more changes Created 7 years, 3 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
« src/objects.h ('K') | « src/objects-inl.h ('k') | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 } 1096 }
1097 1097
1098 1098
1099 void AllocationSite::AllocationSitePrint(FILE* out) { 1099 void AllocationSite::AllocationSitePrint(FILE* out) {
1100 HeapObject::PrintHeader(out, "AllocationSite"); 1100 HeapObject::PrintHeader(out, "AllocationSite");
1101 PrintF(out, " - weak_next: "); 1101 PrintF(out, " - weak_next: ");
1102 weak_next()->ShortPrint(out); 1102 weak_next()->ShortPrint(out);
1103 PrintF(out, "\n - dependent code: "); 1103 PrintF(out, "\n - dependent code: ");
1104 dependent_code()->ShortPrint(out); 1104 dependent_code()->ShortPrint(out);
1105 1105
1106 // Just print the number of nested sites
Hannes Payer (out of office) 2013/09/24 08:04:40 After discussing offline, let's print the nested s
mvstanton 2013/09/24 08:39:15 Done.
1107 int nested_sites_count = 0;
1108 for (Object* current = nested_sites();
1109 current != Smi::FromInt(0);
1110 current = AllocationSite::cast(current)->nested_sites()) {
1111 nested_sites_count++;
1112 }
1113
1114 PrintF(out, "\n - # of nested sites: %d", nested_sites_count);
1106 PrintF(out, "\n - transition_info: "); 1115 PrintF(out, "\n - transition_info: ");
1107 if (transition_info()->IsCell()) { 1116 if (transition_info()->IsCell()) {
1108 Cell* cell = Cell::cast(transition_info()); 1117 Cell* cell = Cell::cast(transition_info());
1109 Object* cell_contents = cell->value(); 1118 Object* cell_contents = cell->value();
1110 if (cell_contents->IsSmi()) { 1119 if (cell_contents->IsSmi()) {
1111 ElementsKind kind = static_cast<ElementsKind>( 1120 ElementsKind kind = static_cast<ElementsKind>(
1112 Smi::cast(cell_contents)->value()); 1121 Smi::cast(cell_contents)->value());
1113 PrintF(out, "Array allocation with ElementsKind "); 1122 PrintF(out, "Array allocation with ElementsKind ");
1114 PrintElementsKind(out, kind); 1123 PrintElementsKind(out, kind);
1115 PrintF(out, "\n"); 1124 PrintF(out, "\n");
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 } 1244 }
1236 } 1245 }
1237 PrintF(out, "\n"); 1246 PrintF(out, "\n");
1238 } 1247 }
1239 1248
1240 1249
1241 #endif // OBJECT_PRINT 1250 #endif // OBJECT_PRINT
1242 1251
1243 1252
1244 } } // namespace v8::internal 1253 } } // namespace v8::internal
OLDNEW
« src/objects.h ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698