Commit graph

327 commits

Author SHA1 Message Date
Justin Ethier
758bb25ba9 Tweaking GC parameters, but not done yet 2016-03-02 23:02:17 -05:00
Justin Ethier
6376a0eb2c Qualify logging as verbose 2016-03-02 21:25:05 -05:00
Justin Ethier
c9a69ae208 Added debug flag to get GC thread PID 2016-03-02 21:21:05 -05:00
Justin Ethier
127acb143e Add GC safety check before clearing major GC vars 2016-03-02 19:35:14 -05:00
Justin Ethier
76b5cbce00 Refactor gc_mut_update and handle TRACE case 2016-02-29 23:02:30 -05:00
Justin Ethier
98a18a225a Handle old stack objects on write barrier
The gc_mut_update write barrier should not assume that the old object is on the heap, lets also gray the old object if it happens to be on the stack. Worst case, we mark an extra object here or there. Best case, may prevent gc_allocated_bytes receiving forward pointers.
2016-02-29 03:08:18 +00:00
Justin Ethier
a98990b2e0 Apply pending_writes after cooperating on behalf
Apply pending_writes back to last_write after the collector cooperates on behalf of a mutator.
2016-02-27 22:56:59 -05:00
Justin Ethier
86bdf0c5aa Refactoring 2016-02-27 22:44:03 -05:00
Justin Ethier
cef2abfb7e Refactoring 2016-02-24 21:06:24 -05:00
Justin Ethier
dc19539bff Tweak GC debugging 2016-02-24 22:30:40 -05:00
Justin Ethier
7c49e59ad6 Added safety check 2016-02-23 21:59:12 -05:00
Justin Ethier
22814ffc52 Handle block/runnable with a primitive as the cont 2016-02-23 23:25:53 -05:00
Justin Ethier
aedb380f04 Use standard type 2016-02-17 22:41:03 -05:00
Justin Ethier
168e7d123d Compiles on x86_64 2016-02-17 22:35:28 -05:00
Justin Ethier
e9fef4133a Fix 64-bit compiler issues 2016-02-17 21:50:47 -05:00
Justin Ethier
1f00e07c0a Fixes to cond_var 2016-02-16 02:46:23 -05:00
Justin Ethier
8fdd2c46ba Added condition variable type 2016-02-16 01:09:02 -05:00
Justin Ethier
730434bb14 Added header comment block. 2016-02-14 22:35:04 -05:00
Justin Ethier
b560fda1c2 Added function comment for gc_mark_gray2 2016-01-20 22:44:30 -05:00
Justin Ethier
3bbf64d440 Added comments 2016-01-20 23:48:04 -05:00
Justin Ethier
a0c758c0b1 Ensure thread data fields are initialized 2016-01-17 21:39:51 -05:00
Justin Ethier
87c266a44a Adding exception stack to thread data 2016-01-12 03:21:36 -05:00
Justin Ethier
4d2b59966c Bug fixes, comments 2016-01-05 19:14:31 -05:00
Justin Ethier
72eda149c5 Use minor GC code to move GC coop result to heap
This allows the code to move any object to the heap, instead of the previous hack. There may be more overhead calling the full minor GC code, however, most objects should already have been moved and by definition this would only happen after a function has blocked for a length of time. So, both should minimize the additional overhead.
2016-01-04 22:39:37 -05:00
Justin Ethier
a2ba71f965 Two changes:
- Remove debug code from gc module
- Handle receiving non-heap allocated objects during GC cooperation
2016-01-04 22:13:55 -05:00
Justin Ethier
e28951a8d5 Move the mutation table into thread data. 2016-01-04 22:54:23 -05:00
Justin Ethier
d89a81eca6 More cleanup 2016-01-03 22:30:30 -05:00
Justin Ethier
4d7cd020cc Cleanup 2016-01-03 22:17:47 -05:00
Justin Ethier
ac7fec70a0 Finalize mutex prior to sweeping 2016-01-03 21:59:09 -05:00
Justin Ethier
de33b567a3 Missed a couple things... 2016-01-02 22:49:57 -05:00
Justin Ethier
36752be311 Stubs for mutex functions 2016-01-02 21:56:36 -05:00
Justin Ethier
71af17d7e7 Use atomic operations from libck 2015-12-29 22:05:07 -05:00
Justin Ethier
deae1693d5 Updated header comments 2015-12-23 23:02:38 -05:00
Justin Ethier
eaac66ab37 WIP 2015-12-23 22:09:10 -05:00
Justin Ethier
1f21b4688a WIP 2015-12-24 02:20:18 -05:00
Justin Ethier
6ae7a88e53 Bugfix 2015-12-24 01:56:00 -05:00
Justin Ethier
43ff5c5454 Re-enable cooperation code 2015-12-24 01:32:40 -05:00
Justin Ethier
2e9c5addd5 WIP 2015-12-24 00:50:37 -05:00
Justin Ethier
c09dc43dde First crack at gc_mutator_thread_runnable 2015-12-23 22:34:11 -05:00
Justin Ethier
cc36d6459d Added collector_cooperated flag 2015-12-22 22:49:55 -05:00
Justin Ethier
8aefcbfd13 New mutator signatures 2015-12-22 22:39:51 -05:00
Justin Ethier
247b09fc88 Store cont before mutator is blocked 2015-12-22 22:19:04 -05:00
Justin Ethier
9fd4929bb0 Added notes 2015-12-23 02:25:52 -05:00
Justin Ethier
785923f955 Partial GC coop for blocked mutator 2015-12-22 23:07:35 -05:00
Justin Ethier
ec8821b9ef Use atomics to access thd->gc_status 2015-12-22 22:57:28 -05:00
Justin Ethier
6693b4533a Fixed bug with previous change
Do not change mutator status prior to checking it
2015-12-22 03:15:45 -05:00
Justin Ethier
66ef2e2646 Added thread state helpers, avoid races during coop 2015-12-22 03:09:11 -05:00
Justin Ethier
be13df2abb Perform deferred free of thread data
Mark a mutator's thread as old when a thread is terminated, and free it at a later time. This is done to prevent race conditions with the collector thread, which could be in the middle of working with a thread's data.
2015-12-21 22:57:36 -05:00
Justin Ethier
a5fefda485 WIP - thread cleanup 2015-12-20 22:48:22 -05:00
Justin Ethier
38c1ca7b31 Added thread_sleep 2015-12-18 23:53:24 -05:00