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

Unified Diff: src/heap/object-stats.cc

Issue 2674593003: [TypeFeedbackVector] Root feedback vectors at function literal site. (Closed)
Patch Set: REBASE+liveedit fix. Created 3 years, 10 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/handles-inl.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/object-stats.cc
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc
index 0a5a59b09a5564e163547b5277fcd6310f6374f1..c8c6d913299b00df229cbea2eb5220dd1d5f2459 100644
--- a/src/heap/object-stats.cc
+++ b/src/heap/object-stats.cc
@@ -551,31 +551,15 @@ void ObjectStatsCollector::RecordSharedFunctionInfoDetails(
RecordFixedArrayHelper(sfi, optimized_code_map, OPTIMIZED_CODE_MAP_SUB_TYPE,
0);
// Optimized code map should be small, so skip accounting.
- int len = optimized_code_map->length();
- for (int i = SharedFunctionInfo::kEntriesStart; i < len;
- i += SharedFunctionInfo::kEntryLength) {
- Object* slot = optimized_code_map->get(
- i + SharedFunctionInfo::kFeedbackVectorOffset);
- TypeFeedbackVector* vector = nullptr;
- if (slot->IsWeakCell()) {
- WeakCell* cell = WeakCell::cast(slot);
- if (!cell->cleared()) {
- vector = TypeFeedbackVector::cast(cell->value());
- }
- } else {
- vector = TypeFeedbackVector::cast(slot);
- }
- if (vector != nullptr) {
- RecordFixedArrayHelper(sfi, vector, TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
- }
- }
}
}
void ObjectStatsCollector::RecordJSFunctionDetails(JSFunction* function) {
- TypeFeedbackVector* feedback_vector = function->feedback_vector();
- RecordFixedArrayHelper(function, feedback_vector,
- TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
+ if (function->feedback_vector_cell()->value()->IsTypeFeedbackVector()) {
+ TypeFeedbackVector* feedback_vector = function->feedback_vector();
+ RecordFixedArrayHelper(function, feedback_vector,
+ TYPE_FEEDBACK_VECTOR_SUB_TYPE, 0);
+ }
}
void ObjectStatsCollector::RecordFixedArrayDetails(FixedArray* array) {
« no previous file with comments | « src/handles-inl.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698