Age | Commit message (Collapse) | Author |
|
C extensions can violate the ractor-safety, so only ractor-safe
C extensions (C methods) can run on non-main ractors.
rb_ext_ractor_safe(true) declares that the successive
defined methods are ractor-safe. Otherwiwze, defined methods
checked they are invoked in main ractor and raise an error
if invoked at non-main ractors.
[Feature #17307]
Notes:
Merged: https://github.com/ruby/ruby/pull/3824
|
|
ractor_copy() used rb_ary_modify() to make sure this array is not
sharing anything, but it also checks frozen flag. So frozen arrays
raises an error. To solve this issue, this patch introduces new
function rb_ary_cancel_sharing() which makes sure the array does not
share another array and it doesn't check frozen flag.
[Bug #17343]
A test is quoted from https://github.com/ruby/ruby/pull/3817
Notes:
Merged: https://github.com/ruby/ruby/pull/3831
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3828
|
|
To manage ractor-local data for C extension, the following APIs
are defined.
* rb_ractor_local_storage_value_newkey
* rb_ractor_local_storage_value
* rb_ractor_local_storage_value_set
* rb_ractor_local_storage_ptr_newkey
* rb_ractor_local_storage_ptr
* rb_ractor_local_storage_ptr_set
At first, you need to create a key of storage by
rb_ractor_local_(value|ptr)_newkey().
For ptr storage, it accepts the type of storage,
how to mark and how to free with ractor's lifetime.
rb_ractor_local_storage_value/set are used to access a VALUE
and rb_ractor_local_storage_ptr/set are used to access a pointer.
random.c uses this API.
Notes:
Merged: https://github.com/ruby/ruby/pull/3822
|
|
This patch contains the fowllowing hacks:
(1) Add "--timetable-data=FILE" option for test-all
This option enables to dump timeline event
contains worker, suite, and start/end time.
(2) remove TestJIT in test_jit_debug.rb on parallel test.
it is duplicated test.
(3) move test_jit.rb and test_jit_debug.rb at first
because these two tests are bottleneck of parallel tests.
On my environment, `make test-all TESTS=-j12` reduced the total time
190 seconds -> 140 seconds.
Notes:
Merged: https://github.com/ruby/ruby/pull/3826
|
|
Followup to #3823
Notes:
Merged: https://github.com/ruby/ruby/pull/3827
|
|
|
|
The vm mark function should only check if the current frame is a local
or not and then mark values in that frame. Since it's walking up the
stack looking at each cfp, then all ep's should be examined.
This fixes a bug in the Rails tests where we're seeing segv in railties.
Thanks Yasuo Honda for giving me a reliable repro!
Notes:
Merged: https://github.com/ruby/ruby/pull/3829
|
|
`-l` option has used `chomp!` since Ruby 2.5. [Bug #12926]
|
|
|
|
|
|
Fixes [Feature #13381]
When passed a `fake_str`, `register_fstring` would create new strings
with `str_new_static`. That's not what was expected, and answer
almost no use cases.
Notes:
Merged: https://github.com/ruby/ruby/pull/3786
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3823
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3622
Merged-By: nobu <nobu@ruby-lang.org>
|
|
* memory_view.c: remove a reference in view->obj at rb_memory_view_release
* memory_view.c: keep references of memory-view-exported objects
* Update common.mk
* memory_view.c: Use st_update
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
Clarified that the first and second arguments to the callback
function are pointers to the KEY and the VALUE, but not those
values themselves.
|
|
|
|
read_barrier_handler() can cause SIGSEGV/BUS so it should show
the errors.
|
|
|
|
|
|
--jit-wait CI can be stuck when the workaround is throttled
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3274091
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3483
|
|
This partially reverts commit "Windows: Improve readablity of
getenv() encoding" 14453a256d58b11b06d432e2a4388d95aac298d6.
The `getenv` macro defined here is to also substitute the function
in dln_find.c, not only in this file.
|
|
getenv() did use the expected codepage as an implicit parameter of the macro.
This is mis-leading since include/ruby/win32.h has a different definition.
Using the "cp" variable explicit (like the other function calls) makes it
more readable and consistent.
|
|
It's too short for --jit-wait
https://github.com/ruby/ruby/runs/1466690076?check_suite_focus=true
|
|
096f54428d changes the behavior for this kind of cases.
|
|
The compilation for JIT compaction is very heavy. Triggering a second
compaction to include one more new method is probably not worth it. So
this triggers JIT compaction for ten more new methods after each
compaction.
|
|
Sorry, I forgot to add this in 122cd35939 while I said I did something
for it.
|
|
Because d80226e7bd often reduces the number of unloaded units, it
increases the number of unload_units calls, which are heavy.
To mitigate that, this throttles unload_units per `max_cache_size / 10`.
Also hoping to fix
https://ci.appveyor.com/project/ruby/ruby/builds/36552382/job/kjmjgw9cjyf2ksd7
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3821
|
|
I found that fractional seconds were doubled when using the timezone
feature of Time in Sequel's named_timezones extension (which uses
TZInfo for the timezone object), and traced the problem to this code.
There is no subsecx being modified in the utc_to_local call below
this, and I'm not sure why you would want to add in the fractional
seconds unless you assumed the timezone conversion would drop the
existing fractional seconds (TZInfo doesn't drop fractional seconds).
Notes:
Merged: https://github.com/ruby/ruby/pull/3821
|
|
instead of just unloading worst 10% methods.
|
|
|
|
|
|
to avoid "Too many JIT code, but skipped unloading units for JIT compaction".
Now we can forget the `in_compact` locking.
Moving some functions from mjit.c to mjit_worker.c because mjit_worker.c
should have functions executed in the JIT worker.
|
|
|
|
|
|
|
|
|
|
The check output a warning on M1 Mac mini
http://rubyci.s3.amazonaws.com/osx1100arm/ruby-master/log/20201127T074507Z.log.html.gz
```
checking x86intrin.h usability... no
checking x86intrin.h presence... yes
configure: WARNING: x86intrin.h: present but cannot be compiled
configure: WARNING: x86intrin.h: check for missing prerequisite headers?
configure: WARNING: x86intrin.h: see the Autoconf documentation
configure: WARNING: x86intrin.h: section "Present But Cannot Be Compiled"
configure: WARNING: x86intrin.h: proceeding with the compiler's result
checking for x86intrin.h... no
```
Notes:
Merged: https://github.com/ruby/ruby/pull/3820
|
|
|
|
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' --repeat-count=12 --alternate --output=all benchmark.yml
before --jit: ruby 3.0.0dev (2020-11-27T06:41:15Z master 8ce1711c25) +JIT [x86_64-linux]
after --jit: ruby 3.0.0dev (2020-11-27T08:36:02Z master 2c592126b9) +JIT [x86_64-linux]
last_commit=Cache access to reg_cfp->self on JIT
Calculating -------------------------------------
before --jit after --jit
Optcarrot Lan_Master.nes 82.40522392468650 82.66023870551237 fps
82.67998539899482 83.08660305312587
85.51280693947453 87.09311989553235
86.32925337181406 87.16115255191410
87.35617494926235 87.30699391518075
87.91865339426212 88.47590342996875
88.11573661006648 88.64778616696353
88.16060826662158 88.67015079203991
88.21639244865058 89.19630739497482
88.47241577897603 89.23443637947730
89.37087287229809 89.57052723997015
89.46969964699964 89.97803363889025
```
|
|
default_rand can points a Bignum seed, so it should be marked.
|
|
Random generators are not Ractor-safe, so we need to prepare
per-ractor default random genearators. This patch set
`Random::DEFAULT = Randm` (not a Random instance, but the Random
class) and singleton methods like `Random.rand()` use a per-ractor
random generator.
[Feature #17322]
Notes:
Merged: https://github.com/ruby/ruby/pull/3813
|
|
This reverts commit 4d2c8edca69884a41d2f843d36023e3decdb9872.
Unfortunately this seems to cause several issues:
https://github.com/ruby/ruby/runs/1462188376?check_suite_focus=true
http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3272802
|
|
Performance is probably improved?
$ benchmark-driver -v --rbenv 'before --jit;after --jit' --repeat-count=12 --alternate --output=all benchmark.yml
before --jit: ruby 3.0.0dev (2020-11-27T04:37:47Z master 69e77e81dc) +JIT [x86_64-linux]
after --jit: ruby 3.0.0dev (2020-11-27T05:28:19Z master df6b05c6dd) +JIT [x86_64-linux]
last_commit=Set VM_FRAME_FLAG_FINISH at once
Calculating -------------------------------------
before --jit after --jit
Optcarrot Lan_Master.nes 80.89292998533379 82.19497327502751 fps
80.93130641142331 85.13943315260148
81.06214830270119 87.43757879797808
82.29172808453910 87.89942441487113
84.61206450455929 87.91309779491075
85.44545883567997 87.98026086648694
86.02923132404449 88.03081060383973
86.07411817365879 88.14650206137341
86.34348799602836 88.32791633649961
87.90257338977324 88.57599644892220
88.58006509876580 88.67426384743277
89.26611118140011 88.81669430874207
This should have no bad impact on VM because this function is ALWAYS_INLINE.
|
|
Unfortunately we couldn't see a C backtrace with the previous commit
http://ci.rvm.jp/results/trunk-random2@phosphorus-docker/3272697.
|
|
when GC.compact's SEGV handler is installed
|