Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 8ade41cd2afeb2463fd68cf252df3e45d41a6a51..6c7044edd2cd3575665b18c77b3289f613e5f8bd 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -30,6 +30,7 @@ |
#include "compilation-cache.h" |
#include "execution.h" |
#include "heap-profiler.h" |
+#include "gdbjit.h" |
#include "global-handles.h" |
#include "ic-inl.h" |
#include "mark-compact.h" |
@@ -125,6 +126,12 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) { |
if (!Heap::map_space()->MapPointersEncodable()) |
compacting_collection_ = false; |
if (FLAG_collect_maps) CreateBackPointers(); |
+#ifdef ENABLE_GDBJIT_INTERFACE |
+ if (FLAG_gdbjit) { |
+ // If GDBJIT interface is active disable compaction. |
Erik Corry
2011/01/05 09:00:15
We should remember to fix this in the new GC. We
Vyacheslav Egorov (Chromium)
2011/01/18 16:10:42
Done.
|
+ compacting_collection_ = false; |
+ } |
+#endif |
PagedSpaces spaces; |
for (PagedSpace* space = spaces.next(); |
@@ -2906,6 +2913,11 @@ int MarkCompactCollector::RelocateNewObject(HeapObject* obj) { |
void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj) { |
+#ifdef ENABLE_GDBJIT_INTERFACE |
+ if (obj->IsCode()) { |
+ GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj)); |
+ } |
+#endif |
#ifdef ENABLE_LOGGING_AND_PROFILING |
if (obj->IsCode()) { |
PROFILE(CodeDeleteEvent(obj->address())); |