Reviewers: Jakob,
Description:
Print type feedback info together with code objects.
[email protected]
Please review this at https://chromiumcodereview.appspot.com/10833049/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/objects-printer.cc
M src/objects.cc
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index
c35ed5e237cc1ab563cc9a329fcc0dea07c48f28..20cdb265c2f2d6ccbb8563be71cb913d9237ae3d
100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -596,9 +596,9 @@ void
PolymorphicCodeCache::PolymorphicCodeCachePrint(FILE* out) {
void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) {
HeapObject::PrintHeader(out, "TypeFeedbackInfo");
- PrintF(out, "\n - ic_total_count: %d, ic_with_type_info_count: %d",
+ PrintF(out, " - ic_total_count: %d, ic_with_type_info_count: %d\n",
ic_total_count(), ic_with_type_info_count());
- PrintF(out, "\n - type_feedback_cells: ");
+ PrintF(out, " - type_feedback_cells: ");
type_feedback_cells()->FixedArrayPrint(out);
}
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
4905c04518142ce652029d783bc8ab037007755d..bb41e56e7c60bb7d4c2510734fa81dbe71bb72d5
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8516,6 +8516,8 @@ void Code::Disassemble(const char* name, FILE* out) {
PrintF(out, "\n");
}
PrintF(out, "\n");
+ // Just print if type feedback info is ever used for optimized code.
+ ASSERT(type_feedback_info()->IsUndefined());
} else if (kind() == FUNCTION) {
unsigned offset = stack_check_table_offset();
// If there is no stack check table, the "table start" will at or after
@@ -8532,6 +8534,10 @@ void Code::Disassemble(const char* name, FILE* out) {
}
PrintF(out, "\n");
}
+ if (!type_feedback_info()->IsUndefined()) {
+
TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out);
+ PrintF(out, "\n");
+ }
}
PrintF("RelocInfo (size = %d)\n", relocation_size());
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev