Commit Graph

42440 Commits

Author SHA1 Message Date
Paulo Matos
7a57072af3
Put all Racket installations in runner temp (#3116)
* Put all Racket installations in runner temp

Avoid relative paths (see #3112).

Fixes #3112.

* Replace missed .. in artifact download
2020-04-22 20:15:39 +02:00
Georges Dupéron
d09ce588bf Allow dotted list syntax for match expanders, e.g. (match v [(some-match-expander a b c . d) (displayln (list a b c d))])
Closes #1438.
2020-04-22 14:10:59 -04:00
Matthew Flatt
16ad9ed522 cs: use new immobile-object support
Implement 'atomic-interior allocation and immobile cells using
`make-immobile-bytevector` and `make-immobile-vector`, which avoids
having to unlock through a finalizer.

Also, the Chez Scheme GC can now mostly mark a major generation,
instead of copying it, which can significantly reduce memory
use during a GC for an old, large heap (such as DrRacket's).
2020-04-22 07:19:38 -06:00
Matthew Flatt
dccd841adf adjust peak-memory logging
Show peak administrative as a parenthesized delta on peak space.

For BC, this extra delta is small, because BC compacts (instead of
copying) old-generation objects. For CS, the extra delta can large ---
typically an extra 50%, but potentially another 100% --- because a
full collection copies all old-generation objects.

Also, for BC, fix cumulative-allocation reporting to include child
places.
2020-04-22 07:19:38 -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
Sam Tobin-Hochstadt
859e7b4373 Avoid unnecessary use of fprintf.
Closes #3113.
2020-04-21 18:35:04 -04:00
Paulo Matos
392dc33ceb
Update gmp invert_limb from arm (#3111)
Extract invert_limb code for ARM from GMP 6.2.
In order to check for thumb mode availability use defined macro `__thumb__`, which in turns requires us to process the source file with `gcc` instead of `as` in order to access the preprocessor - tested with `clang` as well.

Fixes #3050
2020-04-21 07:12:05 +02: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
Paulo Matos
876aff85c2
Constrain the values of a and b in function not to be both NULL (#3106)
Fixes #2686
2020-04-17 21:55:17 +02:00
Matthew Flatt
734491b511 configure: fix unix-style configuration with --prefix
Closes #3046
2020-04-17 12:05:21 -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
fb677d9569 cs: sync with Chez Scheme update
The Chez Scheme change avoids a leak while collecting in counting
mode, which is used by Racket's memory-accounting mode.

Also, add a small repair for 4256214981.
2020-04-16 17:25:04 -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
8145434fa7 cs: small memory-accounting simplification
Remove an unneeded accounting hook.
2020-04-16 13:44:43 -06:00
Matthew Flatt
4256214981 cs: repair retention of a custodian with a memory limit 2020-04-15 17:25:23 -06:00
Matthew Flatt
d685c835f9 expander: fix reader demo 2020-04-14 08:14:56 -06:00
Matthew Flatt
9c53358035 raco pkg catalog-archive: revert bad change
Unchanged with respect to state database is still changed with respect
to the catalog being constructed!
2020-04-12 14:05:25 -06:00
Matthew Flatt
3d9d12a4d6 raco pkg catalog-archive: avoid writing non-changed information 2020-04-12 13:54:15 -06:00
Sam Tobin-Hochstadt
803f235c30 Use new URL for GitHub tarballs.
GitHub switched URLs for tarballs, redirecting to the new one with
a 302. However, old versions of Racket don't follow redirects in
`raco pkg install`, so they broke (before 6.3). Using the new URL
should work for everyone.

Reported by @greghendershott.
2020-04-12 15:22:05 -04:00
Matthew Flatt
7ed8ea040e raco pkg catalog-archive: support platform-specific dependencies 2020-04-12 11:19:18 -06:00
Matthew Flatt
5df1b7906b raco pkg archive-catalog: add --include and --exclude
Also `--include-deps`, which support the creation of a catalog archive
that is restricted to a specific set of packages. Also
`--fast-file-copy`, which is usefl for speeding up a pipeline of
archiving (helpful to pkg-build).
2020-04-12 05:26:40 -06:00
Matthew Flatt
1b48cd86f9 net/url: add #:method argument to get-pure-port/headers
Supports HEAD with redirections, for example.
2020-04-12 05:26:40 -06:00
Robby Findler
7f9784775f fixes a bug in case->, closes #3098
also use the contract equivalence predicate instead of
two calls to contract stronger
2020-04-09 15:53:59 -05:00
Matthew Flatt
99af295d99 cs: fix constant-time list?
Closes #3097
2020-04-09 09:44:06 -06:00
Sam Tobin-Hochstadt
c81689bf9f Declare loop-updated variable outside the loop.
Found by scan-build.
2020-04-08 15:03:34 -04:00
Sam Tobin-Hochstadt
92c1ba9a62 Free buffer in error case.
Found by scan-build.
cc @pmatos.
2020-04-08 15:03:34 -04:00
John Clements
36bb3bc21f Post-release version for the v7.7 release 2020-04-08 00:23:46 -07:00
Matthew Flatt
f673534ad7 cs: fix place root for accounting
Avoid charging a thread for a place's allocation just bacuse it refers
to the place.
2020-04-06 09:25:47 -06:00
Matthew Butterick
0f351dbf29
correct docs for fast-clean flag
`-c` is not shorthand
2020-04-05 21:31:34 -07:00
Matthew Butterick
d396c70d0e
correct function name in error messages
needs to be `s-exp->fasl` not `fasl->s-exp`
2020-04-05 11:30:02 -07: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
282ec8125a cs: use fused garbage collection and memory accounting
Chez Scheme now supports a single-pass combination of `collect` and
`compute-size-increments`, which makes a GC with accounting about
twice as fast. Meanwhile, other GC improvements reduce non-accounting
full-collection times by 10-20%.

Much of the GC implementation is now generated from a "Parenthe-C"
description, so update the bootstrap process for that step.
2020-04-04 10:43:58 -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
Paulo Matos
ed93eedecc
Static Analysis CI workflow using LLVM scan-build (#3090) 2020-04-02 21:35:37 +02:00
Gustavo Massaccesi
5c91b7f9ac cptypes: fix reduction of $value in ignored expressions
original commit: 858cc5fe0f40e73a3473e3cc3f506c2c232c0a81
2020-04-01 18:59:22 -03:00
Sam Tobin-Hochstadt
dbaf9a8860 Just try brute force for packers.rkt instead. 2020-04-01 16:46:47 -04:00
Sam Tobin-Hochstadt
9c92189c82 Add output to help debug packers.rkt intermittent failure. 2020-04-01 16:44:10 -04: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
Ricardo Herdt
b822c25751 fix typo (extra "the") 2020-03-31 20:11:16 -03:00
Tom Gillespie
1933ba1584 extensions.scrbl fix confusing typo in example
The module is named `hi` but the text said that it was named `hello`
which is quite confusing since `"hello"` is actually the string that
is bound to `greeting`.
2020-03-28 22:13:16 -07:00
Matthew Flatt
5c77bfced9 further signed-vs-unsigned repairs to time handling
Changing the result of cpu-time functions to unsigned suggests
further corrections to avoid overflow.
2020-03-28 09:11:38 -06:00
Paulo Matos
9c2b84d849 Change return type of rktio_get_milliseconds to be unsigned
This fixes a major issue in arm 32bits, detected by ubsan, where
conversion of type to milliseconds results in overflow.

```
rktio_time.c:92:21: runtime error: signed integer overflow: 1584975753 * 1000 cannot be represented in type 'long int'
```
2020-03-28 08:55:24 -06:00
Matthew Flatt
9cb6debf44 cs & thread: memory accounting corrections
Repair trigger of a GC when using `current-memory-use`
on a custodian when a limit was just installed.
2020-03-28 08:39:42 -06:00
Matthew Flatt
ec138ba57c repair compute-size-increments for anonymous fields
The size of a record with anonymous fields was not included in the
computed size.

original commit: 1c44e61a8174629cacc71adedccc028e982ca323
2020-03-28 08:34:48 -06:00