Index: src/runtime/runtime-test.cc |
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc |
index 2c179607d8f8ff4c744d2d519015f578d24f223c..ffaaed573ec0296e5369cc634618327d16ac7317 100644 |
--- a/src/runtime/runtime-test.cc |
+++ b/src/runtime/runtime-test.cc |
@@ -171,16 +171,11 @@ RUNTIME_FUNCTION(Runtime_PrintTypeProfile) { |
Object* function_name = vector->shared_function_info()->name(); |
PrintF("Function: %s\n", String::cast(function_name)->ToCString().get()); |
- FeedbackMetadataIterator iter(vector->metadata()); |
- while (iter.HasNext()) { |
- FeedbackSlot slot = iter.Next(); |
- FeedbackSlotKind kind = iter.kind(); |
- if (kind == FeedbackSlotKind::kTypeProfile) { |
- CollectTypeProfileNexus nexus(vector, slot); |
- nexus.Print(); |
- PrintF("\n"); |
- return isolate->heap()->undefined_value(); |
- } |
+ FeedbackSlot slot = vector->GetTypeProfileSlot(); |
+ if (!slot.IsInvalid()) { |
+ CollectTypeProfileNexus nexus(vector, slot); |
+ nexus.Print(); |
+ PrintF("\n"); |
} |
} |
return isolate->heap()->undefined_value(); |