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

Unified Diff: runtime/vm/isolate.cc

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/isolate.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index f908b261d6a40c538c4c33220f1f7421669bf78a..5b262075a150036f7d5fa015d820b21a9ff963ec 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -20,6 +20,8 @@
#include "vm/message_handler.h"
#include "vm/object_id_ring.h"
#include "vm/object_store.h"
+#include "vm/object.h"
+#include "vm/os_thread.h"
#include "vm/parser.h"
#include "vm/port.h"
#include "vm/profiler.h"
@@ -31,7 +33,6 @@
#include "vm/stub_code.h"
#include "vm/symbols.h"
#include "vm/tags.h"
-#include "vm/os_thread.h"
#include "vm/thread_interrupter.h"
#include "vm/timer.h"
#include "vm/visitor.h"
@@ -493,6 +494,7 @@ Isolate::Isolate()
tag_table_(GrowableObjectArray::null()),
current_tag_(UserTag::null()),
default_tag_(UserTag::null()),
+ deoptimized_code_array_(GrowableObjectArray::null()),
metrics_list_head_(NULL),
next_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
@@ -1251,6 +1253,10 @@ void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor,
// Visit the tag table which is stored in the isolate.
visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_));
+ // Visit the deoptimized code array which is stored in the isolate.
+ visitor->VisitPointer(
+ reinterpret_cast<RawObject**>(&deoptimized_code_array_));
+
// Visit objects in the debugger.
debugger()->VisitObjectPointers(visitor);
@@ -1448,6 +1454,25 @@ void Isolate::set_default_tag(const UserTag& tag) {
}
+void Isolate::set_deoptimized_code_array(const GrowableObjectArray& value) {
+ deoptimized_code_array_ = value.raw();
+}
+
+
+void Isolate::TrackDeoptimizedCode(const Code& code) {
+ ASSERT(!code.IsNull());
+ const GrowableObjectArray& deoptimized_code =
+ GrowableObjectArray::Handle(deoptimized_code_array());
+ if (deoptimized_code.IsNull()) {
+ // Not tracking deoptimized code.
+ return;
+ }
+ // TODO(johnmccutchan): Scan this array and the isolate's profile before
+ // old space GC and remove the keep_code flag.
+ deoptimized_code.Add(code);
+}
+
+
void Isolate::VisitIsolates(IsolateVisitor* visitor) {
if (visitor == NULL) {
return;
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698