|
|
Chromium Code Reviews|
Created:
6 years, 7 months ago by Erik Corry Modified:
6 years, 7 months ago CC:
blink-reviews, haraken, kouhei+heap_chromium.org, Mads Ager (chromium) Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionSimplify and speed up address-to-page cache for conservative stack scanning.
This change makes the per-heap address-to-page cache positive only and handles
large pages more naturally. There is now a separate whole-process negative
cache that keeps track of pages that are not in any of the heaps. This speeds up my microbenchmark from ~87 to ~65.
R=ager@chromium.org, haraken@chromium.org, wibling@chromium.org, zerny@chromium.org
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173749
Patch Set 1 #
Total comments: 34
Patch Set 2 : Revert GC heuristic change and CL feedback #Patch Set 3 : There were some missing cache flushes. Strengthened asserts #
Total comments: 7
Patch Set 4 : Merge up #
Messages
Total messages: 17 (0 generated)
LGTM with comments. This is a nice change! https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:763: heapContainsCache()->flush(); For consistency, let's define flushHeapContainsCache(). https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:837: heapContainsCache()->flush(); flushHeapContainsCache() https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:1529: if (reinterpret_cast<uintptr_t>(address) < blinkPageSize) What is this change for? https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:192: virtual bool isLargeObject() { return true; } Add OVERRIDE. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:241: return ((size() - 1) & blinkPageBaseMask) + blinkPageSize; Can we use roundToBlinkPageEnd? If you use roundToBlinkPageEnd in the caller site, you can remove sizeRoundedUpToPage. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:519: AddressEntry(Address address) : m_address(address) { } Add explicit. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:553: NegativeEntry(Address address, bool) : AddressEntry(address) { } Do we need the bool parameter? NegativeEntry should just contain a list of negative entries, and boolean parameters won't need to be associated. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:901: static void flushNotInHeapCache(); flushHeapDoesNotContainCache It's confusing to have two names for one thing. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:908: static HeapDoesNotContainCache* s_notInHeapCache; s_notInHeapCache => s_heapDoesNotContainCache https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:525: if (newSize < (1 << 20)) What is this condition for? https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:664: ASSERT(!page || page->isLargeObject() || page == m_heaps[i]->heapPageFromAddress(blinkPageAddr)); heapPageFromAddress(roundToBlinkPageStart(address)) https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:665: ASSERT(!page || page->isLargeObject() || page == m_heaps[i]->heapPageFromAddress(blinkPageAddr + blinkPageSize - 1)); heapPageFromAddress(roundToBlinkPageEnd(address)) https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:666: if (page) { You can add the two ASSERTs into this if branch. Then you won't need to check !page.
Nothing to add to Haraken's comments, lgtm
LGTM https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:1529: if (reinterpret_cast<uintptr_t>(address) < blinkPageSize) This is an optimization to quickly filter out small integers (which occur pretty frequently in stack frames). Could you add a comment stating that? https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:900: static void addressIsNotInHeap(Address); I would remove these methods and just inline the one liners. I find that easier to read (being explicit about the cache) and it doesn't clutter the header file. Are they added because ThreadState needs to use this? ThreadState is a friend and has access to the cache directly. You could add a private getter if you want. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:525: if (newSize < (1 << 20)) Could we do tuning of the GC heuristics separately from this change? Let's introduce the negative cache first. Then we can tune these as a follow-up (and update the comments when we do.)
lgtm https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:475: BaseHeapPage* page = heapPageFromAddress(address); NIT: Perhaps add a comment that this will check both "normal" and large objects since the variable name doesn't indicate the latter.
https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:763: heapContainsCache()->flush(); On 2014/05/08 05:44:58, haraken wrote: > > For consistency, let's define flushHeapContainsCache(). Done, but it doesn't make it very consistent with flushNotInHeapCache. flushNotInHeapCache is a static method on Heap, whereas flushHeapContainsCache is an instance method on ThreadHeap. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:837: heapContainsCache()->flush(); On 2014/05/08 05:44:58, haraken wrote: > > flushHeapContainsCache() Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:1529: if (reinterpret_cast<uintptr_t>(address) < blinkPageSize) On 2014/05/08 05:44:58, haraken wrote: > > What is this change for? You can't allocate at address 0, so no allocation can take place in the first page (pages are aligned). I moved the negative cache lookup here instead of having it in the ThreadState. That makes this test unnecessary. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.cp... Source/platform/heap/Heap.cpp:1529: if (reinterpret_cast<uintptr_t>(address) < blinkPageSize) On 2014/05/08 06:52:37, Mads Ager (chromium) wrote: > This is an optimization to quickly filter out small integers (which occur pretty > frequently in stack frames). Could you add a comment stating that? Removed instead. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:192: virtual bool isLargeObject() { return true; } On 2014/05/08 05:44:58, haraken wrote: > > Add OVERRIDE. Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:241: return ((size() - 1) & blinkPageBaseMask) + blinkPageSize; On 2014/05/08 05:44:58, haraken wrote: > > Can we use roundToBlinkPageEnd? If you use roundToBlinkPageEnd in the caller > site, you can remove sizeRoundedUpToPage. Removed https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:519: AddressEntry(Address address) : m_address(address) { } On 2014/05/08 05:44:58, haraken wrote: > > Add explicit. Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:553: NegativeEntry(Address address, bool) : AddressEntry(address) { } On 2014/05/08 05:44:58, haraken wrote: > > Do we need the bool parameter? NegativeEntry should just contain a list of > negative entries, and boolean parameters won't need to be associated. The addEntry method of HeapExtentCache expects to use two arguments. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:900: static void addressIsNotInHeap(Address); On 2014/05/08 06:52:37, Mads Ager (chromium) wrote: > I would remove these methods and just inline the one liners. I find that easier > to read (being explicit about the cache) and it doesn't clutter the header file. > > > Are they added because ThreadState needs to use this? ThreadState is a friend > and has access to the cache directly. You could add a private getter if you > want. Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:901: static void flushNotInHeapCache(); On 2014/05/08 05:44:58, haraken wrote: > > flushHeapDoesNotContainCache > > It's confusing to have two names for one thing. Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/Heap.h#... Source/platform/heap/Heap.h:908: static HeapDoesNotContainCache* s_notInHeapCache; On 2014/05/08 05:44:58, haraken wrote: > > s_notInHeapCache => s_heapDoesNotContainCache Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:475: BaseHeapPage* page = heapPageFromAddress(address); On 2014/05/08 07:43:41, wibling-chromium wrote: > NIT: Perhaps add a comment that this will check both "normal" and large objects > since the variable name doesn't indicate the latter. Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:525: if (newSize < (1 << 20)) On 2014/05/08 06:52:37, Mads Ager (chromium) wrote: > Could we do tuning of the GC heuristics separately from this change? Let's > introduce the negative cache first. Then we can tune these as a follow-up (and > update the comments when we do.) Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:525: if (newSize < (1 << 20)) On 2014/05/08 05:44:58, haraken wrote: > > What is this condition for? Heuristic. Removed for now. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:664: ASSERT(!page || page->isLargeObject() || page == m_heaps[i]->heapPageFromAddress(blinkPageAddr)); On 2014/05/08 05:44:58, haraken wrote: > > heapPageFromAddress(roundToBlinkPageStart(address)) Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:665: ASSERT(!page || page->isLargeObject() || page == m_heaps[i]->heapPageFromAddress(blinkPageAddr + blinkPageSize - 1)); On 2014/05/08 05:44:58, haraken wrote: > > heapPageFromAddress(roundToBlinkPageEnd(address)) Done. https://codereview.chromium.org/271703002/diff/1/Source/platform/heap/ThreadS... Source/platform/heap/ThreadState.cpp:666: if (page) { On 2014/05/08 05:44:58, haraken wrote: > > You can add the two ASSERTs into this if branch. Then you won't need to check > !page. Done.
https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... Source/platform/heap/Heap.cpp:1529: #ifdef NDEBUG Why not do this optimization in release builds? Is it a left-over from debugging? https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... Source/platform/heap/Heap.cpp:1546: #else Ditto? https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Thr... File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Thr... Source/platform/heap/ThreadState.cpp:479: // other other heaps or put this address in the other other -> other https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Thr... Source/platform/heap/ThreadState.cpp:656: #ifdef NDEBUG Should this be removed as well?
https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... Source/platform/heap/Heap.cpp:1529: #ifdef NDEBUG On 2014/05/09 10:25:20, wibling-chromium wrote: > Why not do this optimization in release builds? Is it a left-over from > debugging? It's confusing because the macro has negative sense. So ifdef NDEBUG means if-we-are-not-debugging. The reason we don't do the optimization when we are debugging is that we want to assert the cache is working in debug mode. https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... Source/platform/heap/Heap.cpp:1546: #else On 2014/05/09 10:25:20, wibling-chromium wrote: > Ditto? Ditto
lgtm https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/271703002/diff/40001/Source/platform/heap/Hea... Source/platform/heap/Heap.cpp:1529: #ifdef NDEBUG On 2014/05/09 10:31:54, Erik Corry wrote: > On 2014/05/09 10:25:20, wibling-chromium wrote: > > Why not do this optimization in release builds? Is it a left-over from > > debugging? > > It's confusing because the macro has negative sense. So ifdef NDEBUG means > if-we-are-not-debugging. > > The reason we don't do the optimization when we are debugging is that we want to > assert the cache is working in debug mode. Doh, okay then:)
The CQ bit was checked by erik.corry@gmail.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erik.corry@gmail.com/271703002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for Source/platform/heap/Heap.h:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file Source/platform/heap/Heap.h
Hunk #1 succeeded at 90 (offset 2 lines).
Hunk #2 succeeded at 141 (offset 2 lines).
Hunk #3 succeeded at 159 (offset 2 lines).
Hunk #4 succeeded at 191 (offset 2 lines).
Hunk #5 succeeded at 214 (offset 2 lines).
Hunk #6 succeeded at 255 (offset 2 lines).
Hunk #7 succeeded at 457 (offset 2 lines).
Hunk #8 succeeded at 486 (offset 2 lines).
Hunk #9 FAILED at 508.
Hunk #10 succeeded at 701 (offset 52 lines).
Hunk #11 succeeded at 747 (offset 52 lines).
Hunk #12 succeeded at 763 (offset 52 lines).
Hunk #13 succeeded at 910 (offset 52 lines).
1 out of 13 hunks FAILED -- saving rejects to file
Source/platform/heap/Heap.h.rej
Patch: Source/platform/heap/Heap.h
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index
e464e89dcfb4c2596f1cc1f532ebc3f2c16f394c..3ed53923db6c589f346a340efd17fc424803eea7
100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -88,6 +88,11 @@ inline Address roundToBlinkPageStart(Address address)
return reinterpret_cast<Address>(reinterpret_cast<uintptr_t>(address) &
blinkPageBaseMask);
}
+inline Address roundToBlinkPageEnd(Address address)
+{
+ return reinterpret_cast<Address>(reinterpret_cast<uintptr_t>(address - 1) &
blinkPageBaseMask) + blinkPageSize;
+}
+
// Compute the amount of padding we have to add to a header to make
// the size of the header plus the padding a multiple of 8 bytes.
template<typename Header>
@@ -134,17 +139,15 @@ public:
ASSERT(isPageHeaderAddress(reinterpret_cast<Address>(this)));
}
- // Check if the given address could point to an object in this
+ // Check if the given address points to an object in this
// heap page. If so, find the start of that object and mark it
- // using the given Visitor.
- //
- // Returns true if the object was found and marked, returns false
- // otherwise.
+ // using the given Visitor. Otherwise do nothing. The pointer must
+ // be within the same aligned blinkPageSize as the this-pointer.
//
// This is used during conservative stack scanning to
// conservatively mark all objects that could be referenced from
// the stack.
- virtual bool checkAndMarkPointer(Visitor*, Address) = 0;
+ virtual void checkAndMarkPointer(Visitor*, Address) = 0;
#if ENABLE(GC_TRACING)
virtual const GCInfo* findGCInfo(Address) = 0;
@@ -154,6 +157,7 @@ public:
PageMemory* storage() const { return m_storage; }
ThreadState* threadState() const { return m_threadState; }
const GCInfo* gcInfo() { return m_gcInfo; }
+ virtual bool isLargeObject() { return false; }
private:
// Accessor to silence unused warnings.
@@ -185,11 +189,14 @@ public:
COMPILE_ASSERT(!(sizeof(LargeHeapObject<Header>) & allocationMask),
large_heap_object_header_misaligned);
}
- virtual bool checkAndMarkPointer(Visitor*, Address);
+ virtual void checkAndMarkPointer(Visitor*, Address) OVERRIDE;
+ virtual bool isLargeObject() OVERRIDE { return true; }
#if ENABLE(GC_TRACING)
- virtual const GCInfo* findGCInfo(Address)
+ virtual const GCInfo* findGCInfo(Address address)
{
+ if (!objectContains(address))
+ return 0;
return gcInfo();
}
#endif
@@ -205,9 +212,19 @@ public:
*previousNext = m_next;
}
+ // The LargeHeapObject pseudo-page contains one actual object. Determine
+ // whether the pointer is within that object.
+ bool objectContains(Address object)
+ {
+ return (payload() <= object) && (object < address() + size());
+ }
+
+ // Returns true for any address that is on one of the pages that this
+ // large object uses. That ensures that we can use a negative result to
+ // populate the negative page cache.
bool contains(Address object)
{
- return (address() <= object) && (object <= (address() + size()));
+ return roundToBlinkPageStart(address()) <= object && object <
roundToBlinkPageEnd(address() + size());
}
LargeHeapObject<Header>* next()
@@ -236,7 +253,6 @@ public:
void finalize();
private:
- friend class Heap;
friend class ThreadHeap<Header>;
LargeHeapObject<Header>* m_next;
@@ -439,10 +455,14 @@ public:
bool isEmpty();
+ // Returns true for the whole blinkPageSize page that the page is on, even
+ // for the header, and the unmapped guard page at the start. That ensures
+ // the result can be used to populate the negative page cache.
bool contains(Address addr)
{
Address blinkPageStart = roundToBlinkPageStart(address());
- return blinkPageStart <= addr && (blinkPageStart + blinkPageSize) >
addr;
+ ASSERT(blinkPageStart = address() - osPageSize()); // Page is at
aligned address plus guard page size.
+ return blinkPageStart <= addr && addr < blinkPageStart + blinkPageSize;
}
HeapPage* next() { return m_next; }
@@ -464,7 +484,7 @@ public:
void sweep();
void clearObjectStartBitMap();
void finalize(Header*);
- virtual bool checkAndMarkPointer(Visitor*, Address);
+ virtual void checkAndMarkPointer(Visitor*, Address) OVERRIDE;
#if ENABLE(GC_TRACING)
const GCInfo* findGCInfo(Address) OVERRIDE;
#endif
@@ -488,77 +508,115 @@ protected:
friend class ThreadHeap<Header>;
};
-// A HeapContainsCache provides a fast way of taking an arbitrary
+class AddressEntry {
+public:
+ AddressEntry() : m_address(0) { }
+
+ explicit AddressEntry(Address address) : m_address(address) { }
+
+ Address address() const { return m_address; }
+
+private:
+ Address m_address;
+};
+
+class PositiveEntry : public AddressEntry {
+public:
+ PositiveEntry()
+ : AddressEntry()
+ , m_containingPage(0)
+ {
+ }
+
+ PositiveEntry(Address address, BaseHeapPage* containingPage)
+ : AddressEntry(address)
+ , m_containingPage(containingPage)
+ {
+ }
+
+ BaseHeapPage* result() const { return m_containingPage; }
+
+ typedef BaseHeapPage* LookupResult;
+
+private:
+ BaseHeapPage* m_containingPage;
+};
+
+class NegativeEntry : public AddressEntry {
+public:
+ NegativeEntry() : AddressEntry() { }
+
+ NegativeEntry(Address address, bool) : AddressEntry(address) { }
+
+ bool result() const { return true; }
+
+ typedef bool LookupResult;
+};
+
+// A HeapExtentCache provides a fast way of taking an arbitrary
// pointer-sized word, and determining whether it can be interpreted
// as a pointer to an area that is managed by the garbage collected
// Blink heap. There is a cache of 'pages' that have previously been
-// determined to be either wholly inside or wholly outside the
-// heap. The size of these pages must be smaller than the allocation
-// alignment of the heap pages. We determine on-heap-ness by rounding
-// down the pointer to the nearest page and looking up the page in the
-// cache. If there is a miss in the cache we ask the heap to determine
-// the status of the pointer by iterating over all of the heap. The
-// result is then cached in the two-way associative page cache.
+// determined to be wholly inside the heap. The size of these pages must be
+// smaller than the allocation alignment of the heap pages. We determine
+// on-heap-ness by rounding down the pointer to the nearest page and looking up
+// the page in the cache. If there is a miss in the cache we can ask the heap
+// to determine the status of the pointer by iterating over all of the heap.
+// The result is then cached in the two-way associative page cache.
//
-// A HeapContainsCache is both a positive and negative
-// cache. Therefore, it must be flushed both when new memory is added
-// and when memory is removed from the Blink heap.
-class HeapContainsCache {
+// A HeapContainsCache is a positive cache. Therefore, it must be flushed when
+// memory is removed from the Blink heap. The HeapDoesNotContainCache is a
+// negative cache, so it must be flushed when memory is added to the heap.
+template<typename Entry>
+class HeapExtentCache {
public:
- HeapContainsCache();
+ HeapExtentCache()
+ : m_entries(adoptArrayPtr(new Entry[HeapExtentCache::numberOfEntries]))
+ , m_hasEntries(false)
+ {
+ }
void flush();
bool contains(Address);
+ bool isEmpty() { return !m_hasEntries; }
// Perform a lookup in the cache.
//
- // If lookup returns false the argument address was not found in
+ // If lookup returns null/false the argument address was not found in
// the cache and it is unknown if the address is in the Blink
// heap.
//
- // If lookup returns true the argument address was found in the
- // cache. In that case, the address is in the heap if the base
- // heap page out parameter is different from 0 and is not in the
- // heap if the base heap page out parameter is 0.
- bool lookup(Address, BaseHeapPage**);
-
- // Add an entry to the cache. Use a 0 base heap page pointer to
- // add a negative entry.
- void addEntry(Address, BaseHeapPage*);
-
-private:
- class Entry {
- public:
- Entry()
- : m_address(0)
- , m_containingPage(0)
- {
- }
-
- Entry(Address address, BaseHeapPage* containingPage)
- : m_address(address)
- , m_containingPage(containingPage)
- {
- }
-
- BaseHeapPage* containingPage() { return m_containingPage; }
- Address address() { return m_address; }
+ // If lookup returns true/a page, the argument address was found in the
+ // cache. For the HeapContainsCache this means the address is in the heap.
+ // For the HeapDoesNotContainCache this means the address is not in the
+ // heap.
+ …
(message too large)
The CQ bit was checked by erik.corry@gmail.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erik.corry@gmail.com/271703002/60001
Message was sent while issue was closed.
Change committed as 173749 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
