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

Unified Diff: runtime/vm/isolate.h

Issue 16077018: Implemented an averaging object histogram in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 23899)
+++ runtime/vm/isolate.h (working copy)
@@ -46,6 +46,7 @@
class StubCode;
class RawFloat32x4;
class RawUint32x4;
+class ObjectHistogram;
// Used by the deoptimization infrastructure to defer allocation of unboxed
@@ -228,9 +229,12 @@
static void SetCurrent(Isolate* isolate);
static void InitOnce();
- static Isolate* Init(const char* name_prefix);
+ static Isolate* Init(const char* name_prefix, bool is_vm_isolate = false);
void Shutdown();
+ // Register a newly introduced class.
+ void RegisterClass(const Class& cls);
+
// Visit all object pointers.
void VisitObjectPointers(ObjectPointerVisitor* visitor,
bool visit_prologue_weak_persistent_handles,
@@ -250,6 +254,8 @@
return OFFSET_OF(Isolate, class_table_);
}
+ ObjectHistogram* object_histogram() { return object_histogram_; }
+
MegamorphicCacheTable* megamorphic_cache_table() {
return &megamorphic_cache_table_;
}
@@ -578,7 +584,7 @@
static char* GetStatus(const char* request);
private:
- Isolate();
+ explicit Isolate(bool is_vm_isolate);
void BuildName(const char* name_prefix);
void PrintInvokedFunctions();
@@ -635,6 +641,7 @@
// Status support.
char* stacktrace_;
intptr_t stack_frame_index_;
+ ObjectHistogram* object_histogram_;
static Dart_IsolateCreateCallback create_callback_;
static Dart_IsolateInterruptCallback interrupt_callback_;

Powered by Google App Engine
This is Rietveld 408576698