1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-10 03:10:25 +02:00
Commit graph

22010 commits

Author SHA1 Message Date
Andy Wingo
be90f7ba49 mark-sweep: Remove context, use mark space instead
This is the end of a series of refactors before adding thread-local
allocation.
2022-03-29 15:07:32 +02:00
Andy Wingo
9b0bc6e975 mark-sweep: Update markers to deal in heap and spaces
This will let us get rid of "struct context".
2022-03-29 15:06:28 +02:00
Andy Wingo
2401732e31 mark-sweep: mutator data structure separate from heap
This will allow thread-local allocation buffers.
2022-03-29 15:05:59 +02:00
Andy Wingo
61d38e4205 Refactor mark-sweep to send mutator to collect()
This will let the mutator hold a pointer to the heap.
2022-03-29 15:05:33 +02:00
Andy Wingo
edd46d8fe2 Start to adapt mark-sweep collector for separate heap/mutator
The current hack is that the mutator contains the heap.  We'll relax
later on.
2022-03-29 15:04:53 +02:00
Andy Wingo
5a92b43e94 Change serial marker to deal in struct gcobj* instead of uintptr
"struct gcobj*" is how we denote live objects, and the marker will only
see live objects.
2022-03-29 15:04:20 +02:00
Andy Wingo
81037fd6d2 Convert semi-space collector to new API 2022-03-28 22:18:25 +02:00
Andy Wingo
06a213d1ed Adapt GC API to have separate heap and mutator structs
Only BDW is adapted, so far.
2022-03-28 20:49:24 +02:00
Ludovic Courtès
4468427334 Update NEWS.
* NEWS: Mention srfi-14.i.c built from source.
2022-03-24 14:34:18 +01:00
Timothy Sample
9f8e05e513 Create 'srfi-14.i.c' during build.
* libguile/srfi-14.i.c: Delete file.
* libguile/UnicodeData.txt: New file.
* libguile/unidata_to_charset.awk: Skip comments.
* libguile/Makefile.am (EXTRA_DIST): Add 'UnicodeData.txt'.
(srfi-14.i.c): New rule.
(noinst_HEADERS): Remove 'srfi-14.i.c'.
(BUILT_INCLUDES, CLEANFILES): Add 'srfi-14.i.c'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-24 14:28:46 +01:00
Timothy Sample
63886aeda2 Reimplement 'unidata_to_charset.pl' in Awk.
* libguile/unidata_to_charset.pl: Delete file.
* libguile/unidata_to_charset.awk: New file.
* libguile/Makefile.am (EXTRA_DIST): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-24 14:28:46 +01:00
Andy Wingo
883a761775 Stub out support for multiple mutator threads on semi, mark-sweep
For semi probably we never implement support for multiple mutator
threads.  We will do local freelists for mark-sweep though.
2022-03-20 21:03:26 +01:00
Andy Wingo
a654a790b9 Add inline allocation for small objects for bdw-gc 2022-03-18 22:57:41 +01:00
Andy Wingo
d63288048c Add mt-gcbench 2022-03-18 16:19:42 +01:00
Andy Wingo
e703568857 Remove heap-stretching phase
We should separate evaluation of the heap stretching heuristics from the
evaluation of the GC itself, otherwise our analysis of the GC itself
will be too sensitive to the details of the final heap size.  Anyway
this doesn't affect results as we already specified the heap size
precisely.
2022-03-18 14:36:48 +01:00
Andy Wingo
4b7fb84ba0 gcbench takes heap multiplier on command line 2022-03-18 14:29:59 +01:00
Andy Wingo
887bdd5441 Clean up gcbench naming, to be consistent 2022-03-18 09:42:20 +01:00
Rob Browning
6e82a4516a Fix "non-revealed port is closed" ports.test
Don't close the test port's file descriptor because the port still has a
reference to it, and could still close it at any time when finally
garbage collected.  This did soemetimes break subsequent tests.

Bug: https://debbugs.gnu.org/43521
2022-03-16 22:23:37 -05:00
Andy Wingo
7dda5b992d Refactor pop_handle to not take the handle 2022-03-16 21:36:21 +01:00
Andy Wingo
32ddaa7624 Allocate GC context in GC-managed heap 2022-03-16 21:31:51 +01:00
Andy Wingo
f04b0bbd45 Simplify output of quads test 2022-03-16 14:28:49 +01:00
Andy Wingo
e7a3f83bcc Add quads benchmark
Also expand GC interface with "allocate_pointerless".  Limit lazy
sweeping to the allocation size that is causing the sweep, without
adding to fragmentation.
2022-03-16 14:16:22 +01:00
Andy Wingo
aac0faf4cf Refactor type definitions 2022-03-16 09:05:31 +01:00
Ludovic Courtès
f18f670223 tests: web-server: Wait until the server is listening.
Fixes synchronization issues observed on slow or loaded machines, where
client connection attempts would fail with ECONNREFUSED:

  https://issues.guix.gnu.org/54348

