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

Side by Side Diff: src/objects.h

Issue 2129173002: [heap] Rework and improve object stats tracing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 770
771 STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType); 771 STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType);
772 STATIC_ASSERT(JS_API_OBJECT_TYPE == Internals::kJSApiObjectType); 772 STATIC_ASSERT(JS_API_OBJECT_TYPE == Internals::kJSApiObjectType);
773 STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); 773 STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType);
774 STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType); 774 STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType);
775 STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType); 775 STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType);
776 776
777 777
778 std::ostream& operator<<(std::ostream& os, InstanceType instance_type); 778 std::ostream& operator<<(std::ostream& os, InstanceType instance_type);
779 779
780
781 #define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \ 780 #define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \
782 V(FAST_ELEMENTS_SUB_TYPE) \ 781 V(FAST_ELEMENTS_SUB_TYPE) \
783 V(DICTIONARY_ELEMENTS_SUB_TYPE) \ 782 V(DICTIONARY_ELEMENTS_SUB_TYPE) \
784 V(FAST_PROPERTIES_SUB_TYPE) \ 783 V(FAST_PROPERTIES_SUB_TYPE) \
785 V(DICTIONARY_PROPERTIES_SUB_TYPE) \ 784 V(DICTIONARY_PROPERTIES_SUB_TYPE) \
786 V(MAP_CODE_CACHE_SUB_TYPE) \ 785 V(MAP_CODE_CACHE_SUB_TYPE) \
787 V(SCOPE_INFO_SUB_TYPE) \ 786 V(SCOPE_INFO_SUB_TYPE) \
788 V(STRING_TABLE_SUB_TYPE) \ 787 V(STRING_TABLE_SUB_TYPE) \
789 V(DESCRIPTOR_ARRAY_SUB_TYPE) 788 V(DESCRIPTOR_ARRAY_SUB_TYPE) \
789 V(ENUM_CACHE_SUB_TYPE) \
790 V(ENUM_INDICES_CACHE_SUB_TYPE) \
791 V(TYPE_FEEDBACK_METADATA_TYPE) \
792 V(DEOPTIMIZATION_DATA_TYPE) \
793 V(WEAK_COLLECTION_SUB_TYPE) \
794 V(RELOC_INFO_SUB_TYPE) \
795 V(SOURCE_POS_SUB_TYPE) \
796 V(COPY_ON_WRITE_SUB_TYPE)
790 797
791 enum FixedArraySubInstanceType { 798 enum FixedArraySubInstanceType {
792 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name, 799 #define DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE(name) name,
793 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE) 800 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE)
794 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE 801 #undef DEFINE_FIXED_ARRAY_SUB_INSTANCE_TYPE
795 LAST_FIXED_ARRAY_SUB_TYPE = DESCRIPTOR_ARRAY_SUB_TYPE 802 LAST_FIXED_ARRAY_SUB_TYPE = SOURCE_POS_SUB_TYPE
796 }; 803 };
797 804
798 805
799 // TODO(bmeurer): Remove this in favor of the ComparisonResult below. 806 // TODO(bmeurer): Remove this in favor of the ComparisonResult below.
800 enum CompareResult { 807 enum CompareResult {
801 LESS = -1, 808 LESS = -1,
802 EQUAL = 0, 809 EQUAL = 0,
803 GREATER = 1, 810 GREATER = 1,
804 811
805 NOT_EQUAL = GREATER 812 NOT_EQUAL = GREATER
(...skipping 9234 matching lines...) Expand 10 before | Expand all | Expand 10 after
10040 // |HasMore| returns true. 10047 // |HasMore| returns true.
10041 inline Object* CurrentValue(); 10048 inline Object* CurrentValue();
10042 10049
10043 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMapIterator); 10050 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMapIterator);
10044 }; 10051 };
10045 10052
10046 10053
10047 // Base class for both JSWeakMap and JSWeakSet 10054 // Base class for both JSWeakMap and JSWeakSet
10048 class JSWeakCollection: public JSObject { 10055 class JSWeakCollection: public JSObject {
10049 public: 10056 public:
10057 DECLARE_CAST(JSWeakCollection)
10058
10050 // [table]: the backing hash table mapping keys to values. 10059 // [table]: the backing hash table mapping keys to values.
10051 DECL_ACCESSORS(table, Object) 10060 DECL_ACCESSORS(table, Object)
10052 10061
10053 // [next]: linked list of encountered weak maps during GC. 10062 // [next]: linked list of encountered weak maps during GC.
10054 DECL_ACCESSORS(next, Object) 10063 DECL_ACCESSORS(next, Object)
10055 10064
10056 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate); 10065 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate);
10057 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key, 10066 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key,
10058 Handle<Object> value, int32_t hash); 10067 Handle<Object> value, int32_t hash);
10059 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key, 10068 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key,
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
10970 } 10979 }
10971 return value; 10980 return value;
10972 } 10981 }
10973 }; 10982 };
10974 10983
10975 10984
10976 } // NOLINT, false-positive due to second-order macros. 10985 } // NOLINT, false-positive due to second-order macros.
10977 } // NOLINT, false-positive due to second-order macros. 10986 } // NOLINT, false-positive due to second-order macros.
10978 10987
10979 #endif // V8_OBJECTS_H_ 10988 #endif // V8_OBJECTS_H_
OLDNEW
« src/heap/mark-compact.cc ('K') | « src/heap/object-stats.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698