OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |