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