* test-suite/tests/web-server.test ("server is listening"): New test.
2022-03-15 14:38:40 +01:00
Andy Wingo
a1b4311cfc Update status 2022-03-13 21:55:58 +01:00
Andy Wingo
a693c4ea8a Bugfix to mark-sweep
Before this, the last sweep would cause premature gc
2022-03-13 21:45:20 +01:00
Andy Wingo
fddd4d9416 Hey parallel marking is finally an improvement?? 2022-03-13 21:38:59 +01:00
Andy Wingo
4d7041bfa9 Another attempt at parallel marking, avoiding the channel
Not great though!
2022-03-13 13:54:58 +01:00
Andy Wingo
7ce07de670 First crack at parallel marking 2022-03-12 21:09:17 +01:00
Andy Wingo
9c89672c88 Put a local mark queue in front of the work-stealing queue 2022-03-11 11:57:14 +01:00
Andy Wingo
df9edfdff2 Remove tiny objects from mark-sweep 2022-03-11 11:48:26 +01:00
Andy Wingo
f57a1b8a55 Refactor to separate gcbench from gc 2022-03-11 11:48:26 +01:00
Andy Wingo
77ac530360 Add beginnings of parallel marker 2022-03-11 11:48:26 +01:00
Andy Wingo
01d3f9627e Further accelerate sweeping 2022-03-11 11:48:17 +01:00
Andy Wingo
f6ac9d2571 Ability to set heap size on command line 2022-03-11 11:48:04 +01:00
Andy Wingo
5edc4fa81a More efficient sweep 2022-03-11 11:44:11 +01:00
Andy Wingo
5c8a8a2d3e Store mark bits on the side
Lets the sweeper avoid chasing pointers, and is more amenable to
parallel marking.
2022-03-11 11:23:58 +01:00
Andy Wingo
91a330e310 More asserts in mark-sweep 2022-03-11 11:23:58 +01:00
Andy Wingo
fb350fb3ff Keep read/write positions when growing queue 2022-03-11 11:23:58 +01:00
Andy Wingo
c612ff3825 Optimize computation of size class from small object granule count 2022-03-11 11:23:58 +01:00
Andy Wingo
cfa7ea31ae Move back to marking objects instead of edges 2022-03-11 11:23:58 +01:00
Andy Wingo
45405efe56 Move to mark queue, is it an improvement? 2022-03-11 11:23:58 +01:00
Andy Wingo
d2828975a5 Switch mark-sweep collector to mark stack
Slows down performance though!  Have to think here.
2022-03-11 11:23:58 +01:00
Andy Wingo
502c0455a7 Fix mark-sweep allocator to clear contents 2022-03-11 11:23:43 +01:00
Andy Wingo
e492da2d2b Add heap validation to gcbench
* GCBench.c (ValidateTree): New function.
2022-03-11 11:22:01 +01:00
Andy Wingo
7b60164cac Update README 2022-03-07 11:31:28 +01:00
Sergei Trofimovich
f047133e7b build: Test '-flto' on both compiler and linker.
Before the change ./configure incorrectly enabled -flto on toolchains
that support -flto on compiler side but don't support -flto on linker
side. This caused incorrect type size detection on nixpkgs' Darwin:

 configure:54594: checking size of size_t
 configure:54600: clang -std=gnu11 -o conftest -g -O2 -flto   conftest.c  >&5
 ld: warning: ignoring file /private/tmp/nix-build-guile-3.0.8.drv-0/conftest-00e93d.o,
   building for macOS-x86_64 but attempting to link with file built
   for unknown-unsupported file format ( 0xDE 0xC0 0x17 0x0B 0x00 0x00 0x00 0x00 0x14 0x00 0x00 0x00 0x80 0x1A 0x00 0x00 )
 Undefined symbols for architecture x86_64:
   "_main", referenced from:
      implicit entry/start for main executable
 ld: symbol(s) not found for architecture x86_64
 clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

Taken from https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046105041

The change makes sure -flto support tests basic support of just for
object file generation but for linker as well.

* configure.ac: use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-07 10:54:16 +01:00
Ludovic Courtès
347321ece9 psyntax: Honor source properties for things other than syntax objects.
Commit 54bbe0b284 inadvertently led
psyntax to dismiss source location info for data returned by read hash
extensions, because read hash extensions return plain data with
associated source properties, even when called from 'read-syntax'.

This change reverts part of this commit to restore that behavior.

Fixes <https://issues.guix.gnu.org/54003>.

* module/ice-9/psyntax.scm (datum-sourcev): New procedure.
(source-annotation): Fall back to 'datum-sourcev'.
* module/ice-9/psyntax-pp.scm: Regenerate.
* test-suite/tests/compiler.test ("psyntax")["syntax-source with
read-hash-extend"]: New test.
2022-03-07 10:52:16 +01:00
Ludovic Courtès
c572b11f3d tests: Add read-syntax + syntax-source test.
* test-suite/tests/reader.test ("read-syntax")["syntax-source"]: New
test.
2022-03-07 10:52:16 +01:00
Ludovic Courtès
a1a1400c7c Update NEWS.
* NEWS: Add 3.0.9 section.
2022-03-07 10:52:16 +01:00