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

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

Issue 1438733002: Do not attempt an Oilpan memory pressure GC if nested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 #if PRINT_HEAP_STATS 703 #if PRINT_HEAP_STATS
704 dataLogF("ThreadState::scheduleGCIfNeeded\n"); 704 dataLogF("ThreadState::scheduleGCIfNeeded\n");
705 #endif 705 #endif
706 706
707 // Allocation is allowed during sweeping, but those allocations should not 707 // Allocation is allowed during sweeping, but those allocations should not
708 // trigger nested GCs. 708 // trigger nested GCs.
709 if (isGCForbidden()) 709 if (isGCForbidden())
710 return; 710 return;
711 711
712 if (isSweepingInProgress())
713 return;
714 ASSERT(!sweepForbidden());
715
712 if (shouldForceMemoryPressureGC()) { 716 if (shouldForceMemoryPressureGC()) {
713 completeSweep(); 717 completeSweep();
714 if (shouldForceMemoryPressureGC()) { 718 if (shouldForceMemoryPressureGC()) {
715 #if PRINT_HEAP_STATS 719 #if PRINT_HEAP_STATS
716 dataLogF("Scheduled MemoryPressureGC\n"); 720 dataLogF("Scheduled MemoryPressureGC\n");
717 #endif 721 #endif
718 Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithou tSweep, BlinkGC::MemoryPressureGC); 722 Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithou tSweep, BlinkGC::MemoryPressureGC);
719 return; 723 return;
720 } 724 }
721 } 725 }
722 726
723 if (isSweepingInProgress())
724 return;
725 ASSERT(!sweepForbidden());
726
727 if (shouldForceConservativeGC()) { 727 if (shouldForceConservativeGC()) {
728 completeSweep(); 728 completeSweep();
729 if (shouldForceConservativeGC()) { 729 if (shouldForceConservativeGC()) {
730 #if PRINT_HEAP_STATS 730 #if PRINT_HEAP_STATS
731 dataLogF("Scheduled ConservativeGC\n"); 731 dataLogF("Scheduled ConservativeGC\n");
732 #endif 732 #endif
733 Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithou tSweep, BlinkGC::ConservativeGC); 733 Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithou tSweep, BlinkGC::ConservativeGC);
734 return; 734 return;
735 } 735 }
736 } 736 }
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 threadDump->addScalar("dead_count", "objects", totalDeadCount); 1483 threadDump->addScalar("dead_count", "objects", totalDeadCount);
1484 threadDump->addScalar("live_size", "bytes", totalLiveSize); 1484 threadDump->addScalar("live_size", "bytes", totalLiveSize);
1485 threadDump->addScalar("dead_size", "bytes", totalDeadSize); 1485 threadDump->addScalar("dead_size", "bytes", totalDeadSize);
1486 1486
1487 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); 1487 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c reateMemoryAllocatorDumpForCurrentGC(heapsDumpName);
1488 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()- >createMemoryAllocatorDumpForCurrentGC(classesDumpName); 1488 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()- >createMemoryAllocatorDumpForCurrentGC(classesDumpName);
1489 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners hipEdge(classesDump->guid(), heapsDump->guid()); 1489 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners hipEdge(classesDump->guid(), heapsDump->guid());
1490 } 1490 }
1491 1491
1492 } // namespace blink 1492 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698