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

Unified Diff: runtime/vm/isolate.cc

Issue 187133004: When reading a full snapshot use the class id from the snapshot instead of generating a new one. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 33311)
+++ runtime/vm/isolate.cc (working copy)
@@ -16,7 +16,6 @@
#include "vm/debugger.h"
#include "vm/deopt_instructions.h"
#include "vm/heap.h"
-#include "vm/heap_histogram.h"
#include "vm/message_handler.h"
#include "vm/object_id_ring.h"
#include "vm/object_store.h"
@@ -47,10 +46,19 @@
void Isolate::RegisterClass(const Class& cls) {
class_table()->Register(cls);
- if (object_histogram() != NULL) object_histogram()->RegisterClass(cls);
}
+void Isolate::RegisterClassAt(intptr_t index, const Class& cls) {
+ class_table()->RegisterAt(index, cls);
+}
+
+
+void Isolate::ValidateClassTable() {
+ class_table()->Validate();
+}
+
+
class IsolateMessageHandler : public MessageHandler {
public:
explicit IsolateMessageHandler(Isolate* isolate);
@@ -314,7 +322,6 @@
deopt_context_(NULL),
stacktrace_(NULL),
stack_frame_index_(-1),
- object_histogram_(NULL),
cha_used_(false),
object_id_ring_(NULL),
profiler_data_(NULL),
@@ -322,9 +329,6 @@
next_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
reusable_handles_() {
- if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) {
- object_histogram_ = new ObjectHistogram(this);
- }
}
#undef REUSABLE_HANDLE_INITIALIZERS
@@ -344,7 +348,6 @@
delete message_handler_;
message_handler_ = NULL; // Fail fast if we send messages to a dead isolate.
ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted.
- delete object_histogram_;
delete spawn_state_;
}
@@ -750,11 +753,6 @@
StackZone stack_zone(this);
HandleScope handle_scope(this);
- if (FLAG_print_object_histogram) {
- heap()->CollectAllGarbage();
- object_histogram()->Print();
- }
-
// Clean up debugger resources.
debugger()->Shutdown();
« runtime/vm/class_table.cc ('K') | « runtime/vm/isolate.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698