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

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

Issue 1750993002: Revert of Disable page navigation GC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return judgeGCThreshold(1024 * 1024, 1.5); 557 return judgeGCThreshold(1024 * 1024, 1.5);
558 } 558 }
559 559
560 bool ThreadState::shouldScheduleV8FollowupGC() 560 bool ThreadState::shouldScheduleV8FollowupGC()
561 { 561 {
562 return judgeGCThreshold(32 * 1024 * 1024, 1.5); 562 return judgeGCThreshold(32 * 1024 * 1024, 1.5);
563 } 563 }
564 564
565 bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio) 565 bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio)
566 { 566 {
567 // TODO(keishi): Temporarily disabled to observe impact. crbug.com/588029 567 return judgeGCThreshold(1024 * 1024, 1.5 * (1 - estimatedRemovalRatio));
568 return false;
569 } 568 }
570 569
571 bool ThreadState::shouldForceConservativeGC() 570 bool ThreadState::shouldForceConservativeGC()
572 { 571 {
573 // TODO(haraken): 400% is too large. Lower the heap growing factor. 572 // TODO(haraken): 400% is too large. Lower the heap growing factor.
574 return judgeGCThreshold(32 * 1024 * 1024, 5.0); 573 return judgeGCThreshold(32 * 1024 * 1024, 5.0);
575 } 574 }
576 575
577 // If we're consuming too much memory, trigger a conservative GC 576 // If we're consuming too much memory, trigger a conservative GC
578 // aggressively. This is a safe guard to avoid OOM. 577 // aggressively. This is a safe guard to avoid OOM.
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 threadDump->addScalar("dead_count", "objects", totalDeadCount); 1499 threadDump->addScalar("dead_count", "objects", totalDeadCount);
1501 threadDump->addScalar("live_size", "bytes", totalLiveSize); 1500 threadDump->addScalar("live_size", "bytes", totalLiveSize);
1502 threadDump->addScalar("dead_size", "bytes", totalDeadSize); 1501 threadDump->addScalar("dead_size", "bytes", totalDeadSize);
1503 1502
1504 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c reateMemoryAllocatorDumpForCurrentGC(heapsDumpName); 1503 WebMemoryAllocatorDump* heapsDump = BlinkGCMemoryDumpProvider::instance()->c reateMemoryAllocatorDumpForCurrentGC(heapsDumpName);
1505 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()- >createMemoryAllocatorDumpForCurrentGC(classesDumpName); 1504 WebMemoryAllocatorDump* classesDump = BlinkGCMemoryDumpProvider::instance()- >createMemoryAllocatorDumpForCurrentGC(classesDumpName);
1506 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners hipEdge(classesDump->guid(), heapsDump->guid()); 1505 BlinkGCMemoryDumpProvider::instance()->currentProcessMemoryDump()->addOwners hipEdge(classesDump->guid(), heapsDump->guid());
1507 } 1506 }
1508 1507
1509 } // namespace blink 1508 } // 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