summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/object-stats.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/heap/object-stats.cc')
-rw-r--r--deps/v8/src/heap/object-stats.cc31
1 files changed, 6 insertions, 25 deletions
diff --git a/deps/v8/src/heap/object-stats.cc b/deps/v8/src/heap/object-stats.cc
index 1b9cdf5ecc..50d6fcc2dd 100644
--- a/deps/v8/src/heap/object-stats.cc
+++ b/deps/v8/src/heap/object-stats.cc
@@ -4,6 +4,7 @@
#include "src/heap/object-stats.h"
+#include "src/assembler-inl.h"
#include "src/compilation-cache.h"
#include "src/counters.h"
#include "src/heap/heap-inl.h"
@@ -330,7 +331,6 @@ static bool CanRecordFixedArray(Heap* heap, FixedArrayBase* array) {
array->map() != heap->fixed_double_array_map() &&
array != heap->empty_fixed_array() &&
array != heap->empty_byte_array() &&
- array != heap->empty_literals_array() &&
array != heap->empty_sloppy_arguments_elements() &&
array != heap->empty_slow_element_dictionary() &&
array != heap->empty_descriptor_array() &&
@@ -551,34 +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::kLiteralsOffset);
- LiteralsArray* literals = nullptr;
- if (slot->IsWeakCell()) {
- WeakCell* cell = WeakCell::cast(slot);
- if (!cell->cleared()) {
- literals = LiteralsArray::cast(cell->value());
- }
- } else {
- literals = LiteralsArray::cast(slot);
- }
- if (literals != nullptr) {
- RecordFixedArrayHelper(sfi, literals, LITERALS_ARRAY_SUB_TYPE, 0);
- RecordFixedArrayHelper(sfi, literals->feedback_vector(),
- FEEDBACK_VECTOR_SUB_TYPE, 0);
- }
- }
}
}
void ObjectStatsCollector::RecordJSFunctionDetails(JSFunction* function) {
- LiteralsArray* literals = function->literals();
- RecordFixedArrayHelper(function, literals, LITERALS_ARRAY_SUB_TYPE, 0);
- RecordFixedArrayHelper(function, literals->feedback_vector(),
- FEEDBACK_VECTOR_SUB_TYPE, 0);
+ if (function->feedback_vector_cell()->value()->IsFeedbackVector()) {
+ FeedbackVector* feedback_vector = function->feedback_vector();
+ RecordFixedArrayHelper(function, feedback_vector, FEEDBACK_VECTOR_SUB_TYPE,
+ 0);
+ }
}
void ObjectStatsCollector::RecordFixedArrayDetails(FixedArray* array) {