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

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

Issue 1364183002: Shrink allocatedObjectSizeThreshold for page navigation GC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 #endif 654 #endif
655 } 655 }
656 656
657 bool ThreadState::shouldScheduleV8FollowupGC() 657 bool ThreadState::shouldScheduleV8FollowupGC()
658 { 658 {
659 return judgeGCThreshold(32 * 1024 * 1024, 1.5); 659 return judgeGCThreshold(32 * 1024 * 1024, 1.5);
660 } 660 }
661 661
662 bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio) 662 bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio)
663 { 663 {
664 return judgeGCThreshold(1024 * 1024, 1.5 * (1 - estimatedRemovalRatio)); 664 return judgeGCThreshold(512 * 1024, 1.5 * (1 - estimatedRemovalRatio));
665 } 665 }
666 666
667 bool ThreadState::shouldForceConservativeGC() 667 bool ThreadState::shouldForceConservativeGC()
668 { 668 {
669 // TODO(haraken): 400% is too large. Lower the heap growing factor. 669 // TODO(haraken): 400% is too large. Lower the heap growing factor.
670 return judgeGCThreshold(32 * 1024 * 1024, 5.0); 670 return judgeGCThreshold(32 * 1024 * 1024, 5.0);
671 } 671 }
672 672
673 void ThreadState::scheduleV8FollowupGCIfNeeded(V8GCType gcType) 673 void ThreadState::scheduleV8FollowupGCIfNeeded(V8GCType gcType)
674 { 674 {
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 json->beginArray(it->key.ascii().data()); 1609 json->beginArray(it->key.ascii().data());
1610 for (size_t age = 0; age <= maxHeapObjectAge; ++age) 1610 for (size_t age = 0; age <= maxHeapObjectAge; ++age)
1611 json->pushInteger(it->value.ages[age]); 1611 json->pushInteger(it->value.ages[age]);
1612 json->endArray(); 1612 json->endArray();
1613 } 1613 }
1614 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); 1614 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release());
1615 } 1615 }
1616 #endif 1616 #endif
1617 1617
1618 } // namespace blink 1618 } // 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