Commit Graph

914 Commits

Author SHA1 Message Date
Matthew Flatt
43e2bc0327 unbreak Windows build
original commit: 999d4e9fc8b9cbeedc58b625f814a1db8172a259
2020-05-31 19:10:13 -06:00
Matthew Flatt
58282cbb5f correct GC problem with mark mode
The problem especially affects `enable-object-counts`, where mark mode
can update an old rtd instead of a copy that is already made.

original commit: 31e2df63894d39b005c6b9984745b44409198d02
2020-05-31 17:09:07 -06:00
Matthew Flatt
7768b09118 unbox local floating-point arithmetic
Avoid allocating a flonum object for floating-opint calculations
that are consumed only by other floating-point caculations.

For this first cut, unboxing applies only to fl+, fl-, fl*, fl/,
flabs, fl<, fl<=, fl=, fl>, fl>=, bytevector-ieee-double-[native-]ref,
and bytevector-ieee-double-[native-]set!. Local variables can be
unboxed in the same way as implicit temporaries, and loop arguments
can be unboxed, but values in a closure and function-call arguments
are always boxed.

arm32 support is mostly in place, but not yet right. ppc32 support is
not yet implemented.

This commit includes a small change that is incompatible with previous
Chez Scheme versions: `(fl= +nan.0)` (and similar for other
comparisons) produces true instead of false.

original commit: 36459e43f10705aa3e383376ca7d54cf2998b7ee
2020-05-31 17:08:38 -06:00
Matthew Flatt
75f287befd cp0: repair move of non-tail into 'effect context
Kent noticed the bug, where `make-nontail` used `ignored` where it
should have used `effect`. Also, Kent points out that `make-nontail`
can skip the `$values` wrapped in `effect` contexts in unsafe mode.

original commit: edd9ba3d656f3bd712e5e235b77225f756397077
2020-05-23 06:30:02 -06:00
Matthew Flatt
c5ee80bf0d adjust flonum printing to be more like %g
Adjust the choice between exponential and not.

Closes racket/racket#3195

original commit: 3a71e6fb6240d1c9e206064a613835c6eea871aa
2020-05-20 06:21:39 -06:00
Matthew Flatt
a820e425d6 cp0: don't drop 'ignored if with multiple values
Closes racket/racket#3092

