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

Unified Diff: runtime/vm/raw_object.h

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 4429a1ae82e5de846fdf7ff9e62621cd21fa2bf6..810d63713b699f6629aae28a27312019414efb2a 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -403,6 +403,7 @@ class RawObject {
static bool IsTypedDataViewClassId(intptr_t index);
static bool IsExternalTypedDataClassId(intptr_t index);
static bool IsInternalVMdefinedClassId(intptr_t index);
+ static bool IsVariableSizeClassId(intptr_t index);
static intptr_t NumberOfTypedDataClasses();
@@ -442,6 +443,7 @@ class RawObject {
friend class GCMarker;
friend class ExternalTypedData;
friend class Heap;
+ friend class ClassStatsVisitor;
friend class MarkingVisitor;
friend class Object;
friend class ObjectHistogram;
@@ -450,6 +452,7 @@ class RawObject {
friend class RawInstance;
friend class RawTypedData;
friend class Scavenger;
+ friend class ScavengerVisitor;
friend class SnapshotReader;
friend class SnapshotWriter;
friend class String;
@@ -474,6 +477,7 @@ class RawClass : public RawObject {
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
RawString* name_;
+ RawString* user_name_;
RawArray* functions_;
RawArray* fields_;
RawArray* offset_in_words_to_field_;
@@ -1738,6 +1742,29 @@ inline bool RawObject::IsInternalVMdefinedClassId(intptr_t index) {
}
+
+inline bool RawObject::IsVariableSizeClassId(intptr_t index) {
+ return (index == kArrayCid) ||
+ (index == kImmutableArrayCid) ||
+ RawObject::IsOneByteStringClassId(index) ||
+ RawObject::IsTwoByteStringClassId(index) ||
+ RawObject::IsTypedDataClassId(index) ||
+ (index == kContextCid) ||
+ (index == kTypeArgumentsCid) ||
+ (index == kInstructionsCid) ||
+ (index == kPcDescriptorsCid) ||
+ (index == kStackmapCid) ||
+ (index == kLocalVarDescriptorsCid) ||
+ (index == kExceptionHandlersCid) ||
+ (index == kDeoptInfoCid) ||
+ (index == kCodeCid) ||
+ (index == kContextScopeCid) ||
+ (index == kInstanceCid) ||
+ (index == kBigintCid) ||
+ (index == kJSRegExpCid);
+}
+
+
inline intptr_t RawObject::NumberOfTypedDataClasses() {
// Make sure this is updated when new TypedData types are added.
ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13);
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698