| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch pushes dummy frames when loading code for the
profiling purpose.
The following methods push a dummy frame:
* `Kernel#require`
* `Kernel#load`
* `RubyVM::InstructionSequence.compile_file`
* `RubyVM::InstructionSequence.load_from_binary`
https://bugs.ruby-lang.org/issues/18559
|
|
|
|
| |
[Misc #18891]
|
|
|
|
|
|
|
|
|
|
|
| |
In the event that we are crashing due to a corrupt Ruby stack, we might
re-enter rb_vm_bugreport() due to failed assertions in
rb_backtrace_print_as_bugreport() or SDR(). In these cases we were
printing the bug report ad infinitum with unbounded recusion.
I seem to run into this every once in a while and the amount of log it
prints out is pretty distracting. On CI environments it makes the log
output unnecessarily big. Let's fix this.
|
|
|
|
|
|
|
|
|
| |
`NON_SCALAR_THREAD_ID` shows `pthread_t` is non-scalar (non-pointer)
and only s390x is known platform. However, the supporting code is
very complex and it is only used for deubg print information.
So this patch removes the support of `NON_SCALAR_THREAD_ID`
and make the code simple.
|
|
|
|
|
|
|
|
|
| |
`rb_thread_t` contained `native_thread_data_t` to represent
thread implementation dependent data. This patch separates
them and rename it `rb_native_thread` and point it from
`rb_thraed_t`.
Now, 1 Ruby thread (`rb_thread_t`) has 1 native thread (`rb_native_thread`).
|
|
|
| |
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
Use ISEQ_BODY macro to get the rb_iseq_constant_body of the ISeq. Using
this macro will make it easier for us to change the allocation strategy
of rb_iseq_constant_body when using Variable Width Allocation.
|
|
|
|
| |
[Feature #18483]
|
| |
|
|
|
|
| |
If we crash but the VM isn't fully alive, we can get an infinite loop.
|
|
|
|
|
|
| |
If we crash during GC, allocating new objects in the segv handler can
cause an infinite loop. This commit is to avoid creating new objects in
the crash handler
|
|
|
|
|
| |
because a SEGV might happen on an MJIT worker. As you can clearly see
from `if (vm && ec) {`, ec is not guaranteed to exist here.
|
|
|
|
|
|
|
| |
* HAVE_ macros should only be defined or undefined, not used for their value.
* See [Feature #17752]
Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
| |
Fixes [Bug #17615]
Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
|
|
|
|
|
|
| |
This reverts commit 6985bfb72c8d7e7d94f1aad1f0902b602bbfa6da.
Now it should work on riscv by the previous commit. [Bug #17609]
|
| |
|
| |
|
|
|
| |
* vm debug: dump registers on ARM too.
|
|
|
|
|
| |
An MJIT worker thread doesn't have ec, and it's required for SDR() and
rb_backtrace_print_as_bugreport(). Therefore it must be checked.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(obj)
* rb_ractor_std*()
* rb_cRactor
and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
(to avoid conflict with include/ruby/ractor.h)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature #17100] to see the implementation details
and discussions.
[Feature #17100]
This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.
I hope this feature can help programmers from thread-safety issues.
|
| |
|
|
|
|
| |
To fix build failures.
|
|
|
|
| |
This shall fix compile errors.
|
|
|
|
|
| |
Currently, objdump -W miniruby emits some errors on riscv, so I guess
that DWARF is corrupted.
|
|
|
|
| |
VMDEBUG is always defined as defaulted to 0 in vm_core.h.
|
|
|
| |
Since this commit (https://github.com/ruby/ruby/commit/9e1b06e17d27fb4ddf51e9244f205417e9c4dd5c), the VM Debug Level constant is moved from `vm_insnhelper.h` to `vm_core.h`. This PR is a super tiny update to reflect that change so that people won't waste time on searching in a wrong file.
|
|
|
| |
Split ruby.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch contains several ideas:
(1) Disposable inline method cache (IMC) for race-free inline method cache
* Making call-cache (CC) as a RVALUE (GC target object) and allocate new
CC on cache miss.
* This technique allows race-free access from parallel processing
elements like RCU.
(2) Introduce per-Class method cache (pCMC)
* Instead of fixed-size global method cache (GMC), pCMC allows flexible
cache size.
* Caching CCs reduces CC allocation and allow sharing CC's fast-path
between same call-info (CI) call-sites.
(3) Invalidate an inline method cache by invalidating corresponding method
entries (MEs)
* Instead of using class serials, we set "invalidated" flag for method
entry itself to represent cache invalidation.
* Compare with using class serials, the impact of method modification
(add/overwrite/delete) is small.
* Updating class serials invalidate all method caches of the class and
sub-classes.
* Proposed approach only invalidate the method cache of only one ME.
See [Feature #16614] for more details.
|
|
|
|
| |
Check RUBY_ON_BUG env val also on rb_assert_failure().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Saves comitters' daily life by avoid #include-ing everything from
internal.h to make each file do so instead. This would significantly
speed up incremental builds.
We take the following inclusion order in this changeset:
1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very
first thing among everything).
2. RUBY_EXTCONF_H if any.
3. Standard C headers, sorted alphabetically.
4. Other system headers, maybe guarded by #ifdef
5. Everything else, sorted alphabetically.
Exceptions are those win32-related headers, which tend not be self-
containing (headers have inclusion order dependencies).
|
|
|
|
| |
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
|
|
|
|
|
| |
control frame detailed info on RUBY_DEBUG=ci should also show
self information.
|
|
|
|
|
|
|
|
|
| |
Introduce new RUBY_DEBUG option 'ci' to inform Ruby interpreter
that an interpreter is running on CI environment.
With this option, `rb_bug()` shows more information includes
method entry information, local variables information for each
control frame.
|
| |
|
|
|
|
|
|
| |
displaying vm info as Linux and FreeBSD.
checking libproc as it is present only from 10.5 version.
https://github.com/ruby/ruby/pull/2384
|
| |
|
| |
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
c.f. https://github.com/mistydemeo/tigerbrew/issues/473
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
Revert r63968 and cast at caller side to prevent unintentional casting.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|