Bug 103996

Summary: [Qt] Implement IncrementalSweeper and HeapTimer
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: JavaScriptCoreAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, hausmann, jturcotte, laszlo.gombos, levin+threading, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 103998, 110211    
Attachments:
Description Flags
Patch
none
Patch
hausmann: review+
Patch
none
Patch
none
Patch none

Description Allan Sandfeld Jensen 2012-12-04 07:11:10 PST
The IncrementalSweeper performs continous garbage collection as opposed to prompted or forced garbage collection.

It relies on HeapTimer which has only been implemented for Mac and Blackberry. 

Once HeapTimer has been implemented which should also be able to implemented opportunistic garbage collection.
Comment 1 Allan Sandfeld Jensen 2012-12-04 07:15:55 PST
Created attachment 177477 [details]
Patch
Comment 2 Allan Sandfeld Jensen 2012-12-04 07:17:22 PST
Note the thread-moving code has not been tested. I am unsure under which conditions it would happen.
Comment 3 Allan Sandfeld Jensen 2012-12-04 07:55:33 PST
Comment on attachment 177477 [details]
Patch

I found the first couple of multithreading issues. Not least of which that QBasicTimer depends on a QThread.
Comment 4 Allan Sandfeld Jensen 2012-12-04 08:42:32 PST
Created attachment 177495 [details]
Patch

Use postEvent instead of startTimer, and ensure we create the event-dispatcher on construction.
Comment 5 Simon Hausmann 2013-01-03 02:01:26 PST
See also comments in bug #95923 - it sucks that there's so much #ifdeffery for a little bit of platform specific timer code ;(

Is it perhaps time to have HeapTimerCF, HeapTimerQt and HeapTimerEFL.cpp?
Comment 6 Allan Sandfeld Jensen 2013-01-08 02:51:39 PST
Created attachment 181678 [details]
Patch

Split HeapTimer.cpp into platform specific source files. The Mac build is missing an update.
Comment 7 Build Bot 2013-01-08 02:58:13 PST
Comment on attachment 181678 [details]
Patch

Attachment 181678 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15742915
Comment 8 Build Bot 2013-01-08 03:28:19 PST
Comment on attachment 181678 [details]
Patch

Attachment 181678 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15756119
Comment 9 Allan Sandfeld Jensen 2013-01-08 04:18:21 PST
Created attachment 181683 [details]
Patch

Fix build for mac and win
Comment 10 Build Bot 2013-01-08 04:31:26 PST
Comment on attachment 181683 [details]
Patch

Attachment 181683 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15756136
Comment 11 Allan Sandfeld Jensen 2013-01-08 04:53:51 PST
Created attachment 181685 [details]
Patch

Another attempt at building on win
Comment 12 Allan Sandfeld Jensen 2013-01-29 02:08:25 PST
Comment on attachment 181685 [details]
Patch

Splitting the file seems opposed at the moment.
Comment 13 Allan Sandfeld Jensen 2013-01-29 02:53:19 PST
Committed r141089: <http://trac.webkit.org/changeset/141089>