Age | Commit message (Collapse) | Author |
|
Fix https://github.com/ruby/cgi/pull/11
https://github.com/ruby/cgi/commit/60d8f5e7d9
|
|
Previously, YJIT assumed that it's always possible to generate a new
basic block when servicing a stub in branch_stub_hit(). When YJIT is out
of executable memory, for example, this assumption doesn't hold up.
Add handling to branch_stub_hit() for servicing stubs without consuming
more executable memory by adding a code path that exits to the
interpreter at the location the branch stub represents. The new code
path reconstructs interpreter state in branch_stub_hit() and then exits
with a new snippet called `code_for_exit_from_stub` that returns
`Qundef` from the YJIT native stack frame.
As this change adds another place where we regenerate code from
`branch_t`, extract the logic for it into a new function and call it
regenerate_branch(). While we are at it, make the branch shrinking code
path in branch_stub_hit() more explicit.
This new functionality is hard to test without full support for out of
memory conditions. To verify this change, I ran
`RUBY_YJIT_ENABLE=1 make check -j12` with the following patch to stress
test the new code path:
```diff
diff --git a/yjit_core.c b/yjit_core.c
index 4ab63d9806..5788b8c5ed 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -878,8 +878,12 @@ branch_stub_hit(branch_t *branch, const uint32_t target_idx, rb_execution_contex
cb_set_write_ptr(cb, branch->end_addr);
}
+if (rand() < RAND_MAX/2) {
// Compile the new block version
p_block = gen_block_version(target, target_ctx, ec);
+}else{
+ p_block = NULL;
+}
if (!p_block && branch_modified) {
// We couldn't generate a new block for the branch, but we modified the branch.
```
We can enable the new test along with other OOM tests once full support
lands.
Other small changes:
* yjit_utils.c (print_str): Update to work with new native frame shape.
Follow up for 8fa0ee4d404.
* yjit_iface.c (rb_yjit_init): Run yjit_init_core() after
yjit_init_codegen() so `cb` and `ocb` are available.
Notes:
Merged: https://github.com/ruby/ruby/pull/5180
Merged-By: XrXr
|
|
https://github.com/rubygems/rubygems/commit/0396e899db
|
|
|
|
Non-VWA embedded string allocation had a performance regression. This
commit improves performance of non-VWA embedded string allocation.
Notes:
Merged: https://github.com/ruby/ruby/pull/5183
|
|
So that version dependent pkg-config files can override files in
the default locations.
Notes:
Merged: https://github.com/ruby/ruby/pull/5182
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5182
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5182
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5181
|
|
```
compiling ../gc.c
../gc.c:2444:1: warning: unused function 'size_pool_for_size' [-Wunused-function]
size_pool_for_size(rb_objspace_t *objspace, size_t size)
^
1 warning generated.
```
Notes:
Merged: https://github.com/ruby/ruby/pull/5181
|
|
Seems working now probably because of system library updates.
|
|
When `RGENGC_CHECK_MODE` is enable, `obj_memsize_of` is called
in `newobj_init` and it expect the memory is zero-cleared.
|
|
|
|
It should retun general `cc`, not for overloaded (mandatory only)
method call cache.
This issue is reported by @shugo and @ktou
https://twitter.com/shugomaeda/status/1463699797182119936
Notes:
Merged: https://github.com/ruby/ruby/pull/5173
|
|
been deleted
https://github.com/rubygems/rubygems/commit/fe1a31db31
|
|
* YJIT: Introduce jit_putobject
This extracts the logic previously inside gen_putobject to a more
reusable helper method jit_putobject.
The motivation for this is that it both simplifies the implementation of
other instructions, and other instructions can reuse the optimized
behaviour for 32-bit special constants (most importantly
opt_getinlinecache).
This commit also expands the optimization to use a mov directly to
memory when we encounter a 32-bit immediate constant. Previously it
covered fixnums and Qtrue/Qfalse, now it will cover any SPECIAL_CONST_P
value which can be represented as a 32-bit immediate. Notably, this
includes static symbols, and Qnil.
* Style touchups and a comment
* delete empty line
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes:
Merged-By: jhawthorn <john@hawthorn.email>
|
|
* YJIT: Implement optimized_method_struct_aref
* YJIT: Implement struct_aref without method call
Struct member reads can be compiled directly into a memory read (with
either one or two levels of indirection).
* YJIT: Implement optimized struct aset
* YJIT: Update tests for struct access
* YJIT: Add counters for remaining optimized methods
* Check for INT32_MAX overflow
It only takes a struct with 0x7fffffff/8+1 members. Also add some
cheap compile time checks.
* Add tests for non-embedded struct aref/aset
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes:
Merged-By: jhawthorn <john@hawthorn.email>
|
|
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
This reverts commit 6157619bb68e4307cdf065cb73d5bfcec30d042d.
We'll wait for comments in the open ticket: https://bugs.ruby-lang.org/issues/18364
Notes:
Merged: https://github.com/ruby/ruby/pull/5176
|
|
GC.stat_size_pool will return stats for a particular size pool. This is
used for the Variable Width Allocation feature.
Notes:
Merged: https://github.com/ruby/ruby/pull/5169
|
|
|
|
|
|
https://github.com/ruby/win32ole/commit/7e04d0eb3e
Notes:
Merged: https://github.com/ruby/ruby/pull/5175
|
|
https://github.com/ruby/win32ole/commit/8d46bd0c93
Notes:
Merged: https://github.com/ruby/ruby/pull/5175
|
|
https://github.com/ruby/win32ole/commit/62fd78078b
Notes:
Merged: https://github.com/ruby/ruby/pull/5175
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5174
|
|
|
|
|
|
`cc->cme_` can be NULL when it is not initialized yet.
It can be observed on `GC.stress == true` running.
Notes:
Merged: https://github.com/ruby/ruby/pull/5172
|
|
|
|
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20211125T003004Z.log.html.gz
```
[ 4780/21204] TestISeq#test_super_with_anonymous_block/home/chkbuild/chkbuild/tmp/build/20211125T003004Z/ruby/test/ruby/test_iseq.rb:141: warning: method redefined; discarding old touch3
/home/chkbuild/chkbuild/tmp/build/20211125T003004Z/ruby/test/ruby/test_iseq.rb:121: warning: previous definition of touch3 was here
= 0.00 s
```
|
|
[ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/5171
Merged-By: XrXr
|
|
* What's Here for Float
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
* Enhanced RDoc for Float#floor
* Enhanced RDoc for Float
* Enhanced RDoc for Float
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
Recent changes made a warning while running specs show up for some
reason, and it revealed this error.
https://github.com/rubygems/rubygems/commit/bbf55de38e
|
|
successful runs
https://github.com/rubygems/rubygems/commit/4807bd19a5
|
|
https://github.com/rubygems/rubygems/commit/dc391f4d87
|
|
https://github.com/rubygems/rubygems/commit/48f8cdab9c
|
|
https://github.com/rubygems/rubygems/commit/8dc86b7096
|
|
With /Z7, no .pdb file is generated, so trying to link it during build
fails on my machine even though it's okay on CI.
By the way, in my local testing, no .pdb is generated in cwd at runtime
even without the /Fd option. I guess we can pass it just in case.
Notes:
Merged: https://github.com/ruby/ruby/pull/5058
|
|
With MSVC, MJIT uses the /Fd option on an installed PDB file when
compiling. Combined with the /Zi option, this causes the PDB file to be
modified every time MJIT compiles. Concurrent modifications to the same
PDB file is known to cause problems. MSVC even has an option, /FS to
deal with it. When running MJIT tests in parallel, sometimes this leads
to corrupting the PDB file, breaking subsequent compilations. On CI,
we get messages like these:
rb_mjit_header-3.1.0.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
To avoid this race, use the /Z7 option when building precompiled header,
which asks the compiler to put debug info into the .obj file,
eliminating the need for pointing the compiler to the PDB file for the
precompiled header.
The /Fd option is changed to use a unique path based on the name of the
dll output. Because of the /debug linker flag, we generate a PDB file
at runtime even though we use /Z7.
There are a couple things missing from this change:
- Because MJIT uses the interpreter's CFLAGS build option and that
contains /Zi, putting /Z7 at the end leads to a build warning
- With /Z7 no PDB file is built anymore, so the code for installing
the PDB file can be removed
There might also be other problems with this change I haven't noticed
while developing this change using Github Actions. I don't have a
Windows dev environment with Visual Studio so I can't finish this
change easily. Please feel free to complete this change if it makes
sense.
Note:
- On master, you can see the PDB file changing with llvm-pdbutil or a
simple checksum. There is an age field in the file that is bumped
- I'm not sure if users can specify compile flags on MSVC. If they
couldn't, maybe it's easier to change MJIT's compile options to
use /Z7 when building the precompile header.
- MJIT could pass different options at runtime to generate fewer
files. Right now it inherits the /DEBUG linker flag which causes
a PDB file to be generated at runtime even though /Z7 is used.
Relevant MSVC docs:
- [/Zi,/Z7](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-160)
- [/DEBUG](https://docs.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info?view=msvc-160)
- [/FS](https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=msvc-160)
Notes:
Merged: https://github.com/ruby/ruby/pull/5058
|
|
* Enhanced RDoc for Float#prev_float
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5107
|
|
MSP-Greg/ruby-setup-ruby@win-ucrt-1
Notes:
Merged: https://github.com/ruby/ruby/pull/5158
|
|
When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called
recursively inside the block, a crash can occur because of an
use-after-free bug.
https://github.com/ruby/zlib/commit/50fb8a0338
|
|
https://github.com/ruby/cgi/commit/c9c800715e
|
|
https://github.com/ruby/cgi/commit/052eb3a828
|