1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00
Commit graph

387 commits

Author SHA1 Message Date
Andy Wingo
5084730471 Add parallel root-tracing phase 2024-07-11 15:54:11 +02:00
Andy Wingo
ff1e1b1d44 whippet: avoid an atomic load when visiting already-marked objects 2024-07-10 11:50:08 +02:00
Andy Wingo
d50455ed1b Add new gc_atomic_forward_object_size API
Also remove an unused function in whippet.c
2024-07-10 11:50:05 +02:00
Andy Wingo
247f9432a4 Tighten up typing of trace workers and trace worker data 2024-07-08 18:44:24 +02:00
Andy Wingo
5ff78f01c8 Add gc_trace_worker_call_with_data
Goal is to pass thread-local evacuation buffers.
2024-07-08 18:10:18 +02:00
Andy Wingo
ac5d546481 Remove heap_tracer; get to heap from tracer directly 2024-07-08 17:35:58 +02:00
Andy Wingo
ba9459ce56 Rework tracer API to pass tracer to all functions 2024-07-08 17:29:24 +02:00
Andy Wingo
921c012b51 Add gc_ prefix to tracer API 2024-07-08 17:15:00 +02:00
Andy Wingo
b4543ad641 Factor out tracer interface to own file 2024-07-08 14:38:15 +02:00
Andy Wingo
82afee8693 Break simple serial worklist out to its own file 2024-07-08 11:49:47 +02:00
Andy Wingo
4c6f1b6cef Break local worklist out to its own file 2024-07-08 10:49:46 +02:00
Andy Wingo
dd3953ef1a Factor trace deque out to shared-worklist.h
Also increase alignment to account for cache line prefetcher.
2024-07-08 10:42:58 +02:00
Andy Wingo
b4bf949df6 Add Guix manifest.scm 2024-07-03 10:38:55 +02:00
Andy Wingo
5ba0aec869 Remove unused function 2023-12-10 22:08:05 +01:00
Andy Wingo
1267f77de3 Basic stats records latency readings in a histogram, prints p95 2023-12-10 21:24:03 +01:00
Andy Wingo
4b51376447 Add mechanism to compose event listeners 2023-12-06 21:48:39 +01:00
Andy Wingo
3ce75b2bad Fix bug in which we could forget to mark stopping mutators
Separately track total mutator count, paused mutators, and inactive
mutators.  Paused mutators need to mark their roots before stopping.  We
had a bug whereby a paused mutator would not wake up before the next
collection, which resulted in that mutator's roots not being marked.
Fix by resetting paused mutator count to 0 after collection, requiring
those mutators to sync up again.
2023-11-10 15:09:10 +01:00
Andy Wingo
adaffab3da Fix a case where we might miss some sweeping
Unlike next_hole, next_hole_in_block doesn't finish_hole, so it doesn't
clear metadata bits.  Fix to always finish_hole when
finish_sweeping_in_block.
2023-11-10 15:07:45 +01:00
Andy Wingo
40be1a03cb Add debug-mode heap verification to Whippet 2023-11-10 15:07:31 +01:00
Andy Wingo
361d880277 optdebug build uses -O2 instead of -Og 2023-11-06 22:12:34 +01:00
Andy Wingo
5ad83e49e1 Fix the debug fix 2023-11-06 22:06:51 +01:00
Andy Wingo
c4396a4214 Remove a release-mode debugging printout in whippet 2023-11-05 10:27:09 +01:00
Andy Wingo
3a1a5e0368 Fix linking against static libgc.a
Thanks to Thorsten Ball.  Fixes #1, #2.
2023-10-25 11:33:24 +02:00
Andy Wingo
3d2a12c684 Rework parallel tracing state machine
Instead of sending a message to each worker, we pthread_cond_broadcast
at the start.  Instead of having N worker threads, we have N-1 threads
and the main thread also does work.  Instead of termination being
detected by the worker threads, let the main thread detect it.  Avoid
parallelism if the mark stack is small enough, which can be the case for
ephemeron chains.  Let aux threads exit when they have no work instead
of spinning: sharing will start them up again.
2023-10-23 11:26:33 +02:00
Andy Wingo
9cc12916a9 parallel marker: speed up sharing from local to published queue 2023-10-23 11:17:28 +02:00
Andy Wingo
2cab526963 Fix gc_basic_stats_finish 2023-10-20 14:14:29 +02:00
Andy Wingo
9176aa650f Fix BDW ephemeron implementation
* src/gc-ephemeron.c: Use key null-ness as dead ephemeron indicator;
works better with BDW-GC's disappearing link.
* src/bdw.c (gc_heap_ephemeron_trace_epoch): Fix to actually define the
epoch.  Whoops!
2023-10-20 11:44:38 +02:00
Andy Wingo
cfc8c8a9b8 Allow embedder to request a major GC 2023-10-18 16:34:20 +02:00
Andy Wingo
0c7bdacc51 Revert "Allow embedder to request a major GC"
This reverts commit f39e6ee69f0aa2e14227a019a5332ba129418977.
2023-10-18 15:13:41 +02:00
Andy Wingo
514dcc702e Allow embedder to request a major GC 2023-10-18 15:13:41 +02:00
Andy Wingo
8aa2036331 Fix optdebug warnings 2023-10-18 15:13:41 +02:00
Andy Wingo
9ce8ee2921 Fix unused API, outdated assertion 2023-10-17 21:45:06 +02:00
Andy Wingo
a6e34c3594 Don't abort semi if parallelism > 1
Re-interpret parallelism option as a maximum.
2023-10-16 21:36:27 +02:00
Andy Wingo
44a4e1c131 Add manual links 2023-10-16 12:45:13 +02:00
Andy Wingo
4d3e8c30d7 Update manual 2023-10-16 12:43:09 +02:00
Andy Wingo
5130380ae5 Rework stats collection to use listener interface 2023-10-16 12:13:08 +02:00
Andy Wingo
c7499740c9 Fix GCC detection
Doh
2023-10-07 23:10:33 +02:00
Andy Wingo
3c63de9b9d bdw: Turn off all_interior_pointers
Quoth gc_inline.h, which makes freelists:

