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

Unified Diff: src/heap.cc

Issue 153173008: Make sure that allocation site scratchpad entries get recorded. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 5ede02cb1044f4d843d492d44bfd0ddc49680c4f..885350ae98e5c10a5b7a7a3345cc182e98db6ddd 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3621,8 +3621,14 @@ void Heap::InitializeAllocationSitesScratchpad() {
void Heap::AddAllocationSiteToScratchpad(AllocationSite* site) {
if (allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize) {
+ // Since the processing of the allocation sites scratchpad happens after
+ // evacuation, we have to explicitly record the slot to take evacuation
+ // candidates into account.
Michael Starzinger 2014/02/11 10:48:48 Maybe make it explicit in the comment that "we can
Hannes Payer (out of office) 2014/02/11 10:52:20 Done.
allocation_sites_scratchpad()->set(
- allocation_sites_scratchpad_length_, site);
+ allocation_sites_scratchpad_length_, site, SKIP_WRITE_BARRIER);
+ Object** slot = allocation_sites_scratchpad()->RawFieldOfElementAt(
+ allocation_sites_scratchpad_length_);
+ mark_compact_collector()->RecordSlot(slot, slot, *slot);
allocation_sites_scratchpad_length_++;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698