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

Unified Diff: src/heap.cc

Issue 181063033: Ignore slots buffer overflow when recording entries of the allocation sites scratchpad. (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 | « src/heap.h ('k') | src/heap-inl.h » ('j') | 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 1f97fc3859bddc841da80426bc0c4273f61db6bb..77ebb2a02b298eb8702461aa03d724d5f94023a0 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3654,7 +3654,8 @@ void Heap::InitializeAllocationSitesScratchpad() {
}
-void Heap::AddAllocationSiteToScratchpad(AllocationSite* site) {
+void Heap::AddAllocationSiteToScratchpad(AllocationSite* site,
+ ScratchpadSlotMode mode) {
if (allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize) {
// We cannot use the normal write-barrier because slots need to be
// recorded with non-incremental marking as well. We have to explicitly
@@ -3663,7 +3664,11 @@ void Heap::AddAllocationSiteToScratchpad(AllocationSite* 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);
+
+ if (mode == RECORD_SCRATCHPAD_SLOT) {
+ mark_compact_collector()->RecordSlot(
Michael Starzinger 2014/03/05 13:58:11 Can we get a short comment explaining why IGNORE_O
Hannes Payer (out of office) 2014/03/05 14:02:06 Done.
+ slot, slot, *slot, SlotsBuffer::IGNORE_OVERFLOW);
+ }
allocation_sites_scratchpad_length_++;
}
}
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698