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

Unified Diff: src/objects-printer.cc

Issue 1384673002: The metadata part of TypeFeedbackVector is extracted to TypeFeedbackMetadata array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/type-feedback-vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 9a50ccf7a9e74dd265d5220ad28d10f0b21eb60b..d1440e7bafbad64d44eb9ddf3efdfa6c3f512486 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -539,6 +539,32 @@ void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) { // NOLINT
}
+void TypeFeedbackMetadata::Print() {
+ OFStream os(stdout);
+ TypeFeedbackMetadataPrint(os);
+ os << std::flush;
+}
+
+
+void TypeFeedbackMetadata::TypeFeedbackMetadataPrint(
+ std::ostream& os) { // NOLINT
+ HeapObject::PrintHeader(os, "TypeFeedbackMetadata");
+ os << " - length: " << length();
+ if (length() == 0) {
+ os << " (empty)\n";
+ return;
+ }
+
+ TypeFeedbackMetadataIterator iter(this);
+ while (iter.HasNext()) {
+ FeedbackVectorSlot slot = iter.Next();
+ FeedbackVectorSlotKind kind = iter.kind();
+ os << "\n Slot " << slot << " " << kind;
+ }
+ os << "\n";
+}
+
+
void TypeFeedbackVector::Print() {
OFStream os(stdout);
TypeFeedbackVectorPrint(os);
@@ -557,12 +583,12 @@ void TypeFeedbackVector::TypeFeedbackVectorPrint(std::ostream& os) { // NOLINT
os << "\n - ics with type info: " << ic_with_type_info_count();
os << "\n - generic ics: " << ic_generic_count();
- TypeFeedbackMetadataIterator iter(this);
+ TypeFeedbackMetadataIterator iter(metadata());
while (iter.HasNext()) {
FeedbackVectorSlot slot = iter.Next();
FeedbackVectorSlotKind kind = iter.kind();
- os << "\n ICSlot " << slot.ToInt() << " " << kind << " ";
+ os << "\n Slot " << slot << " " << kind << " ";
switch (kind) {
case FeedbackVectorSlotKind::LOAD_IC: {
LoadICNexus nexus(this, slot);
« no previous file with comments | « src/objects-inl.h ('k') | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698