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

Unified Diff: runtime/vm/class_table.cc

Issue 11428067: Merge the Merlin heap tracing to top-of-trunk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years 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/assembler_ia32.cc ('k') | runtime/vm/code_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_table.cc
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 3b344909d61800df10b8c287bf40293e70de1492..2d14cecab2658306e78524afb043a1bfe9a76415 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -5,6 +5,7 @@
#include "vm/class_table.h"
#include "vm/flags.h"
#include "vm/freelist.h"
+#include "vm/heap_trace.h"
#include "vm/object.h"
#include "vm/raw_object.h"
#include "vm/visitor.h"
@@ -49,6 +50,9 @@ void ClassTable::Register(const Class& cls) {
ASSERT(table_[index] == 0);
ASSERT(index < capacity_);
table_[index] = cls.raw();
+ if (HeapTrace::is_enabled()) {
+ Isolate::Current()->heap()->trace()->TraceRegisterClass(cls);
+ }
// Add the vtable for this predefined class into the static vtable registry
// if it has not been setup yet.
cpp_vtable cls_vtable = cls.handle_vtable();
@@ -72,6 +76,9 @@ void ClassTable::Register(const Class& cls) {
ASSERT(top_ < capacity_);
cls.set_id(top_);
table_[top_] = cls.raw();
+ if (HeapTrace::is_enabled()) {
+ Isolate::Current()->heap()->trace()->TraceRegisterClass(cls);
+ }
top_++; // Increment next index.
}
}
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/code_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698