Skip to content

Conversation

@ko1
Copy link
Owner

@ko1 ko1 commented Jul 13, 2022

No description provided.

jhawthorn and others added 30 commits June 21, 2022 18:33
Now some entries need multiple variables for customization, and only
one environment variable per entry is not enough.
To solve it, dccfff9 has introduced overriding variables by `env`
key for each entries.
This commit uses `env` keys for the other environment variables too,
instead of appending to `$GITHUB_ENV`.
Previously, we didn't pop the frame that runs the TracePoint hook for
b_return events for blocks running as methods (bmethods). In case the
hook raises, that formed an infinite loop during stack unwinding in
hook_before_rewind().

[Bug #18060]
On platforms not having `typeof`, `ccan_container_off_var()` macro
subtracts the pointer variable from the member address pointed by that
variable.
…ing install

This is a regression from ruby/rubygems@cf749f8ffabd. The
funny thing is that we have a spec for this feature, so it was unclear
how we regressed here. It turns out there was a bug in one of our
negative matchers checking that gems ARE NOT included in a bundle.

This commit fixes the bug in the negative matcher and reverts
ruby/rubygems@cf749f8ffabd (with a slightly simpler diff).

ruby/rubygems@3f9a4ff32a
* Use PRIxSIZE instead of "z"
* Fix sign-compare warning
* Suppress unused-but-set-variable warning
This commit adds a bitfield to the iseq body that stores offsets inside
the iseq buffer that contain values we need to mark.  We can use this
bitfield to mark objects instead of disassembling the instructions.

This commit also groups inline storage entries and adds a counter for
each entry.  This allows us to iterate and mark each entry without
disassembling instructions

Since we have a bitfield and grouped inline caches, we can mark all
VALUE objects associated with instructions without actually
disassembling the instructions at mark time.

[Feature #18875] [ruby-core:109042]
Co-authored-by: Tomás Coêlho <[email protected]>
YJIT is now a build-time opt-in so on platforms that YJIT could support
it could still be unavailable due to user discretion. Use MJIT for --jit
and don't display YJIT related command line options in --help when YJIT
is not included in the build.
We can avoid allocating a bitmap when the number of elements in the iseq
is fewer than the size of an iseq_bits_t
If the iseqs don't have any objects in them that need marking, then
immediately free the bitmap buffer
The test in [1] was removed because it stopped working when we limited
the power of Kernel#binding in [2]. However, the underlying issue could
still be reproduced using blocks. Add back a regression test.

I tested the test by commenting out the fix from [1].

[1]: 54c9104
[2]: 343ea99
ISeqs loaded from binary were breaking because the storage partition
calculation had bugs in it.  Specifically it couldn't take in to account
the case when inline storage was overallocated (for example when we
allocate inline storage for an instruction but peephole optimization
eliminates that instruction).

`RUBY_ISEQ_DUMP_DEBUG=to_binary make test-all` would break, and this
patch fixes it
…S` is defined by Ruby. (ruby/io-wait#19)

* Fix return value compatibility with Ruby 2.x.

* Don't add `IO#wait*` methods in Ruby 3.2+.

ruby/io-wait@54c504d089
matzbot and others added 17 commits July 12, 2022 07:03
* Extracted some assertions.
* Assert counter values should be positive.
This commit enables Arrays to move between size pools during compaction.
This can occur if the array is mutated such that it would fit in a
different size pool when embedded.

The move is carried out in two stages:

1. The RVALUE is moved to a destination heap during object movement
   phase of compaction
2. The array data is re-embedded and the original buffer free'd if
   required. This happens during the update references step
Treats:
    #next
    #<<
    #>>
    #next_month
    #prev_month
    #next_year
    #prev_year
    #step
    #upto
    #downto

ruby/date@4246441a35
Treats:
    ::utc
    ::local
    #to_i
    #to_f
    #to_r
    #usec
    #nsec
    #subsec
    #<=>
    #eql?
* Fix some UBSAN false positives.
* ruby tool/update-deps --fix
In a small script the speed of this feature isn't really noticeable but
on Rails it's very noticeable how slow this can be. This PR aims to
speed up two parts of the functionality.

1) The Rust exit recording code

Instead of adding all samples as we see them to the yjit_raw_samples and
yjit_line_samples, we can increment the counter on the ones we've seen
before. This will be faster on traces where we are hitting the same
stack often. In a crude measurement of booting just the active record
base test (`test/cases/base_test.rb`) we found that this improved the
speed by 1 second.

This also results in a smaller marshal dump file which sped up the test
boot time by 4 seconds with trace exits on.

2) The Ruby parsing code

Previously we were allocating new arrays using `shift` and
`each_with_index`. This change avoids allocating new arrays by using an
index. This change saves us the most amount of time, gaining 11 seconds.

Before this change the test boot time took 62 seconds, after it took 47
seconds. This is still too long but it's a step closer to faster
functionality. Next we're going to tackle allowing you to collect trace
exits for a specific instruction. There is also some potential slowness
in the GC code that I'd like to take a second look at.

Co-authored-by: Aaron Patterson <[email protected]>

Co-authored-by: Aaron Patterson <[email protected]>
`rb_thread_wait_for_single_fd` needs to mutate the `waiting_fds` list
that is stored on the VM.  We need to delete the FD from the list before
returning, and deleting from the list requires a VM lock (because the
list is a global).

[Bug #18816] [ruby-core:108771]

Co-Authored-By: Alan Wu <[email protected]>
    Splits certain guidelines for singleton and instance method.
    Calls for instance method to not prefix anything (like RDoc itself for a Ruby-coded instance method); e.g.:
        count -> integer, not array.count,.
        <=> other -> integer or nil, not hash <=> other -> integer or nil.
    Groups previous guidelines into Arguments, Block, Return types, Aliases.
@ko1 ko1 closed this Jul 13, 2022
@ko1 ko1 deleted the debug_gem_1_6_1 branch July 13, 2022 05:53
@ko1 ko1 restored the debug_gem_1_6_1 branch July 13, 2022 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.