From: mstarzinger@chromium.org Date: Fri, 27 Jul 2012 12:06:26 +0000 (+0000) Subject: Print type feedback info together with code objects. X-Git-Tag: upstream/4.7.83~16230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bff5cc9e945cc492fcbad0a8085e0ea5d2688e78;p=platform%2Fupstream%2Fv8.git Print type feedback info together with code objects. R=jkummerow@chromium.org Review URL: https://chromiumcodereview.appspot.com/10833049 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/objects-printer.cc b/src/objects-printer.cc index 9bd7a75..da0e128 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); } diff --git a/src/objects.cc b/src/objects.cc index 5b442ed..1482c4c 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -8511,6 +8511,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 @@ -8527,6 +8529,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());