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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 // This is slow and should only be used for debug purposes. | 939 // This is slow and should only be used for debug purposes. |
940 // It involves finding the heap page and scanning the heap page for an objec
t header. | 940 // It involves finding the heap page and scanning the heap page for an objec
t header. |
941 static const GCInfo* findGCInfo(Address); | 941 static const GCInfo* findGCInfo(Address); |
942 #endif | 942 #endif |
943 | 943 |
944 // Collect heap stats for all threads attached to the Blink | 944 // Collect heap stats for all threads attached to the Blink |
945 // garbage collector. Should only be called during garbage | 945 // garbage collector. Should only be called during garbage |
946 // collection where threads are known to be at safe points. | 946 // collection where threads are known to be at safe points. |
947 static void getStats(HeapStats*); | 947 static void getStats(HeapStats*); |
948 | 948 |
| 949 static uint64_t totalObjectSpaceInAllThreads(); |
| 950 |
949 static bool isConsistentForGC(); | 951 static bool isConsistentForGC(); |
950 static void makeConsistentForGC(); | 952 static void makeConsistentForGC(); |
951 | 953 |
952 static void flushHeapDoesNotContainCache(); | 954 static void flushHeapDoesNotContainCache(); |
953 static bool heapDoesNotContainCacheIsEmpty() { return s_heapDoesNotContainCa
che->isEmpty(); } | 955 static bool heapDoesNotContainCacheIsEmpty() { return s_heapDoesNotContainCa
che->isEmpty(); } |
954 | 956 |
955 // Return true if the last GC found a pointer into a heap page | 957 // Return true if the last GC found a pointer into a heap page |
956 // during conservative scanning. | 958 // during conservative scanning. |
957 static bool lastGCWasConservative() { return s_lastGCWasConservative; } | 959 static bool lastGCWasConservative() { return s_lastGCWasConservative; } |
958 | 960 |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 // to export. This forces it to export all the methods from ThreadHeap. | 2311 // to export. This forces it to export all the methods from ThreadHeap. |
2310 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 2312 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
2311 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 2313 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
2312 extern template class PLATFORM_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 2314 extern template class PLATFORM_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
2313 extern template class PLATFORM_EXPORT ThreadHeap<HeapObjectHeader>; | 2315 extern template class PLATFORM_EXPORT ThreadHeap<HeapObjectHeader>; |
2314 #endif | 2316 #endif |
2315 | 2317 |
2316 } | 2318 } |
2317 | 2319 |
2318 #endif // Heap_h | 2320 #endif // Heap_h |
OLD | NEW |