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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 921493003: Revert of Oilpan: Remove duplicated code between HeapPage and LargeObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "wtf/Vector.h" 44 #include "wtf/Vector.h"
45 #include "wtf/text/StringHash.h" 45 #include "wtf/text/StringHash.h"
46 #include "wtf/text/WTFString.h" 46 #include "wtf/text/WTFString.h"
47 47
48 namespace v8 { 48 namespace v8 {
49 class Isolate; 49 class Isolate;
50 }; 50 };
51 51
52 namespace blink { 52 namespace blink {
53 53
54 class BaseHeap;
54 class BaseHeapPage; 55 class BaseHeapPage;
55 class CallbackStack; 56 class CallbackStack;
56 struct GCInfo; 57 struct GCInfo;
57 class HeapObjectHeader; 58 class HeapObjectHeader;
58 class PageMemoryRegion; 59 class PageMemoryRegion;
59 class PageMemory; 60 class PageMemory;
60 class PersistentNode; 61 class PersistentNode;
61 class SafePointBarrier; 62 class SafePointBarrier;
62 class SafePointAwareMutexLocker; 63 class SafePointAwareMutexLocker;
63 class ThreadHeap; 64 class ThreadHeap;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 H(CSSValue) 179 H(CSSValue)
179 180
180 #define TypedHeapEnumName(Type) Type##Heap, 181 #define TypedHeapEnumName(Type) Type##Heap,
181 182
182 enum TypedHeaps { 183 enum TypedHeaps {
183 GeneralHeap = 0, 184 GeneralHeap = 0,
184 VectorBackingHeap, 185 VectorBackingHeap,
185 InlineVectorBackingHeap, 186 InlineVectorBackingHeap,
186 HashTableBackingHeap, 187 HashTableBackingHeap,
187 FOR_EACH_TYPED_HEAP(TypedHeapEnumName) 188 FOR_EACH_TYPED_HEAP(TypedHeapEnumName)
188 LargeObjectHeap,
189 // Values used for iteration of heap segments. 189 // Values used for iteration of heap segments.
190 NumberOfHeaps, 190 NumberOfHeaps,
191 }; 191 };
192 192
193 #if ENABLE(GC_PROFILING) 193 #if ENABLE(GC_PROFILING)
194 const size_t numberOfGenerationsToTrack = 8; 194 const size_t numberOfGenerationsToTrack = 8;
195 const size_t maxHeapObjectAge = numberOfGenerationsToTrack - 1; 195 const size_t maxHeapObjectAge = numberOfGenerationsToTrack - 1;
196 196
197 struct AgeCounts { 197 struct AgeCounts {
198 int ages[numberOfGenerationsToTrack]; 198 int ages[numberOfGenerationsToTrack];
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 void recordStackEnd(intptr_t* endOfStack) 474 void recordStackEnd(intptr_t* endOfStack)
475 { 475 {
476 m_endOfStack = endOfStack; 476 m_endOfStack = endOfStack;
477 } 477 }
478 478
479 // Get one of the heap structures for this thread. 479 // Get one of the heap structures for this thread.
480 // 480 //
481 // The heap is split into multiple heap parts based on object 481 // The heap is split into multiple heap parts based on object
482 // types. To get the index for a given type, use 482 // types. To get the index for a given type, use
483 // HeapIndexTrait<Type>::index. 483 // HeapTypeTrait<Type>::index.
484 ThreadHeap* heap(int heapIndex) const { return m_heaps[heapIndex]; } 484 ThreadHeap* heap(int index) const { return m_heaps[index]; }
485 485
486 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) 486 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING)
487 // Infrastructure to determine if an address is within one of the 487 // Infrastructure to determine if an address is within one of the
488 // address ranges for the Blink heap. If the address is in the Blink 488 // address ranges for the Blink heap. If the address is in the Blink
489 // heap the containing heap page is returned. 489 // heap the containing heap page is returned.
490 BaseHeapPage* findPageFromAddress(Address); 490 BaseHeapPage* findPageFromAddress(Address);
491 BaseHeapPage* findPageFromAddress(void* pointer) { return findPageFromAddres s(reinterpret_cast<Address>(pointer)); } 491 BaseHeapPage* findPageFromAddress(void* pointer) { return findPageFromAddres s(reinterpret_cast<Address>(pointer)); }
492 #endif 492 #endif
493 493
494 // List of persistent roots allocated on the given thread. 494 // List of persistent roots allocated on the given thread.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 m_locked = false; 760 m_locked = false;
761 } 761 }
762 762
763 MutexBase& m_mutex; 763 MutexBase& m_mutex;
764 bool m_locked; 764 bool m_locked;
765 }; 765 };
766 766
767 } // namespace blink 767 } // namespace blink
768 768
769 #endif // ThreadState_h 769 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698