Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 1686943002: Oilpan: Decommit backing storage of CallbackStacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698