71548 Commits

Author SHA1 Message Date
Matt Valentine-House
651b832c1b extract magic number from gc_sweep_step 2022-04-01 10:52:18 -04:00
Peter Zhu
fe21b7794a Use mmap for heap page allocation only
Currently, rb_aligned_malloc uses mmap if Ruby heap pages can be
allocated through mmap (when system heap page size <= Ruby heap page
size). If Ruby heap page sizes is increased to 64KiB, then mmap will
be used on systems with 64KiB system page sizes. However, the transient
heap also uses rb_aligned_malloc and requires 32KiB alignment. This
would break in the current implementation since it would allocate sizes
through mmap that is not a multiple of the system page size.

This commit adds heap_page_body_allocate which will use mmap when
possible and changes rb_aligned_malloc to not use mmap (and only
use posix_memalign).
2022-04-01 10:27:18 -04:00
Jeremy Evans
d1d48cb690 Revert "Raise RuntimeError if Kernel#binding is called from a non-Ruby frame"
This reverts commit 343ea9967e4a6b279eed6bd8e81ad0bdc747f254.

This causes an assertion failure with -DRUBY_DEBUG=1 -DRGENGC_CHECK_MODE=2
2022-04-01 07:22:49 -07:00
Matt Valentine-House
d8352ff3ac [Feature #18619] remove FL_FROM_FREELIST 2022-04-01 08:45:52 -04:00
Matt Valentine-House
c26a85fc96 [Feature #18619] Remove redundant compaction path 2022-04-01 08:45:52 -04:00
Matt Valentine-House
76572e5a7f [Feature #18619] Reverse the order of compaction movement
This commit changes the way compaction moves objects and sweeps pages in
order to better facilitate object movement between size pools.

Previously we would move the scan cursor first until we found an empty
slot and then we'd decrement the compact cursor until we found something
to move into that slot. We would sweep the page that contained the scan
cursor before trying to fill it

In this algorithm we first move the compact cursor down until we find an
object to move - We then take a free page from the desired destination
heap (always the same heap in this current iteration of the code).

If there is no free page we sweep the page at the sweeping_page cursor,
add it to the free pages, and advance the cursor to the next page, and
try again.

We sweep one page from each size pool in this way, and then repeat that
process until all the size pools are compacted (all the cursors have
met), and then we update references and sweep the rest of the heap.
2022-04-01 08:45:52 -04:00
git
7dfea79ebf Update bundled gems list at b3a05827c716bbb6a54cb6924f5840 [ci skip] 2022-04-01 05:44:35 +00:00
Koichi Sasada
b3a05827c7 debug.gem v1.5.0
Note that `mkmf`'s `have_func` doesn't work without installing ruby
(without `make install`) and `make test-bundled-gems` does not work.
So the newer test repository is specified.
2022-04-01 14:44:08 +09:00
git
f24abc0bb2 Update default gems list at 06f94d1784c6f00ba7d21af57af0d0 [ci skip] 2022-04-01 04:57:20 +00:00
Hiroshi SHIBATA
06f94d1784 [ruby/net-protocol] Bump version to 0.1.3
https://github.com/ruby/net-protocol/commit/9cf40af499
2022-04-01 13:56:47 +09:00
Nobuyoshi Nakada
e680e63e7e [ruby/psych] Output libyaml configure log
https://github.com/ruby/psych/commit/c2e3c8579c
2022-04-01 11:48:50 +09:00
Alan Wu
2222032979
Remove dependency on libcapstone
We have received reports of build failures due to this configuration
check modifying compile flags. Since only YJIT devs use this library
we can remove it to make Ruby easier to build for users.

See: https://github.com/rbenv/ruby-build/discussions/1933
2022-03-31 17:26:28 -04:00
Burdette Lamar
056b7a8633
[DOC] Enhanced RDoc for String (#5742)
Treats:
    #force_encoding
    #b
    #valid_encoding?
    #ascii_only?
    #scrub
    #scrub!
    #unicode_normalized?
Plus a couple of minor tweaks.
2022-03-31 15:09:25 -05:00
Matt Valentine-House
bb037f6d86 Remove hard-coded swept slots threshold 2022-03-31 14:39:59 -04:00
git
f380a25520 Update default gems list at 8a38419b73ec2b698dd2d0462055f3 [ci skip] 2022-03-31 15:23:12 +00:00
Marc-André Lafortune
8a38419b73 [ruby/ostruct] v0.5.5
https://github.com/ruby/ostruct/commit/ce879e56cf
2022-04-01 00:18:36 +09:00
git
5357b6bfb2 * 2022-04-01 [ci skip] 2022-04-01 00:17:03 +09:00
Charles Oliver Nutter
8751769637 [ruby/ostruct] Avoid using block_given in the presence of aliases
defined?(yield) bypasses the block_given? method (or any aliases
to it) and always does the right thing.

https://github.com/ruby/ostruct/commit/4c38fe612e
2022-04-01 00:16:49 +09:00
Nobuyoshi Nakada
af2ab0dd1c [ruby/psych] Make a static library from PIC object files
On some platforms, PIC and non-PIC code are incompatible and the
latter cannot be used for shared objects.

https://github.com/ruby/psych/commit/5652e32733
2022-03-31 21:34:48 +09:00
James Hill
834c3b3545 [rubygems/rubygems] Update bundler documentation to reflect bundle config scope changes
In https://github.com/rubygems/rubygems/pull/4152 `bundle config` was changed
to default to local scope (instead of global) if the command was executed
from inside an application directory.

Updated documentation reflects this change.

https://github.com/rubygems/rubygems/commit/d92d42cae5
2022-03-31 20:00:10 +09:00
Nobuyoshi Nakada
d8189ed23f
Return only captured range in MatchData [Bug #18670] 2022-03-31 18:01:15 +09:00
Yusuke Endoh
ddd83e8462 test/date/test_date_parse.rb: relax the time limit
The timeout was very strict for weak CI machines like qemu-riscv.
Due to the additional overhead for Regexp.timeout=, it started failing
on such machines.

http://rubyci.s3.amazonaws.com/debian-riscv64/ruby-master/log/20220330T200018Z.fail.html.gz
```
  1) Error:
TestDateParse#test__parse_too_long_year:
Timeout::Error: execution expired
```
2022-03-31 12:52:16 +09:00
Nobuyoshi Nakada
217cea7812 [ruby/psych] Remove unknown vendor for cross-compiling tool prefix
https://github.com/ruby/psych/commit/a4ffa06646
2022-03-31 12:18:28 +09:00
Nobuyoshi Nakada
663c297e34
Remove CI configuration files from extracted bundled gems 2022-03-31 10:49:56 +09:00
Nobuyoshi Nakada
abfd859b13
Remove github and git related files from extracted bundled gems 2022-03-31 10:49:55 +09:00
Yusuke Endoh
c499a4c28a re.c: stop a wrong warning of "flags ignored" on Regexp.new(//)
[Bug #18669]
2022-03-31 10:07:09 +09:00
S-H-GAMELINKS
3a70d4cd60 [DOC] Fix ghcr link 2022-03-31 08:35:39 +09:00
Peter Zhu
9f306618b1 [Bug #18667] Define RUBY_API_VERSION on Windows
On other platforms, RUBY_SO_NAME is defined from RUBY_API_VERSION.
ruby_version contains the ABI version, which is not needed.
RUBY_API_VERSION is defined as MAJOR.MINOR.
2022-03-30 18:08:46 -04:00
Burdette Lamar
0cb43034b4
Repair format for What's Here in Dir (#5737) 2022-03-30 14:14:36 -05:00
Burdette Lamar
ffcdbedbfb
Repaired What's Here sections for Range, String, Symbol, Struct (#5735)
Repaired What's Here sections for Range, String, Symbol, Struct.
2022-03-30 13:46:24 -05:00
Jeremy Evans
79b59fee16 Update NEWS for proc autosplat change 2022-03-30 11:39:27 -07:00
git
0dd63216e3 * 2022-03-31 [ci skip] 2022-03-31 03:04:18 +09:00
Jeremy Evans
fbaadd1cfe
Do not autosplat array in block call just because keywords accepted
If the block only accepts a single positional argument plus keywords,
then do not autosplat.  Still autosplat if the block accepts more
than one positional argument in addition to keywords.

Autosplatting a single positional argument plus keywords made sense
in Ruby 2, since a final positional hash could be used as keywords,
but it does not make sense in Ruby 3.

Fixes [Bug #18633]
2022-03-30 11:03:56 -07:00
Nobuyoshi Nakada
75efbb98af [ruby/psych] Propagate the host configuration to libyaml
https://github.com/ruby/psych/commit/0e37e19707
2022-03-30 23:08:13 +09:00
Peter Zhu
dde164e968 Decouple incremental marking step from page sizes
Currently, the number of incremental marking steps is calculated based
on the number of pooled pages available. This means that if we make Ruby
heap pages larger, it would run fewer incremental marking steps (which
would mean each incremental marking step takes longer).

This commit changes incremental marking to run after every
INCREMENTAL_MARK_STEP_ALLOCATIONS number of allocations. This means that
the behaviour of incremental marking remains the same regardless of the
Ruby heap page size.

I've benchmarked against discourse benchmarks and did not get a
significant change in response times beyond the margin of error. This is
expected as this new incremental marking algorithm behaves very
similarly to the previous one.
2022-03-30 09:33:17 -04:00
Yusuke Endoh
ad808506b3 Update dependencies 2022-03-30 16:50:46 +09:00
Yusuke Endoh
5df2589b64 internal/ractor.h: Added
Currently it has only one function prototype.
2022-03-30 16:50:46 +09:00
Yusuke Endoh
2ade40276b re.c: raise Regexp::TimeoutError instead of RuntimeError 2022-03-30 16:50:46 +09:00
Yusuke Endoh
34b288f8d4 doc/regexp.rdoc: Add explanation about Regexp timeout configuration 2022-03-30 16:50:46 +09:00
Yusuke Endoh
ce87bb8bd6 re.c: Add timeout keyword for Regexp.new and Regexp#timeout 2022-03-30 16:50:46 +09:00
Yusuke Endoh
ffc3b37f96 re.c: Add Regexp.timeout= and Regexp.timeout
[Feature #17837]
2022-03-30 16:50:46 +09:00
Yusuke Endoh
23530d68cb ractor.c: Add a helper function to ensure the context is a main ractor 2022-03-30 16:50:46 +09:00
Yusuke Endoh
a94002115b thread.c: Move double2hrtime and hrtime2double to hrtime.h
... to make them available in other places than thread.c
2022-03-30 16:50:46 +09:00
Nobuyoshi Nakada
42a0bed351
Prefix ccan headers (#4568)
* Prefixed ccan headers

* Remove unprefixed names in ccan/build_assert

* Remove unprefixed names in ccan/check_type

* Remove unprefixed names in ccan/container_of

* Remove unprefixed names in ccan/list

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
2022-03-30 20:36:31 +13:00
Nobuyoshi Nakada
8d27d00af5
Fix locations of the second argument 2022-03-30 14:38:33 +09:00
Nobuyoshi Nakada
71aa43c725 [ruby/psych] Configure libyaml from the original source
https://github.com/ruby/psych/commit/54a9ba9d10
2022-03-30 11:31:04 +09:00
Nobuyoshi Nakada
0bca029d2f
[DOC] Use simple references to operator methods
Method references is not only able to be marked up as code, also
reflects `--show-hash` option.
The bug that prevented the old rdoc from correctly parsing these
methods was fixed last month.
2022-03-30 10:54:52 +09:00
Jeremy Evans
5d43969e92 Update NEWS for TracePoint#enable target_thread default change 2022-03-29 18:33:16 -07:00
Jeremy Evans
3cad54a246 Fix comment 2022-03-29 18:14:33 -07:00
Jeremy Evans
d8dfabbfe6 Fix spec description
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
2022-03-29 18:14:33 -07:00