/* Note that for these routines, it is the clients responsibility to    */
/* add the extra byte at the end to deal with one-past-the-end pointers.*/
/* In the standard collector configuration, the collector assumes that  */
/* such a byte has been added, and hence does not trace the last word   */
/* in the resulting object.                                             */
/* This is not an issue if the collector is compiled with               */
/* DONT_ADD_BYTE_AT_END, or if GC_all_interior_pointers is not set.     */
2023-10-07 23:09:10 +02:00
Andy Wingo
9936d98f70 Rework heap marking 2023-10-02 22:48:59 +02:00
Andy Wingo
d56356fec7 Add gc_safepoint_mechanism gc attr 2023-10-02 22:47:35 +02:00
Andy Wingo
41591d8722 bdw: Ensure heap and mutators are live
Before, we were relying on the heap and mutators being reachable from
roots.  This is no longer the case.
2023-09-30 21:58:46 +02:00
Andy Wingo
4d1358219b Fix amazing error in bdw.c 2023-09-22 15:19:55 +02:00
Andy Wingo
120cd91b02 Use -flto=auto to do LTO in parallel 2023-09-22 14:44:21 +02:00
Andy Wingo
296e5e8458 BDW collector marks mutator/heap roots
Needed if a mutator has off-heap (mmap) storage.
2023-09-21 10:08:23 +02:00
Andy Wingo
dc013cfb58 Change gc_allocate_ephemeron to return struct gc_ephemeron 2023-09-11 11:48:32 +02:00
Andy Wingo
db36c48efd Update extern space API to allow for evacuation 2023-08-16 11:08:12 +02:00
Andy Wingo
fbe49598f5 Add "extern space"
This is mostly for static data.
2023-08-15 11:38:11 +02:00
Andy Wingo
da5a4633df embed.mk: silent by default, bis 2023-08-12 10:26:12 +02:00
Andy Wingo
3f92f36947 embed.mk: silent by default 2023-08-12 10:23:29 +02:00
Andy Wingo
a3019c961a embed.mk fix 2023-08-11 23:17:59 +02:00