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

Side by Side Diff: Source/platform/heap/Heap.cpp

Issue 818923005: Add InlinedMarkingVisitor::shouldMarkObject() predicate. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update predicate Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 return set; 2121 return set;
2122 } 2122 }
2123 #endif 2123 #endif
2124 2124
2125 protected: 2125 protected:
2126 virtual void registerWeakCellWithCallback(void** cell, WeakPointerCallback c allback) override 2126 virtual void registerWeakCellWithCallback(void** cell, WeakPointerCallback c allback) override
2127 { 2127 {
2128 Impl::registerWeakCellWithCallback(cell, callback); 2128 Impl::registerWeakCellWithCallback(cell, callback);
2129 } 2129 }
2130 2130
2131 inline bool checkSkipForObjectInTerminatingThreadHeap(const void* objectPoin ter) 2131 inline bool shouldMarkObject(const void* objectPointer)
2132 { 2132 {
2133 if (Mode != ThreadLocalMarking) 2133 if (Mode != ThreadLocalMarking)
2134 return false; 2134 return true;
2135 2135
2136 BaseHeapPage* page = pageFromObject(objectPointer); 2136 BaseHeapPage* page = pageFromObject(objectPointer);
2137 ASSERT(!page->orphaned()); 2137 ASSERT(!page->orphaned());
2138 // When doing a thread local GC, the marker checks if 2138 // When doing a thread local GC, the marker checks if
2139 // the object resides in another thread's heap. The 2139 // the object resides in another thread's heap. If it
2140 // object should not be traced, if it does. 2140 // does, the object should not be marked & traced.
2141 return page->terminating(); 2141 return page->terminating();
2142 } 2142 }
2143 }; 2143 };
2144 2144
2145 void Heap::init() 2145 void Heap::init()
2146 { 2146 {
2147 ThreadState::init(); 2147 ThreadState::init();
2148 s_markingStack = new CallbackStack(); 2148 s_markingStack = new CallbackStack();
2149 s_postMarkingCallbackStack = new CallbackStack(); 2149 s_postMarkingCallbackStack = new CallbackStack();
2150 s_weakCallbackStack = new CallbackStack(); 2150 s_weakCallbackStack = new CallbackStack();
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 bool Heap::s_shutdownCalled = false; 2817 bool Heap::s_shutdownCalled = false;
2818 bool Heap::s_lastGCWasConservative = false; 2818 bool Heap::s_lastGCWasConservative = false;
2819 FreePagePool* Heap::s_freePagePool; 2819 FreePagePool* Heap::s_freePagePool;
2820 OrphanedPagePool* Heap::s_orphanedPagePool; 2820 OrphanedPagePool* Heap::s_orphanedPagePool;
2821 Heap::RegionTree* Heap::s_regionTree = nullptr; 2821 Heap::RegionTree* Heap::s_regionTree = nullptr;
2822 size_t Heap::s_allocatedObjectSize = 0; 2822 size_t Heap::s_allocatedObjectSize = 0;
2823 size_t Heap::s_allocatedSpace = 0; 2823 size_t Heap::s_allocatedSpace = 0;
2824 size_t Heap::s_markedObjectSize = 0; 2824 size_t Heap::s_markedObjectSize = 0;
2825 2825
2826 } // namespace blink 2826 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698