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

Side by Side Diff: third_party/WebKit/Source/platform/heap/Heap.h

Issue 1804863002: Refactor RegionTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed Created 4 years, 9 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 | third_party/WebKit/Source/platform/heap/Heap.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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 static void flushHeapDoesNotContainCache(); 253 static void flushHeapDoesNotContainCache();
254 254
255 static FreePagePool* getFreePagePool() { return s_freePagePool; } 255 static FreePagePool* getFreePagePool() { return s_freePagePool; }
256 static OrphanedPagePool* getOrphanedPagePool() { return s_orphanedPagePool; } 256 static OrphanedPagePool* getOrphanedPagePool() { return s_orphanedPagePool; }
257 257
258 // This look-up uses the region search tree and a negative contains cache to 258 // This look-up uses the region search tree and a negative contains cache to
259 // provide an efficient mapping from arbitrary addresses to the containing 259 // provide an efficient mapping from arbitrary addresses to the containing
260 // heap-page if one exists. 260 // heap-page if one exists.
261 static BasePage* lookup(Address); 261 static BasePage* lookup(Address);
262 static void addPageMemoryRegion(PageMemoryRegion*); 262 static RegionTree* getRegionTree();
263 static void removePageMemoryRegion(PageMemoryRegion*);
264 263
265 static const GCInfo* gcInfo(size_t gcInfoIndex) 264 static const GCInfo* gcInfo(size_t gcInfoIndex)
266 { 265 {
267 ASSERT(gcInfoIndex >= 1); 266 ASSERT(gcInfoIndex >= 1);
268 ASSERT(gcInfoIndex < GCInfoTable::maxIndex); 267 ASSERT(gcInfoIndex < GCInfoTable::maxIndex);
269 ASSERT(s_gcInfoTable); 268 ASSERT(s_gcInfoTable);
270 const GCInfo* info = s_gcInfoTable[gcInfoIndex]; 269 const GCInfo* info = s_gcInfoTable[gcInfoIndex];
271 ASSERT(info); 270 ASSERT(info);
272 return info; 271 return info;
273 } 272 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 309
311 static void decommitCallbackStacks(); 310 static void decommitCallbackStacks();
312 311
313 static CallbackStack* s_markingStack; 312 static CallbackStack* s_markingStack;
314 static CallbackStack* s_postMarkingCallbackStack; 313 static CallbackStack* s_postMarkingCallbackStack;
315 static CallbackStack* s_globalWeakCallbackStack; 314 static CallbackStack* s_globalWeakCallbackStack;
316 static CallbackStack* s_ephemeronStack; 315 static CallbackStack* s_ephemeronStack;
317 static HeapDoesNotContainCache* s_heapDoesNotContainCache; 316 static HeapDoesNotContainCache* s_heapDoesNotContainCache;
318 static FreePagePool* s_freePagePool; 317 static FreePagePool* s_freePagePool;
319 static OrphanedPagePool* s_orphanedPagePool; 318 static OrphanedPagePool* s_orphanedPagePool;
320 static RegionTree* s_regionTree;
321 static size_t s_allocatedSpace; 319 static size_t s_allocatedSpace;
322 static size_t s_allocatedObjectSize; 320 static size_t s_allocatedObjectSize;
323 static size_t s_objectSizeAtLastGC; 321 static size_t s_objectSizeAtLastGC;
324 static size_t s_markedObjectSize; 322 static size_t s_markedObjectSize;
325 static size_t s_markedObjectSizeAtLastCompleteSweep; 323 static size_t s_markedObjectSizeAtLastCompleteSweep;
326 static size_t s_wrapperCount; 324 static size_t s_wrapperCount;
327 static size_t s_wrapperCountAtLastGC; 325 static size_t s_wrapperCountAtLastGC;
328 static size_t s_collectedWrapperCount; 326 static size_t s_collectedWrapperCount;
329 static size_t s_partitionAllocSizeAtLastGC; 327 static size_t s_partitionAllocSizeAtLastGC;
330 static double s_estimatedMarkingTimePerByte; 328 static double s_estimatedMarkingTimePerByte;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) 530 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object)
533 { 531 {
534 T** cell = reinterpret_cast<T**>(object); 532 T** cell = reinterpret_cast<T**>(object);
535 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) 533 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell))
536 *cell = nullptr; 534 *cell = nullptr;
537 } 535 }
538 536
539 } // namespace blink 537 } // namespace blink
540 538
541 #endif // Heap_h 539 #endif // Heap_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698