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

Side by Side Diff: src/mark-compact.cc

Issue 99133017: Use an allocation site scratchpad to speed up allocaton site processing during gc. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 3354
3355 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { 3355 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
3356 Heap::RelocationLock relocation_lock(heap()); 3356 Heap::RelocationLock relocation_lock(heap());
3357 3357
3358 bool code_slots_filtering_required; 3358 bool code_slots_filtering_required;
3359 { GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_SWEEP_NEWSPACE); 3359 { GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_SWEEP_NEWSPACE);
3360 code_slots_filtering_required = MarkInvalidatedCode(); 3360 code_slots_filtering_required = MarkInvalidatedCode();
3361 EvacuateNewSpace(); 3361 EvacuateNewSpace();
3362 } 3362 }
3363 3363
3364 // We have to travers our allocation sites scratchpad which contains raw
3365 // pointers before we move objects. During new space evacauation we
3366 // gathered pretenuring statistics. The found allocation sites may not be
3367 // valid after compacting old space.
3368 heap()->ProcessPretenuringFeedback();
3369
3370
3364 { GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_EVACUATE_PAGES); 3371 { GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_EVACUATE_PAGES);
3365 EvacuatePages(); 3372 EvacuatePages();
3366 } 3373 }
3367 3374
3368 // Second pass: find pointers to new space and update them. 3375 // Second pass: find pointers to new space and update them.
3369 PointersUpdatingVisitor updating_visitor(heap()); 3376 PointersUpdatingVisitor updating_visitor(heap());
3370 3377
3371 { GCTracer::Scope gc_scope(tracer_, 3378 { GCTracer::Scope gc_scope(tracer_,
3372 GCTracer::Scope::MC_UPDATE_NEW_TO_NEW_POINTERS); 3379 GCTracer::Scope::MC_UPDATE_NEW_TO_NEW_POINTERS);
3373 // Update pointers in to space. 3380 // Update pointers in to space.
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
4361 while (buffer != NULL) { 4368 while (buffer != NULL) {
4362 SlotsBuffer* next_buffer = buffer->next(); 4369 SlotsBuffer* next_buffer = buffer->next();
4363 DeallocateBuffer(buffer); 4370 DeallocateBuffer(buffer);
4364 buffer = next_buffer; 4371 buffer = next_buffer;
4365 } 4372 }
4366 *buffer_address = NULL; 4373 *buffer_address = NULL;
4367 } 4374 }
4368 4375
4369 4376
4370 } } // namespace v8::internal 4377 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698