| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/io-wait/commit/940ba319d3
|
|
now `enc_table->list` is not a pointer.
|
|
https://github.com/ruby/irb/commit/ed9e435a6b
|
|
This reduces global lock acquiring for reading.
https://bugs.ruby-lang.org/issues/18949
Notes:
Merged: https://github.com/ruby/ruby/pull/6935
|
|
|
|
|
|
All the method call types need to handle argument shifting in case they're
called by `.send`, and we weren't handling that in `OPTIMIZED_METHOD_TYPE_CALL`.
Lack of shifting caused the stack size assertion in gen_leave() to fail.
Discovered by Rails CI: https://buildkite.com/rails/rails/builds/91705#018516c4-f8f8-469e-bc2d-ddeb25ca8317/1920-2067
Diagnosed with help from `@eileencodes` and `@k0kubun`.
Notes:
Merged: https://github.com/ruby/ruby/pull/6943
Merged-By: XrXr
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6939
|
|
SIZE_POOL_COUNT is a GC macro, it should belong in gc.h and not shape.h.
SIZE_POOL_COUNT doesn't depend on shape.h so we can have shape.h depend
on gc.h.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6940
|
|
https://github.com/ruby/net-http/commit/da626e4e42
|
|
I meant to commit diff, but it was left uncommitted locally.
|
|
Moves check for gc_is_moveable_obj from try_move to gc_compact_plane.
Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6938
|
|
When moving Objects between size pools we have to assign a new shape.
This happened during updating references - we tried to create a new shape
tree that mirrored the existing tree, but based on the root shape of the
new size pool.
This causes allocations to happen if the new tree doesn't already exist,
potentially triggering a GC, during GC.
This commit changes object movement to look for a pre-existing new tree
during object movement, and if that tree does not exist, we don't move
the object to the new pool.
This allows us to remove the shape allocation from update references.
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
Notes:
Merged: https://github.com/ruby/ruby/pull/6938
|
|
Stubs we generate for invalidation don't necessarily co-locate with the
code that jump to the stub. Since we rely on co-location to keep stubs
alive as they are in the outlined code block, it used to be possible for
code GC inside branch_stub_hit() to free the stub that's its direct
caller, leading us to return to freed code after.
Stubs used to look like:
```
mov arg0, branch_ptr
mov arg1, target_idx
mov arg2, ec
call branch_stub_hit
jmp return_reg
```
Since the call and the jump after the call is the same for all stubs, we
can extract them and use a static trampoline for them. That makes
branch_stub_hit() always return to static code. Stubs now look like:
```
mov arg0, branch_ptr
mov arg1, target_idx
jmp trampoline
```
Where the trampoline is:
```
mov arg2, ec
call branch_stub_hit
jmp return_reg
```
Code GC can now free stubs without problems since we'll always return
to the trampoline, which we generate once on boot and lives forever.
This might save a small bit of memory due to factoring out the static
part of stubs, but it's probably minor.
[Bug #19234]
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6941
|
|
It was a bad copy-paste.
|
|
auto_request_review, codeql-analysis, scorecards don't have it either,
but those are intentional.
|
|
This reverts the net-imap upgrade of commit e3ed6c07832edf2a95bae3bdd908cc3f5b65eebe.
net-imap tests of test-bundled-gems seem to be broken
https://github.com/ruby/ruby/actions/runs/3704473689/jobs/6277145052.
|
|
When an object becomes "too complex" (in other words it has too many
variations in the shape tree), we transition it to use a "too complex"
shape and use a hash for storing instance variables.
Without this patch, there were rare cases where shape tree growth could
"explode" and cause performance degradation on what would otherwise have
been cached fast paths.
This patch puts a limit on shape tree growth, and gracefully degrades in
the rare case where there could be a factorial growth in the shape tree.
For example:
```ruby
class NG; end
HUGE_NUMBER.times do
NG.new.instance_variable_set(:"@unique_ivar_#{_1}", 1)
end
```
We consider objects to be "too complex" when the object's class has more
than SHAPE_MAX_VARIATIONS (currently 8) leaf nodes in the shape tree and
the object introduces a new variation (a new leaf node) associated with
that class.
For example, new variations on instances of the following class would be
considered "too complex" because those instances create more than 8
leaves in the shape tree:
```ruby
class Foo; end
9.times { Foo.new.instance_variable_set(":@uniq_#{_1}", 1) }
```
However, the following class is *not* too complex because it only has
one leaf in the shape tree:
```ruby
class Foo
def initialize
@a = @b = @c = @d = @e = @f = @g = @h = @i = nil
end
end
9.times { Foo.new }
``
This case is rare, so we don't expect this change to impact performance
of most applications, but it needs to be handled.
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/6931
|
|
Count how many "variations" each class creates. A "variation" is a a
unique ordering of instance variables on a particular class. This can
also be thought of as a branch in the shape tree.
For example, the following Foo class will have 2 variations:
```ruby
class Foo ; end
Foo.new.instance_variable_set(:@a, 1) # case 1: creates one variation
Foo.new.instance_variable_set(:@b, 1) # case 2: creates another variation
foo = Foo.new
foo.instance_variable_set(:@a, 1) # does not create a new variation
foo.instance_variable_set(:@b, 1) # does not create a new variation (a continuation of the variation in case 1)
```
We will use this number to limit the amount of shapes that a class can
create and fallback to using a hash iv lookup.
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/6931
|
|
This reverts commit 9c54466e299aa91af225bc2d92a3d7755730948f.
We're seeing crashes in Shopify CI after this commit.
|
|
When moving Objects between size pools we have to assign a new shape.
This happened during updating references - we tried to create a new shape
tree that mirrored the existing tree, but based on the root shape of the
new size pool.
This causes allocations to happen if the new tree doesn't already exist,
potentially triggering a GC, during GC.
This commit changes object movement to look for a pre-existing new tree
during object movement, and if that tree does not exist, we don't move
the object to the new pool.
This allows us to remove the shape allocation from update references.
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
Notes:
Merged: https://github.com/ruby/ruby/pull/6926
|
|
|
|
|
|
Pick from https://github.com/rubygems/rubygems/commit/084f7d1f21f6fc3e2bb685b7bda3653fb2891c6e
Notes:
Merged: https://github.com/ruby/ruby/pull/6936
|
|
[Feature #19134]
Notes:
Merged: https://github.com/ruby/ruby/pull/6934
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6927
|
|
* Remove `require 'io/wait'` as it's part of core now.
* Update ruby specs using version gates.
* Add note about why it's conditional.
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
(https://github.com/ruby/net-http/pull/91)
https://github.com/ruby/net-http/commit/d394404402
|
|
(https://github.com/ruby/net-http/pull/90)
https://github.com/ruby/net-http/commit/d9d829ca53
|
|
It's idempotent.
Notes:
Merged: https://github.com/ruby/ruby/pull/6930
|
|
If the rb_id_table_lookup fails, then res is not updated so it cannot be
any value other than null.
Notes:
Merged: https://github.com/ruby/ruby/pull/6928
|
|
|
|
|
|
They don't actually have a class.
Notes:
Merged: https://github.com/ruby/ruby/pull/6925
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6919
|
|
(https://github.com/ruby/net-http/pull/89)
https://github.com/ruby/net-http/commit/86b84eb307
|
|
https://github.com/rubygems/rubygems/commit/5479d99a1d
|
|
|
|
https://github.com/ruby/securerandom/commit/9e16b597f5
|
|
|
|
https://github.com/ruby/resolv-replace/commit/187e91d149
|
|
Fixed https://github.com/ruby/date/issues/83
https://github.com/ruby/date/commit/9731a3e732
|
|
|
|
https://github.com/ruby/English/commit/736f819b3b
|
|
|
|
https://github.com/ruby/abbrev/commit/8c3debac5a
|
|
|