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

Unified Diff: runtime/vm/object.h

Issue 1211633002: Introduce mechanism to record an allocation of a class (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index f8b84139b85085c1335fdbb2b08718392d059748..ad21c1a9e86644fcafee1911753697570cebf6c4 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1363,6 +1363,11 @@ class Class : public Object {
RawArray* cha_codes() const { return raw_ptr()->cha_codes_; }
void set_cha_codes(const Array& value) const;
+ bool trace_allocation() const {
+ return TraceAllocationBit::decode(raw_ptr()->state_bits_);
+ }
+ void SetTraceAllocation(bool trace_allocation) const;
+
private:
enum MemberKind {
kAny = 0,
@@ -1386,6 +1391,7 @@ class Class : public Object {
kFieldsMarkedNullableBit = 11,
kCycleFreeBit = 12,
kEnumBit = 13,
+ kTraceAllocationBit = 14,
};
class ConstBit : public BitField<bool, kConstBit, 1> {};
class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
@@ -1402,6 +1408,7 @@ class Class : public Object {
kFieldsMarkedNullableBit, 1> {}; // NOLINT
class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {};
class EnumBit : public BitField<bool, kEnumBit, 1> {};
+ class TraceAllocationBit : public BitField<bool, kTraceAllocationBit, 1> {};
void set_name(const String& value) const;
void set_pretty_name(const String& value) const;
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698