original commit: 9e928cf79caf536744491e6889e5c71bcd14c264
2020-05-18 16:00:49 -06:00
Paulo Matos
a8b3c8b608 Add further archs for testing (#24)
Add testing for non-threaded x86_64, and i386 versions and remove references to travis_fold directives in testing.

original commit: 441cdb166081e96eaecd513d5f13a8796fd451b4
2020-05-18 13:19:46 +02:00
Matthew Flatt
605ae48f24 fix portability of some tests
original commit: 5b14f79d4d513b1d093084d55e3926f58e71eda8
2020-05-15 14:41:28 -06:00
Matthew Flatt
a106c50798 gc repairs
* Fix calculation of segment index for 32-bit platforms

 * Fix allocation of mark-bit and list-bit arrays in certain unusual
   cases.

 * Fix dirty sweep of records on marked pages that have non-pointer
   fields.

 * Fix allocation of eveen-sized immobile vectors; a pad word needs to
   be cleared.

 * Fix and extend the heap checker (which was used to find several of
   the other problems).

original commit: 8b5e65f5eafac5aea7394901e1dd2f2fc3ccf2bd
2020-05-15 14:40:55 -06:00
Matthew Flatt
96616baa47 unbreak non-threaded build
original commit: c077acf7dd65bcb397e846c786ac546888b5798a
2020-05-15 07:19:51 -06:00
Paulo Matos
74ee485b21 Ensure that the literal 1 is wide enough for a shift (#23)
Fixes runtime error found by ubsan.
original commit: 65e05772a1ee14d73c368f311e837b00af771a23
2020-05-07 17:34:45 +02:00
Matthew Flatt
0d225f5505 x86_64: fix popcount without POPCNT
Commit 68b2f597ec moved the argument from RDI to RCX, but the
`popcount-slow` function wasn't updated.

Related to racket/racket#3150

original commit: 80ffa4eea197a885cd647fcfb76dda720b64781d
2020-05-06 12:18:36 -06:00
Matthew Flatt
c7f4261611 fix ephemerons when dirty and reachable during counting
Part of the repair makes it ok to re-sweep an ephemeron, which is more
consistent with evertything else.

original commit: 2c11bb39129b1492108390a704eb08deaa5d6bcc
2020-04-28 09:02:44 -06:00
Paulo Matos
689a3f8abc Merge pull request #22 from pmatos/actions-ci
Move to GitHub Actions CI
original commit: 548af4b5bcc7d1201d5aabfdeb477248a65b86f2
2020-04-27 16:11:11 +02:00
Matthew Flatt
a9e37d0548 sync simpler handling of tc U, V, W, X, Y
They apparently don't need to be preserved across a GC.

original commit: 830d176bdaf0c19c44e5f4037da0de621d3d9957
2020-04-26 20:13:54 -06:00
Paulo Matos
ea2454ec7b Remove broken archs
original commit: 443c99decdffb016b6b048904f854bd183b66efc
2020-04-26 14:33:29 +02:00
Paulo Matos
63239e5d78 Fix libs
original commit: 257e00f48932fa02cf3f507adf482345edc2adc4
2020-04-26 14:15:49 +02:00
Paulo Matos
00bb57300b Install libs
original commit: 716f0eec0d1d00905e92237401aaa5bf524a4a47
2020-04-26 14:12:15 +02:00
Paulo Matos
d2fc1f4235 Fix syntax
original commit: fb2afff12c3924889a8dab383fb655f7fe726bba
2020-04-26 13:55:09 +02:00
Paulo Matos
a523d285cd download submodules
original commit: dc1e5a41955a1c9d20cff84fc03ec211226bfd47
2020-04-26 13:53:24 +02:00
Paulo Matos
7313545ebf Add i386 arch
original commit: db690229a30c125990cf8c89b3cb9c29afa784e6
2020-04-26 13:50:35 +02:00
Paulo Matos
9314bd9bdc Install 32 bit libs
original commit: 5cf419506d3fd29e7ef82b55fcfe31d75db6f597
2020-04-26 13:46:32 +02:00
Paulo Matos
d3c991211b fix arch name
original commit: 532392ce4e8788228a30c12a38767f460538b298
2020-04-26 13:42:55 +02:00
Paulo Matos
bb68010646 enter dir
original commit: f3911a672310bb21637cdf4901cb2e3ce8d8b53e
2020-04-26 13:40:44 +02:00
Paulo Matos
8f93ceebba Fix mach names
original commit: d76bb24964a0eb65fa9205f2564b7e62d5c6c5ff
2020-04-26 13:36:30 +02:00
Paulo Matos
d310797c69 Print target machine information
original commit: 8c9ee4f00940af5ee557c2c93892209651757610
2020-04-26 13:35:50 +02:00
Paulo Matos
1d90152729 No need curl on vm
original commit: 89de1e481062272e5b6fc9d1a7049a33084c9696
2020-04-26 13:32:17 +02:00
Paulo Matos
b3eb7c1301 Give up on container use - it's broken in Actions
original commit: f1d99416e05d80e38e9da362ece926814339445c
2020-04-26 13:23:52 +02:00
Paulo Matos
da02466c21 Remove macos, fix home
original commit: d3bd54c562099a65618be8d692828d4437e0e067
2020-04-26 13:21:48 +02:00
Paulo Matos
99c1814b8c Install curl dependency
original commit: b3a765ab2291c1879810b13e9e4b1f9a73515b40
2020-04-26 13:18:48 +02:00
Paulo Matos
65146afcf5 Move from Travis to GitHub Actions
This consolidates use of GitHub Actions, since we are using it as well
with racket/racket.

original commit: c3bf252c76ef594dfccf332def30f3d9c733282d
2020-04-26 13:12:35 +02:00
Matthew Flatt
ac6467fd8c add a better test for list-assuming-immutable?
This test helped get the current implementation working, but I forgot
to add it to "5_2.ms".

original commit: a8f59ed7262025e130e913f420e2519ed0ac00f5
2020-04-25 17:20:41 -06:00
Matthew Flatt
120082f3f9 add list-assuming-immutable?
Build in a Racket-style `list?` using GC cooperation to make recording
the result cheaper.

original commit: 32189af3e4dfc3596fba3163fd1a8295b830448b
2020-04-25 15:33:56 -06:00
Matthew Flatt
7ba7a815b0 tweak copy-vs-mark dispatching
The C compiler doesn't generate a tail call in a place where I
expected one, and maybe it's better to branch at the call site anyway.

original commit: 70fa8e7f7bd891c548c877cabdd15073aa2aa01b
2020-04-24 10:20:50 -06:00
Matthew Flatt
752ee94563 avoid fragmentation at the chunk level
original commit: 5b52a846af7f5d9c030e6dc71f46d83b3f1b8e4c
2020-04-23 17:25:03 -06:00
Matthew Flatt
d755dbc00f cs: fix phantom bytes effect on maximum-memory-bytes
original commit: 78f2c1e3ee1329f44742a23c28a76538eef8cbdd
2020-04-22 16:30:47 -06:00
Matthew Flatt
f53f20b5b9 GC marking (non-copying) mode
Change the GC so that it can mark and sweep objects in-place, instead
of always copying. This change is helpful for reducing peak memory
use while performing a collection on a large, old heap.

Some non-copying support was already in place for locked objects,
but the new implementation is faster and more general. As an
alternative to locking, the storage manager now provides "immobile"
allocation (currently only for bytevectors, vectors, and boxes),
which allocates an object that won't move but that can be GCed if
it's not referenced. A locked object is an object that has been
immobiled and that is on a global list --- mostly the old,
non-scalable implementation of locked objects brought back, since
immobile objects cover the cases that need to scale.

original commit: aecb7b736cb1d52764c292fa6364a674958dfde3
2020-04-22 07:10:02 -06:00
Matthew Flatt
f4de537e1c gc: generate sweep_dirty_object
The `sweep_dirty_intersecting` function still had hand-implemented
sweep cases.

original commit: c51b46b3cc71ed0dbc523071dce3cc496965e0b6
2020-04-18 10:40:15 -06:00
Matthew Flatt
02fca53fba repair object counting
The leak repair wasn't quite right, and it broke `object-counts`.

original commit: 4f3ea0d8d093908e35067a02e1f78e033a5bb655
2020-04-17 08:16:55 -06:00
Matthew Flatt
c4ffe39efb fix leak related to object counts
When collecting to the maximum generation with object counts enabled,
a structure type would effectively become permanently reachable.

Also, add `bytes-finalized` to report how many bytes were associated
with guardian-based finalization by the most recent collection.

original commit: 852f5e2de95a26d3500321c4d4d732407945a57a
2020-04-16 16:16:13 -06:00
Matthew Flatt
d540162c0d sync expected errors for mats
original commit: 778e6426bc775963472e794abaca6e8739779e79
2020-04-04 16:48:14 -06:00
Matthew Flatt
63baf24ad5 repairs for locking
Fix clearing of locked-object information and copying adjacent pairs.

original commit: 53d092c50c1c24017c52b6e002e6073b81747e09
2020-04-04 16:05:20 -06:00
Matthew Flatt
5458323280 fix segment initialization for new fields
original commit: 90f358a2a33f90d9b64b6750988f679a6fcfcc7d
2020-04-04 12:43:04 -06:00
Matthew Flatt
af9c81b205 add missing workarea setup for vfasl.inc
original commit: 6934ef1acc9a9a4102fd92187073fb49c983ca32
2020-04-04 11:50:49 -06:00
Matthew Flatt
d76a610426 bump version number
original commit: 46de3359c4dd20809fc63496fa4545518396aa6b
2020-04-04 10:30:12 -06:00
Matthew Flatt
45b618c4c1 remove old implementation of compute-size-increments
The old implementation is replaced by the new mkgc.ss-based
implemented.

original commit: 7a8eaf81df0dd52cde58ed51f5210b9398cb8bb6
2020-04-04 10:28:06 -06:00
Matthew Flatt
afebbdd6a9 convert GC to "mkgc.ss" implementation
Replace repetitive C code in "gc.c" and "vfasl.c" with an
implementation using a little "Parenthe-C" language, which is a
somewhat declarative description of object tracing. From that
descrition, we generate different kinds of tracing functions, such as
the copy function or the sweep function.

The little language is still bascially C, just with parentheses and
parameterization that is much better than trying to use the C
preprocessor. (The "mkgc.ss" file includes the compiler from
Parenthe-C to C.)

Besides replacing existing code, we also generate a new traversal to
implement `compute-object-sizes`. Finally, the GC can now perform a
fused `collect` and `compute-object-sizes` in a single traversal.

Also improve the way that locked objects are detected during GC. This
can make a significant difference (on the order of 10-20% for a full
collection) when locked objects are long-lived.

original commit: de1f5c41d729ac75822a1f1e633ec6d042c883dc
2020-04-04 10:21:16 -06:00
Matthew Flatt
8656bbae7e fix ephemeron allocation
Only half(!) of the needed space was actually allocated. The extra
space is ony used after a GC, however, and a GC makes the extra room,
so that's why things haven't fallen over completely, but that's more
subtle than intended.

original commit: 3d72bc14b9247d6764809cb651403dbb4063a905
2020-04-04 10:01:04 -06:00
Gustavo Massaccesi
5c91b7f9ac cptypes: fix reduction of $value in ignored expressions
original commit: 858cc5fe0f40e73a3473e3cc3f506c2c232c0a81
2020-04-01 18:59:22 -03:00
Matthew Flatt
f828cb1eaa fix emphemeron-key tracking in a segment with locked objects
original commit: 9d1252b176e972f92030599dae0ce159c9d36c5b
2020-04-01 07:53:32 -06:00