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

Unified Diff: runtime/vm/raw_object.cc

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address final review comments Created 8 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 | « runtime/vm/raw_object.h ('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.cc
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index b47b82145790c3dc0e120157882ca1a46ecb0cf3..330f505d6ef7b5e95d19d4e18964fe12e2dd62f8 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -244,6 +244,19 @@ intptr_t RawObject::SizeFromClass() const {
}
+ObjectKind RawObject::GetObjectKind() const {
+ intptr_t class_id = GetClassId();
+ ObjectKind kind;
+ if (class_id < kNumPredefinedKinds) {
+ kind = static_cast<ObjectKind>(class_id);
+ } else {
+ RawClass* raw_class = Isolate::Current()->class_table()->At(class_id);
+ kind = raw_class->ptr()->instance_kind_;
+ }
+ return kind;
+}
+
+
intptr_t RawObject::VisitPointers(ObjectPointerVisitor* visitor) {
intptr_t size = 0;
NoHandleScope no_handles(visitor->isolate());
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698