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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 m_arenas[i]->makeConsistentForMutator(); | 957 m_arenas[i]->makeConsistentForMutator(); |
958 } | 958 } |
959 | 959 |
960 void ThreadState::preGC() | 960 void ThreadState::preGC() |
961 { | 961 { |
962 ASSERT(!isInGC()); | 962 ASSERT(!isInGC()); |
963 setGCState(GCRunning); | 963 setGCState(GCRunning); |
964 makeConsistentForGC(); | 964 makeConsistentForGC(); |
965 flushHeapDoesNotContainCacheIfNeeded(); | 965 flushHeapDoesNotContainCacheIfNeeded(); |
966 clearArenaAges(); | 966 clearArenaAges(); |
| 967 m_threadLocalWeakCallbackStack->clear(); |
967 } | 968 } |
968 | 969 |
969 void ThreadState::postGC(BlinkGC::GCType gcType) | 970 void ThreadState::postGC(BlinkGC::GCType gcType) |
970 { | 971 { |
971 ASSERT(isInGC()); | 972 ASSERT(isInGC()); |
972 for (int i = 0; i < BlinkGC::NumberOfArenas; i++) | 973 for (int i = 0; i < BlinkGC::NumberOfArenas; i++) |
973 m_arenas[i]->prepareForSweep(); | 974 m_arenas[i]->prepareForSweep(); |
974 | 975 |
975 if (gcType == BlinkGC::GCWithSweep) { | 976 if (gcType == BlinkGC::GCWithSweep) { |
976 setGCState(EagerSweepScheduled); | 977 setGCState(EagerSweepScheduled); |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 threadDump->AddScalar("dead_count", "objects", totalDeadCount); | 1529 threadDump->AddScalar("dead_count", "objects", totalDeadCount); |
1529 threadDump->AddScalar("live_size", "bytes", totalLiveSize); | 1530 threadDump->AddScalar("live_size", "bytes", totalLiveSize); |
1530 threadDump->AddScalar("dead_size", "bytes", totalDeadSize); | 1531 threadDump->AddScalar("dead_size", "bytes", totalDeadSize); |
1531 | 1532 |
1532 base::trace_event::MemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvide
r::instance()->createMemoryAllocatorDumpForCurrentGC(heapsDumpName); | 1533 base::trace_event::MemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvide
r::instance()->createMemoryAllocatorDumpForCurrentGC(heapsDumpName); |
1533 base::trace_event::MemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvi
der::instance()->createMemoryAllocatorDumpForCurrentGC(classesDumpName); | 1534 base::trace_event::MemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvi
der::instance()->createMemoryAllocatorDumpForCurrentGC(classesDumpName); |
1534 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOwners
hipEdge(classesDump->guid(), heapsDump->guid()); | 1535 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->AddOwners
hipEdge(classesDump->guid(), heapsDump->guid()); |
1535 } | 1536 } |
1536 | 1537 |
1537 } // namespace blink | 1538 } // namespace blink |
OLD | NEW |