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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 static void dumpPathToObjectOnNextGC(void* p); | 956 static void dumpPathToObjectOnNextGC(void* p); |
957 | 957 |
958 // Forcibly find GCInfo of the object at Address. | 958 // Forcibly find GCInfo of the object at Address. |
959 // This is slow and should only be used for debug purposes. | 959 // This is slow and should only be used for debug purposes. |
960 // It involves finding the heap page and scanning the heap page for an objec
t header. | 960 // It involves finding the heap page and scanning the heap page for an objec
t header. |
961 static const GCInfo* findGCInfo(Address); | 961 static const GCInfo* findGCInfo(Address); |
962 | 962 |
963 static String createBacktraceString(); | 963 static String createBacktraceString(); |
964 #endif | 964 #endif |
965 | 965 |
966 // Collect heap stats for all threads attached to the Blink | |
967 // garbage collector. Should only be called during garbage | |
968 // collection where threads are known to be at safe points. | |
969 static void getStats(HeapStats*); | |
970 | |
971 static void getStatsForTesting(HeapStats*); | 966 static void getStatsForTesting(HeapStats*); |
972 | 967 |
973 static void getHeapSpaceSize(uint64_t*, uint64_t*); | 968 static void getHeapSpaceSize(uint64_t*, uint64_t*); |
974 | 969 |
975 static void makeConsistentForSweeping(); | 970 static void makeConsistentForSweeping(); |
976 | 971 |
977 #if ENABLE(ASSERT) | 972 #if ENABLE(ASSERT) |
978 static bool isConsistentForSweeping(); | 973 static bool isConsistentForSweeping(); |
979 #endif | 974 #endif |
980 | 975 |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 }; | 2413 }; |
2419 | 2414 |
2420 template<typename T> | 2415 template<typename T> |
2421 struct IfWeakMember<WeakMember<T> > { | 2416 struct IfWeakMember<WeakMember<T> > { |
2422 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } | 2417 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit
or->isAlive(t.get()); } |
2423 }; | 2418 }; |
2424 | 2419 |
2425 } // namespace blink | 2420 } // namespace blink |
2426 | 2421 |
2427 #endif // Heap_h | 2422 #endif // Heap_h |
OLD | NEW |