Commit 5e4ad025 authored by antonm@chromium.org's avatar antonm@chromium.org

Do not do post GC processing for scavenges.

Typically there is no or few global handles to delete (only manually deleted, but those might be
reused).

Review URL: http://codereview.chromium.org/274050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4293f8eb
...@@ -478,7 +478,13 @@ void Heap::PerformGarbageCollection(AllocationSpace space, ...@@ -478,7 +478,13 @@ void Heap::PerformGarbageCollection(AllocationSpace space,
Counters::objs_since_last_young.Set(0); Counters::objs_since_last_young.Set(0);
PostGarbageCollectionProcessing(); if (collector == MARK_COMPACTOR) {
DisableAssertNoAllocation allow_allocation;
GlobalHandles::PostGarbageCollectionProcessing();
}
// Update relocatables.
Relocatable::PostGarbageCollectionProcessing();
if (collector == MARK_COMPACTOR) { if (collector == MARK_COMPACTOR) {
// Register the amount of external allocated memory. // Register the amount of external allocated memory.
...@@ -494,17 +500,6 @@ void Heap::PerformGarbageCollection(AllocationSpace space, ...@@ -494,17 +500,6 @@ void Heap::PerformGarbageCollection(AllocationSpace space,
} }
void Heap::PostGarbageCollectionProcessing() {
// Process weak handles post gc.
{
DisableAssertNoAllocation allow_allocation;
GlobalHandles::PostGarbageCollectionProcessing();
}
// Update relocatables.
Relocatable::PostGarbageCollectionProcessing();
}
void Heap::MarkCompact(GCTracer* tracer) { void Heap::MarkCompact(GCTracer* tracer) {
gc_state_ = MARK_COMPACT; gc_state_ = MARK_COMPACT;
mc_count_++; mc_count_++;
......
...@@ -637,9 +637,6 @@ class Heap : public AllStatic { ...@@ -637,9 +637,6 @@ class Heap : public AllStatic {
static void GarbageCollectionPrologue(); static void GarbageCollectionPrologue();
static void GarbageCollectionEpilogue(); static void GarbageCollectionEpilogue();
// Code that should be executed after the garbage collection proper.
static void PostGarbageCollectionProcessing();
// Performs garbage collection operation. // Performs garbage collection operation.
// Returns whether required_space bytes are available after the collection. // Returns whether required_space bytes are available after the collection.
static bool CollectGarbage(int required_space, AllocationSpace space); static bool CollectGarbage(int required_space, AllocationSpace space);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment