f52e5f12834f2345d2309b9e2e02b76595477719
[WebKit-https.git] / Source / bmalloc / ChangeLog
1 2014-04-07  Geoffrey Garen  <ggaren@apple.com>
2
3         bmalloc: rolled out the tryLock experiment
4         https://bugs.webkit.org/show_bug.cgi?id=131328
5
6         Reviewed by Andreas Kling.
7
8         It wasn't a speedup.
9
10         * bmalloc.xcodeproj/project.pbxproj:
11         * bmalloc/Allocator.cpp:
12         (bmalloc::Allocator::processSmallAllocatorLog):
13         (bmalloc::Allocator::processMediumAllocatorLog):
14         * bmalloc/Deallocator.cpp:
15         (bmalloc::Deallocator::processObjectLog):
16         (bmalloc::Deallocator::deallocateSlowCase):
17         (bmalloc::Deallocator::deallocateSmallLine):
18         (bmalloc::Deallocator::deallocateMediumLine):
19         * bmalloc/Deallocator.h:
20         (bmalloc::Deallocator::deallocateFastCase):
21         * bmalloc/Heap.h:
22         (bmalloc::Heap::deallocateSmallLine):
23         (bmalloc::Heap::deallocateMediumLine):
24         * bmalloc/Line.h:
25         (bmalloc::Line<Traits>::deref):
26         * bmalloc/Page.h:
27         (bmalloc::Page<Traits>::deref):
28
29 2014-04-07  Geoffrey Garen  <ggaren@apple.com>
30
31         bmalloc
32         https://bugs.webkit.org/show_bug.cgi?id=131170
33
34         Reviewed by Andreas Kling.
35
36         Initial commit.
37
38         * bmalloc: Added.
39         * bmalloc.xcodeproj: Added.
40         * bmalloc.xcodeproj/project.pbxproj: Added.
41         * bmalloc/Algorithm.h: Added.
42         (bmalloc::max):
43         (bmalloc::min):
44         (bmalloc::mask):
45         (bmalloc::test):
46         (bmalloc::roundUpToMultipleOf):
47         (bmalloc::roundDownToMultipleOf):
48         (bmalloc::sizeOf):
49         (bmalloc::bitCount):
50         (bmalloc::isPowerOfTwo):
51         * bmalloc/Allocator.cpp: Added.
52         (bmalloc::Allocator::Allocator):
53         (bmalloc::Allocator::~Allocator):
54         (bmalloc::Allocator::log):
55         (bmalloc::Allocator::processSmallAllocatorLog):
56         (bmalloc::Allocator::processMediumAllocatorLog):
57         (bmalloc::Allocator::allocateLarge):
58         (bmalloc::Allocator::allocateXLarge):
59         (bmalloc::Allocator::allocateMedium):
60         (bmalloc::Allocator::allocateSlowCase):
61         * bmalloc/Allocator.h: Added.
62         (bmalloc::Allocator::smallAllocatorFor):
63         (bmalloc::Allocator::allocateFastCase):
64         (bmalloc::Allocator::allocate):
65         * bmalloc/AsyncTask.cpp: Added.
66         (bmalloc::AsyncTask<Function>::runSlowCase):
67         (bmalloc::AsyncTask<Function>::pthreadEntryPoint):
68         (bmalloc::AsyncTask<Function>::entryPoint):
69         * bmalloc/AsyncTask.h: Added.
70         (bmalloc::Function>::AsyncTask):
71         (bmalloc::Function>::join):
72         (bmalloc::Function>::run):
73         (bmalloc::Function>::runSlowCase):
74         (bmalloc::Function>::pthreadEntryPoint):
75         (bmalloc::Function>::entryPoint):
76         * bmalloc/BAssert.h: Added.
77         * bmalloc/BeginTag.h: Added.
78         (bmalloc::BeginTag::isInFreeList):
79         * bmalloc/BoundaryTag.h: Added.
80         (bmalloc::BoundaryTag::isXLarge):
81         (bmalloc::BoundaryTag::setXLarge):
82         (bmalloc::BoundaryTag::isFree):
83         (bmalloc::BoundaryTag::setFree):
84         (bmalloc::BoundaryTag::isEnd):
85         (bmalloc::BoundaryTag::setEnd):
86         (bmalloc::BoundaryTag::hasPhysicalPages):
87         (bmalloc::BoundaryTag::setHasPhysicalPages):
88         (bmalloc::BoundaryTag::isNull):
89         (bmalloc::BoundaryTag::clear):
90         (bmalloc::BoundaryTag::size):
91         (bmalloc::BoundaryTag::setSize):
92         (bmalloc::BoundaryTag::prev):
93         (bmalloc::BoundaryTag::next):
94         * bmalloc/BoundaryTagInlines.h: Added.
95         (bmalloc::validate):
96         (bmalloc::validatePrev):
97         (bmalloc::validateNext):
98         (bmalloc::BoundaryTag::init):
99         (bmalloc::BoundaryTag::mergeLargeLeft):
100         (bmalloc::BoundaryTag::mergeLargeRight):
101         (bmalloc::BoundaryTag::mergeLarge):
102         (bmalloc::BoundaryTag::deallocate):
103         (bmalloc::BoundaryTag::splitLarge):
104         (bmalloc::BoundaryTag::allocate):
105         * bmalloc/Cache.cpp: Added.
106         (bmalloc::Cache::operator new):
107         (bmalloc::Cache::operator delete):
108         (bmalloc::Cache::Cache):
109         (bmalloc::Cache::allocateSlowCase):
110         (bmalloc::Cache::allocateSlowCaseNullCache):
111         (bmalloc::Cache::deallocateSlowCase):
112         (bmalloc::Cache::deallocateSlowCaseNullCache):
113         * bmalloc/Cache.h: Added.
114         (bmalloc::Cache::allocator):
115         (bmalloc::Cache::deallocator):
116         (bmalloc::Cache::allocateFastCase):
117         (bmalloc::Cache::deallocateFastCase):
118         (bmalloc::Cache::allocate):
119         (bmalloc::Cache::deallocate):
120         * bmalloc/Chunk.h: Added.
121         (bmalloc::Chunk::begin):
122         (bmalloc::Chunk::end):
123         (bmalloc::Chunk::lines):
124         (bmalloc::Chunk::pages):
125         * bmalloc/Deallocator.cpp: Added.
126         (bmalloc::Deallocator::Deallocator):
127         (bmalloc::Deallocator::~Deallocator):
128         (bmalloc::Deallocator::deallocateLarge):
129         (bmalloc::Deallocator::deallocateXLarge):
130         (bmalloc::Deallocator::processObjectLog):
131         (bmalloc::Deallocator::deallocateSlowCase):
132         (bmalloc::Deallocator::deallocateSmallLine):
133         (bmalloc::Deallocator::allocateSmallLine):
134         (bmalloc::Deallocator::deallocateMediumLine):
135         (bmalloc::Deallocator::allocateMediumLine):
136         * bmalloc/Deallocator.h: Added.
137         (bmalloc::Deallocator::deallocateFastCase):
138         (bmalloc::Deallocator::deallocate):
139         * bmalloc/EndTag.h: Added.
140         (bmalloc::EndTag::operator=):
141         * bmalloc/FixedVector.h: Added.
142         (bmalloc::FixedVector::begin):
143         (bmalloc::FixedVector::end):
144         (bmalloc::FixedVector::size):
145         (bmalloc::FixedVector::capacity):
146         (bmalloc::FixedVector::clear):
147         (bmalloc::FixedVector::isEmpty):
148         (bmalloc::Capacity>::FixedVector):
149         (bmalloc::Capacity>::operator):
150         (bmalloc::Capacity>::push):
151         (bmalloc::Capacity>::pop):
152         (bmalloc::Capacity>::shrink):
153         * bmalloc/Heap.cpp: Added.
154         (bmalloc::sleep):
155         (bmalloc::Heap::Heap):
156         (bmalloc::Heap::concurrentScavenge):
157         (bmalloc::Heap::scavengeSmallPages):
158         (bmalloc::Heap::scavengeMediumPages):
159         (bmalloc::Heap::scavengeLargeRanges):
160         (bmalloc::Heap::allocateSmallLineSlowCase):
161         (bmalloc::Heap::allocateMediumLineSlowCase):
162         (bmalloc::Heap::allocateXLarge):
163         (bmalloc::Heap::deallocateXLarge):
164         (bmalloc::Heap::allocateLarge):
165         (bmalloc::Heap::deallocateLarge):
166         * bmalloc/Heap.h: Added.
167         (bmalloc::Heap::deallocateSmallLine):
168         (bmalloc::Heap::allocateSmallLine):
169         (bmalloc::Heap::deallocateMediumLine):
170         (bmalloc::Heap::allocateMediumLine):
171         * bmalloc/Inline.h: Added.
172         * bmalloc/LargeChunk.h: Added.
173         (bmalloc::LargeChunk::begin):
174         (bmalloc::LargeChunk::end):
175         (bmalloc::LargeChunk::create):
176         (bmalloc::LargeChunk::get):
177         (bmalloc::LargeChunk::beginTag):
178         (bmalloc::LargeChunk::endTag):
179         * bmalloc/Line.h: Added.
180         (bmalloc::Line<Traits>::begin):
181         (bmalloc::Line<Traits>::end):
182         (bmalloc::Line<Traits>::concurrentRef):
183         (bmalloc::Line<Traits>::deref):
184         * bmalloc/MediumAllocator.h: Added.
185         (bmalloc::MediumAllocator::isNull):
186         (bmalloc::MediumAllocator::MediumAllocator):
187         (bmalloc::MediumAllocator::line):
188         (bmalloc::MediumAllocator::allocate):
189         (bmalloc::MediumAllocator::derefCount):
190         (bmalloc::MediumAllocator::refill):
191         * bmalloc/MediumChunk.h: Added.
192         * bmalloc/MediumLine.h: Added.
193         * bmalloc/MediumPage.h: Added.
194         * bmalloc/MediumTraits.h: Added.
195         * bmalloc/Mutex.cpp: Added.
196         (bmalloc::Mutex::lockSlowCase):
197         * bmalloc/Mutex.h: Added.
198         (bmalloc::Mutex::Mutex):
199         (bmalloc::Mutex::try_lock):
200         (bmalloc::Mutex::lock):
201         (bmalloc::Mutex::unlock):
202         * bmalloc/ObjectType.cpp: Added.
203         (bmalloc::objectType):
204         * bmalloc/ObjectType.h: Added.
205         (bmalloc::isSmallOrMedium):
206         (bmalloc::isSmall):
207         * bmalloc/Page.h: Added.
208         (bmalloc::Page<Traits>::ref):
209         (bmalloc::Page<Traits>::deref):
210         (bmalloc::Page<Traits>::refCount):
211         * bmalloc/PerProcess.h: Added.
212         (bmalloc::PerProcess::mutex):
213         (bmalloc::PerProcess<T>::getFastCase):
214         (bmalloc::PerProcess<T>::get):
215         (bmalloc::PerProcess<T>::getSlowCase):
216         * bmalloc/PerThread.h: Added.
217         (bmalloc::PerThreadStorage<Cache>::get):
218         (bmalloc::PerThreadStorage<Cache>::init):
219         (bmalloc::PerThreadStorage::get):
220         (bmalloc::PerThreadStorage::init):
221         (bmalloc::PerThread<T>::getFastCase):
222         (bmalloc::PerThread<T>::get):
223         (bmalloc::PerThread<T>::destructor):
224         (bmalloc::PerThread<T>::getSlowCase):
225         * bmalloc/Range.h: Added.
226         (bmalloc::Range::Range):
227         (bmalloc::Range::begin):
228         (bmalloc::Range::end):
229         (bmalloc::Range::size):
230         (bmalloc::Range::operator!):
231         (bmalloc::Range::operator<):
232         * bmalloc/SegregatedFreeList.cpp: Added.
233         (bmalloc::SegregatedFreeList::SegregatedFreeList):
234         (bmalloc::SegregatedFreeList::insert):
235         (bmalloc::SegregatedFreeList::takeGreedy):
236         (bmalloc::SegregatedFreeList::take):
237         * bmalloc/SegregatedFreeList.h: Added.
238         * bmalloc/Sizes.h: Added.
239         * bmalloc/SmallAllocator.h: Added.
240         (bmalloc::SmallAllocator::isNull):
241         (bmalloc::SmallAllocator::canAllocate):
242         (bmalloc::SmallAllocator::SmallAllocator):
243         (bmalloc::SmallAllocator::line):
244         (bmalloc::SmallAllocator::allocate):
245         (bmalloc::SmallAllocator::objectCount):
246         (bmalloc::SmallAllocator::derefCount):
247         (bmalloc::SmallAllocator::refill):
248         * bmalloc/SmallChunk.h: Added.
249         * bmalloc/SmallLine.h: Added.
250         * bmalloc/SmallPage.h: Added.
251         * bmalloc/SmallTraits.h: Added.
252         * bmalloc/Syscall.h: Added.
253         * bmalloc/VMAllocate.h: Added.
254         (bmalloc::vmSize):
255         (bmalloc::vmValidate):
256         (bmalloc::vmAllocate):
257         (bmalloc::vmDeallocate):
258         (bmalloc::vmDeallocatePhysicalPages):
259         (bmalloc::vmAllocatePhysicalPages):
260         (bmalloc::vmDeallocatePhysicalPagesSloppy):
261         (bmalloc::vmAllocatePhysicalPagesSloppy):
262         * bmalloc/VMHeap.cpp: Added.
263         (bmalloc::VMHeap::VMHeap):
264         (bmalloc::VMHeap::allocateSmallChunk):
265         (bmalloc::VMHeap::allocateMediumChunk):
266         (bmalloc::VMHeap::allocateLargeChunk):
267         * bmalloc/VMHeap.h: Added.
268         (bmalloc::VMHeap::allocateSmallPage):
269         (bmalloc::VMHeap::allocateMediumPage):
270         (bmalloc::VMHeap::allocateLargeRange):
271         (bmalloc::VMHeap::deallocateSmallPage):
272         (bmalloc::VMHeap::deallocateMediumPage):
273         (bmalloc::VMHeap::deallocateLargeRange):
274         * bmalloc/Vector.h: Added.
275         (bmalloc::Vector::begin):
276         (bmalloc::Vector::end):
277         (bmalloc::Vector::size):
278         (bmalloc::Vector::capacity):
279         (bmalloc::Vector::last):
280         (bmalloc::Vector::pop):
281         (bmalloc::Vector<T>::Vector):
282         (bmalloc::Vector<T>::~Vector):
283         (bmalloc::Vector<T>::operator):
284         (bmalloc::Vector<T>::push):
285         (bmalloc::Vector<T>::pop):
286         (bmalloc::Vector<T>::shrink):
287         (bmalloc::Vector<T>::reallocateBuffer):
288         (bmalloc::Vector<T>::shrinkCapacity):
289         (bmalloc::Vector<T>::growCapacity):
290         * bmalloc/XLargeChunk.h: Added.
291         (bmalloc::XLargeChunk::get):
292         (bmalloc::XLargeChunk::begin):
293         (bmalloc::XLargeChunk::XLargeChunk):
294         (bmalloc::XLargeChunk::create):
295         (bmalloc::XLargeChunk::destroy):
296         (bmalloc::XLargeChunk::range):
297         (bmalloc::XLargeChunk::size):
298         * bmalloc/bmalloc.h: Added.
299         (bmalloc::api::malloc):
300         (bmalloc::api::free):
301         (bmalloc::api::realloc):
302         * bmalloc/mbmalloc.cpp: Added.
303