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

Unified Diff: src/type-feedback-vector.h

Issue 2337123003: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: src/type-feedback-vector.h
diff --git a/src/type-feedback-vector.h b/src/type-feedback-vector.h
index ffadcb899414449acc1061a014d2c3de6b060b46..63c111ba090e7aca8fbb3a45193d830c4cdf2885 100644
--- a/src/type-feedback-vector.h
+++ b/src/type-feedback-vector.h
@@ -222,9 +222,10 @@ class TypeFeedbackMetadata : public FixedArray {
// The shape of the TypeFeedbackVector is an array with:
// 0: feedback metadata
-// 1: feedback slot #0
+// 1: invocation count
+// 2: feedback slot #0
// ...
-// 1 + slot_count - 1: feedback slot #(slot_count-1)
+// 2 + slot_count - 1: feedback slot #(slot_count-1)
//
class TypeFeedbackVector : public FixedArray {
public:
@@ -232,7 +233,8 @@ class TypeFeedbackVector : public FixedArray {
static inline TypeFeedbackVector* cast(Object* obj);
static const int kMetadataIndex = 0;
- static const int kReservedIndexCount = 1;
+ static const int kInvocationCountIndex = 1;
+ static const int kReservedIndexCount = 2;
inline void ComputeCounts(int* with_type_info, int* generic);
@@ -242,6 +244,7 @@ class TypeFeedbackVector : public FixedArray {
inline int slot_count() const;
inline TypeFeedbackMetadata* metadata() const;
+ inline int invocation_count() const;
// Conversion from a slot to an integer index to the underlying array.
static int GetIndex(FeedbackVectorSlot slot) {

Powered by Google App Engine
This is Rietveld 408576698