summaryrefslogtreecommitdiff
path: root/vm_dump.c
AgeCommit message (Collapse)Author
2021-03-22vm dump display return address in the abscence of X30 in Mac ARM64.David CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/4243
2021-02-10vm_dump.c: Dump machine registers on RISC-V LinuxYusuke Endoh
Fixes [Bug #17615] Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
2021-02-04Revert "vm_dump.c: Do not show C backtrace on riscv"Yusuke Endoh
This reverts commit 6985bfb72c8d7e7d94f1aad1f0902b602bbfa6da. Now it should work on riscv by the previous commit. [Bug #17609]
2021-01-31vm_dump: dump registers for Mac M1David CARLIER
Notes: Merged: https://github.com/ruby/ruby/pull/4134
2021-01-13Removed excess stringizations on regstr [Bug #17532]Nobuyoshi Nakada
2020-12-16vm debug: dump registers on ARM too. (#3900)David CARLIER
* vm debug: dump registers on ARM too. Notes: Merged-By: nurse <naruse@airemix.jp>
2020-12-10Allow an MJIT worker to show a backtrace on SEGVTakashi Kokubun
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.
2020-12-02Loaded script is unset yet when crashed in the initialization phaseNobuyoshi Nakada
2020-11-18fix public interfaceKoichi Sasada
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) Notes: Merged: https://github.com/ruby/ruby/pull/3775
2020-09-03Introduce Ractor mechanism for parallel executionKoichi Sasada
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. Notes: Merged: https://github.com/ruby/ruby/pull/3365
2020-05-26Prefer configured printf format for mingw gcc 10Nobuyoshi Nakada
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-04-20vm_dump.c: Do not show C backtrace on riscvYusuke Endoh
Currently, objdump -W miniruby emits some errors on riscv, so I guess that DWARF is corrupted.
2020-04-19Removed useless VMDEBUG definition [ci skip]Nobuyoshi Nakada
VMDEBUG is always defined as defaulted to 0 in vm_core.h.
2020-04-19Update VMDEBUG reference doc [ci skip]Nguyễn Quang Minh
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. Notes: Merged: https://github.com/ruby/ruby/pull/3043 Merged-By: nobu <nobu@ruby-lang.org>
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-02-22Introduce disposable call-cache.Koichi Sasada
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. Notes: Merged: https://github.com/ruby/ruby/pull/2888
2020-01-06support RUBY_ON_BUG envval on assert failure.Koichi Sasada
Check RUBY_ON_BUG env val also on rb_assert_failure().
2019-12-27Get rid of LIST_HEAD conflict with a system header on macOSNobuyoshi Nakada
2019-12-26decouple internal.h headers卜部昌平
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). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-12show self on control frame dump.Koichi Sasada
control frame detailed info on RUBY_DEBUG=ci should also show self information.
2019-12-05add additional CF info for CI envKoichi Sasada
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.
2019-09-27Adjusted spaces [ci skip]Nobuyoshi Nakada
2019-08-19crash report on mac little updateDavid CARLIER
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
2019-08-09#include <> for system headersNobuyoshi Nakada
2019-06-19Remove IA64 support.Samuel Williams
2019-02-07Split procstat_vm.cnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07* expand tabs. [ci skip]svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07Add cast to suppress warnings on Solaris [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Support Mach-O on backtrace with DWARFnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-22Fix for old names of mcontext registersnobu
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
2018-07-15vm_core.h, vm_dump.c: fix castktsj
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
2018-07-15vm_dump.c: fix warning about constnessktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-03delete extra #undef [ci skip]shyouhei
Sorry, this was a garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02"%z" printf format specifier is a C99ismshyouhei
PRIxSIZE is also. But shimmed in ruby.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02explicit cast to void* required for %pshyouhei
These functions take variadic arguments so no automatic type promotion is expected. You have to do it by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07vm_dump.c: [DOC] fix grammarstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29* vm_dump.c (vm_stack_dump_each): accepts `ec`.ko1
* vm_dump.c (vm_base_ptr): constify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29use `GET_VM()` directly.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29`th` -> `ec` for VM dump related functions.ko1
* vm_dump.c: `th` -> `ec` (and constify) for: * control_frame_dump * rb_vmdebug_stack_dump_raw * rb_vmdebug_debug_print_register * rb_vmdebug_debug_print_pre * rb_vmdebug_debug_print_post git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-26Use rb_execution_context_t instead of rb_thread_tko1
to represent execution context [Feature #14038] * vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer. There are many code using `th` to represent execution context (such as cfp, VM stack and so on). To access `ec`, they need to use `th->ec->...` (adding one indirection) so that we need to replace them by passing `ec` instead of `th`. * vm_core.h (GET_EC()): introduced to access current ec. Also remove `ruby_current_thread` global variable. * cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of rb_context_t::thread_value. * cont.c (ec_set_vm_stack): added to update vm_stack explicitly. * cont.c (ec_switch): added to switch ec explicitly. * cont.c (rb_fiber_close): added to terminate fibers explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-15Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14fix the case High Sierra's mincore(2) may return -128 [Bug #13895]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-06Fixed compilationn error with VMDEBUG=3.hsbt
[fix GH-1690] Patch from @musaprg(Kotaro Inoue) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-01Fix C level backtrace on Darwinnaruse
SEGV caused by invalid instruction call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-10rename rb_execution_context_t::stack(_size) to vm_stack(_size).ko1
* vm_core.h: Ruby processes run with two stacks, a machine stack and a VM stack. To make it clear, this fix renames rb_execution_context_t::stack(_size) to vm_stack(_size). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-28introduce rb_thread_ptr() to replace GetThreadPtr().ko1
* vm_core.h (rb_thread_ptr): added to replace GetThreadPtr() macro. * thread.c (in some functions: use "target_th" instead of "th" to make clear that it is not a current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-03* vm_core.h: remove VM_FRAME_MAGIC_LAMBDA and introduceko1
VM_FRAME_FLAG_LAMBDA. So that lambda block frame is VM_FRAME_MAGIC_BLOCK | VM_FRAME_FLAG_LAMBDA. * vm_core.h: remvoe VM_FRAME_MAGIC_PROC because nobody uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e