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
This commit is contained in:
parent
4293f8eb8e
commit
5e4ad0254c
19
src/heap.cc
19
src/heap.cc
@ -478,7 +478,13 @@ void Heap::PerformGarbageCollection(AllocationSpace space,
|
||||
|
||||
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) {
|
||||
// Register the amount of external allocated memory.
|
||||
@ -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) {
|
||||
gc_state_ = MARK_COMPACT;
|
||||
mc_count_++;
|
||||
|
@ -637,9 +637,6 @@ class Heap : public AllStatic {
|
||||
static void GarbageCollectionPrologue();
|
||||
static void GarbageCollectionEpilogue();
|
||||
|
||||
// Code that should be executed after the garbage collection proper.
|
||||
static void PostGarbageCollectionProcessing();
|
||||
|
||||
// Performs garbage collection operation.
|
||||
// Returns whether required_space bytes are available after the collection.
|
||||
static bool CollectGarbage(int required_space, AllocationSpace space);
|
||||
|
Loading…
Reference in New Issue
Block a user