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

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 1252683003: Oilpan: Schedule a precise GC when a page navigates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WIP Created 5 years, 5 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 | Annotate | Revision Log
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 #endif 322 #endif
323 323
324 void didV8MajorGC(); 324 void didV8MajorGC();
325 325
326 void performIdleGC(double deadlineSeconds); 326 void performIdleGC(double deadlineSeconds);
327 void performIdleLazySweep(double deadlineSeconds); 327 void performIdleLazySweep(double deadlineSeconds);
328 328
329 void scheduleIdleGC(); 329 void scheduleIdleGC();
330 void scheduleIdleLazySweep(); 330 void scheduleIdleLazySweep();
331 void schedulePreciseGC(); 331 void schedulePreciseGC();
332 bool shouldSchedulePreciseGC();
haraken 2015/07/23 23:19:30 Remove this.
333 // estimatedRemovalRatio is the estimated ratio of objects that will be no
334 // longer necessary due to the navigation.
335 bool shouldSchedulePreciseGCOnNavigation(float estimatedRemovalRatio);
332 void scheduleGCIfNeeded(); 336 void scheduleGCIfNeeded();
333 void setGCState(GCState); 337 void setGCState(GCState);
334 GCState gcState() const; 338 GCState gcState() const;
335 bool isInGC() const { return gcState() == GCRunning; } 339 bool isInGC() const { return gcState() == GCRunning; }
336 bool isSweepingInProgress() const 340 bool isSweepingInProgress() const
337 { 341 {
338 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul ed || gcState() == SweepingAndIdleGCScheduled; 342 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul ed || gcState() == SweepingAndIdleGCScheduled;
339 } 343 }
340 344
341 // A GC runs in the following sequence. 345 // A GC runs in the following sequence.
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 }; 804 };
801 805
802 template<> class ThreadStateFor<AnyThread> { 806 template<> class ThreadStateFor<AnyThread> {
803 public: 807 public:
804 static ThreadState* state() { return ThreadState::current(); } 808 static ThreadState* state() { return ThreadState::current(); }
805 }; 809 };
806 810
807 } // namespace blink 811 } // namespace blink
808 812
809 #endif // ThreadState_h 813 #endif // ThreadState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698