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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // resurrected or mutate a HashTable (because HashTable's weak processing | 478 // resurrected or mutate a HashTable (because HashTable's weak processing |
479 // assumes that the HashTable hasn't been mutated since the latest marking). | 479 // assumes that the HashTable hasn't been mutated since the latest marking). |
480 // Due to the complexity, we just forbid allocations. | 480 // Due to the complexity, we just forbid allocations. |
481 NoAllocationScope noAllocationScope(this); | 481 NoAllocationScope noAllocationScope(this); |
482 | 482 |
483 VisitorScope visitorScope(this, BlinkGC::ThreadLocalWeakProcessing); | 483 VisitorScope visitorScope(this, BlinkGC::ThreadLocalWeakProcessing); |
484 | 484 |
485 // Perform thread-specific weak processing. | 485 // Perform thread-specific weak processing. |
486 while (popAndInvokeThreadLocalWeakCallback(visitorScope.visitor())) { } | 486 while (popAndInvokeThreadLocalWeakCallback(visitorScope.visitor())) { } |
487 | 487 |
| 488 m_threadLocalWeakCallbackStack->decommit(); |
| 489 |
488 if (isMainThread()) { | 490 if (isMainThread()) { |
489 double timeForThreadLocalWeakProcessing = WTF::currentTimeMS() - startTi
me; | 491 double timeForThreadLocalWeakProcessing = WTF::currentTimeMS() - startTi
me; |
490 DEFINE_STATIC_LOCAL(CustomCountHistogram, timeForWeakHistogram, ("BlinkG
C.timeForThreadLocalWeakProcessing", 1, 10 * 1000, 50)); | 492 DEFINE_STATIC_LOCAL(CustomCountHistogram, timeForWeakHistogram, ("BlinkG
C.timeForThreadLocalWeakProcessing", 1, 10 * 1000, 50)); |
491 timeForWeakHistogram.count(timeForThreadLocalWeakProcessing); | 493 timeForWeakHistogram.count(timeForThreadLocalWeakProcessing); |
492 } | 494 } |
493 } | 495 } |
494 | 496 |
495 size_t ThreadState::totalMemorySize() | 497 size_t ThreadState::totalMemorySize() |
496 { | 498 { |
497 return Heap::allocatedObjectSize() + Heap::markedObjectSize() + WTF::Partiti
ons::totalSizeOfCommittedPages(); | 499 return Heap::allocatedObjectSize() + Heap::markedObjectSize() + WTF::Partiti
ons::totalSizeOfCommittedPages(); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 threadDump->addScalar("dead_count", "objects", totalDeadCount); | 1492 threadDump->addScalar("dead_count", "objects", totalDeadCount); |
1491 threadDump->addScalar("live_size", "bytes", totalLiveSize); | 1493 threadDump->addScalar("live_size", "bytes", totalLiveSize); |
1492 threadDump->addScalar("dead_size", "bytes", totalDeadSize); | 1494 threadDump->addScalar("dead_size", "bytes", totalDeadSize); |
1493 | 1495 |
1494 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c
reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); | 1496 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c
reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); |
1495 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()-
>createMemoryAllocatorDumpForCurrentGC(classesDumpName); | 1497 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()-
>createMemoryAllocatorDumpForCurrentGC(classesDumpName); |
1496 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners
hipEdge(classesDump->guid(), heapsDump->guid()); | 1498 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners
hipEdge(classesDump->guid(), heapsDump->guid()); |
1497 } | 1499 } |
1498 | 1500 |
1499 } // namespace blink | 1501 } // namespace blink |
OLD | NEW |