summaryrefslogtreecommitdiff
path: root/vm_trace.c
AgeCommit message (Collapse)Author
2021-11-24merge revision(s) ↵nagachika
e1b03b0c2b2449a7794f4701bab8b2382eb15116,007e439fe965871c73127928f7244ebb96a86e58: Enable VM_ASSERT in --jit CIs (#4543) --- .github/workflows/mjit.yml | 2 +- ractor.c | 6 +++--- vm_core.h | 6 +++--- vm_method.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) Do not expect ec on rb_vm_bugreport 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. --- vm_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2021-11-23merge revision(s) ↵nagachika
5680c38c75aeb5cbd219aafa8eb48c315f287d97,f5d20411386ff2552ff27661387ddc4bae1ebc30: [Backport #17573] Use valid `ec` for postponed job. Postponed job can be registered from non-Ruby thread, which means `ec` in TLS can be NULL. In this case, use main thread's `ec` instead. See https://github.com/ruby/ruby/pull/4108 and https://github.com/ruby/ruby/pull/4336 --- vm_trace.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) Avoid assert failure when NULL EC is expected After 5680c38c75aeb5cbd219aafa8eb48c315f287d97, postponed job APIs now expect to be called on native threads not managed by Ruby and handles getting a NULL execution context. However, in debug builds the change runs into an assertion failure with GET_EC() which asserts that EC is non-NULL. Avoid the assertion failure by passing `false` for `expect_ec` instead as the intention is to handle when there is no EC. Add a test from John Crepezzi and John Hawthorn to exercise this situation. See GH-4108 See GH-5094 [Bug #17573] Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Crepezzi <john.crepezzi@gmail.com> --- ext/-test-/postponed_job/postponed_job.c | 31 ++++++++++++++++++++++++++ test/-ext-/postponed_job/test_postponed_job.rb | 7 ++++++ vm_trace.c | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-)
2021-11-06merge revision(s) a4d5ee4f31bf3ff36c1a8c8fe3cda16aa1016b12: [Backport #18264]nagachika
[Bug #18264] Fix memory leak in TracePoint TracePoint leaks memory because it allocates a `rb_tp_t` struct without ever freeing it (it is created with `RUBY_TYPED_NEVER_FREE`). --- test/ruby/test_settracefunc.rb | 10 ++++++++++ vm_trace.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-)
2020-12-22separate rb_ractor_pub from rb_ractor_tKoichi Sasada
separate some fields from rb_ractor_t to rb_ractor_pub and put it at the beggining of rb_ractor_t and declare it in vm_core.h so vm_core.h can access rb_ractor_pub fields. Now rb_ec_ractor_hooks() is a complete inline function and no MJIT related issue. Notes: Merged: https://github.com/ruby/ruby/pull/3943
2020-12-22TracePoint.new(&block) should be ractor-localKoichi Sasada
TracePoint should be ractor-local because the Proc can violate the Ractor-safe. Notes: Merged: https://github.com/ruby/ruby/pull/3943
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-08-06[Feature #16513] TracePoint#inspect returns "... file:line" (#3391)Nguyễn Quang Minh
* Fix debug documents to match Thread#to_s change (Feature #16412 ticket) * TracePoint#inspect returns "... file:line" (Feature #16513) * Guard older version of Ruby in Tracepoint inspection tests * Focus on current thread only when running TracePoint inspection test Notes: Merged-By: ko1 <ko1@atdot.net>
2020-06-29tracepoint_inspect: do not goto into a branch卜部昌平
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor. Notes: Merged: https://github.com/ruby/ruby/pull/3247
2020-03-29Clear all trace events during teardownAlan Wu
Since 0c2d81dada, not all trace events are cleared during VM teardown. This causes a crash when there is a tracepoint for `RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown. The commit looks like a refactoring commit so I think this change was unintentional. [Bug #16682] Notes: Merged: https://github.com/ruby/ruby/pull/2959
2020-02-06rb_vm_t::postponed_job_index shall be rb_atomic_t卜部昌平
Pointer to this field is passed to ATOMIC_CAS. We have to use rb_atomic_t for that purpose. Notes: Merged: https://github.com/ruby/ruby/pull/2885
2019-12-29Separate builtin initialization callsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2792
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-11-08Renamed `load_*.inc` as `*.rbinc` to utilize a suffix ruleNobuyoshi Nakada
2019-11-08use builtin for TracePoint.Koichi Sasada
Define TracePoint in trace_point.rb and use __builtin_ syntax. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-08-13Renamed ruby_finalize_{0,1}Nobuyoshi Nakada
And pass rb_execution_context_t as an argument.
2019-07-24should not free local hook_list here.Koichi Sasada
exec_hooks_postcheck() clean executed hook_list if it is needed. list_exec is freed if there are no events and this list is local event (connected to specific iseq). However, iseq keeps to point this local hook_list, freed list. To prevent this situation, do not free hook_list here even if it has no events. This issue is reported by @joker1007. https://twitter.com/joker1007/status/1153649170797830144
2019-06-08Suppress warnings by gcc 9.1Nobuyoshi Nakada
2019-03-27Fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-20vm_trace.c: [DOC] remove the trick [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-20Improve TracePoint docs.hsbt
* Mention new :script_compiled event; * Deduplicate __enable/enable methods; * Document target: and target_line: arguments. [Bug #15484][ruby-core:90801] Co-authored-by: zverok <zverok.offline@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01vm_trace.c: trick rdoc for TracePoint#enablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29`TracePoint#enable(target_thraed:)` [Feature #15473]ko1
* vm_trace.c (tracepoint_enable_m): `TracePoint#enable` supports `target_thread:` keyword to filter a target thread. [Feature #15473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12remove `compiled_` prefix. [Feature #15287]ko1
* vm_trace.c: remove `compiled_` prefix from the following methods: * `compiled_eval_script` * `compiled_instruction_sequence` [Feature #15287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-06* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-06`script_compiled` TracePoint event [Feature #15287]ko1
* vm_trace.c: add `script_compiled` event. This event invoked after script compiling and before evaluating compiled script. Also the following methods are added: `TracePoint#compiled_instruction_sequence` method to get compiled `RubyVM::InstructionSequence` instance. `TracePoint#compiled_eval_script` method to get compiled script (String) by *eval methods (return nil if compiling by file). * vm_trace.c (tracepoint_attr_raised_exception): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-30vm_trace.c: workqueue as thread-safe version of postponed_jobnormal
postponed_job is safe to use in signal handlers, but is not thread-safe for MJIT. Implement a workqueue for MJIT thread-safety. [Bug #15316] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26`TracePoint#enable(target_line:)` is supported. [Feature #15289]ko1
* vm_trace.c: `TracePoint#enable(target_line:)` is supported. This option enables a hook only at specified target_line. target_line should be combination with target and :line event. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26Support targetting TracePoint [Feature #15289]ko1
* vm_trace.c (rb_tracepoint_enable_for_target): support targetting TracePoint. [Feature #15289] Tragetting TracePoint is only enabled on specified method, proc and so on, example: `tp.enable(target: code)`. `code` should be consisted of InstructionSeuqnece (iseq) (RubyVM::InstructionSeuqnece.of(code) should not return nil) If code is a tree of iseq, TracePoint is enabled on all of iseqs in a tree. Enabled tragetting TracePoints can not enabled again with and without target. * vm_core.h (rb_iseq_t): introduce `rb_iseq_t::local_hooks` to store local hooks. `rb_iseq_t::aux::trace_events` is renamed to `global_trace_events` to contrast with `local_hooks`. * vm_core.h (rb_hook_list_t): add `rb_hook_list_t::running` to represent how many Threads/Fibers are used this list. If this field is 0, nobody using this hooks and we can delete it. This is why we can remove code from cont.c. * vm_core.h (rb_vm_t): because of above change, we can eliminate `rb_vm_t::trace_running` field. Also renamed from `rb_vm_t::event_hooks` to `global_hooks`. * vm_core.h, vm.c (ruby_vm_event_enabled_global_flags): renamed from `ruby_vm_event_enabled_flags. * vm_core.h, vm.c (ruby_vm_event_local_num): added to count enabled targetting TracePoints. * vm_core.h, vm_trace.c (rb_exec_event_hooks): accepts hook list. * vm_core.h (rb_vm_global_hooks): added for convinience. * method.h (rb_method_bmethod_t): added to maintain Proc and `rb_hook_list_t` for bmethod (defined by define_method). * prelude.rb (TracePoint#enable): extracet a keyword parameter (because it is easy than writing in C). It calls `TracePoint#__enable` internal method written in C. * vm_insnhelper.c (vm_trace): check also iseq->local_hooks. * vm.c (invoke_bmethod): check def->body.bmethod.hooks. * vm.c (hook_before_rewind): check iseq->local_hooks and def->body.bmethod.hooks before rewind by exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26vm_trace.c: MJIT-limited thread-safety for postponed_jobk0kubun
[Bug #15316] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18vm_trace.c (rb_postponed_job_flush): use rb_atomic_t for masknormal
ec->interrupt_mask will remain rb_atomic_t and is 32-bit on some 64-bit systems while "unsigned long" is 64-bits. So avoid mismatching lengths and stick to rb_atomic_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-08initialize VM postponed_job first. [Bug #15288]ko1
* inits.c: call `Init_vm_postponed_job` first because postponed_job is used by transient heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-23Revert "vm_trace: implement postponed_jobs as st_table"normal
This reverts commit 5a1dfb04bc2b09fcf8f3427cac72d0ce52a45eb2 (r63451) And mark the functions as async-signal-safe while we're at it to prevent future developers from making the same mistake as I did :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20add disabling MJIT features option.ko1
* configure.ac: introduce new configure option `--enable-mjit` and `--disable-mjit`. Default is "enable". `--disable-mjit` disables all of MJIT features so that `ruby --jit` can't enable MJIT. This option affect a macro `USE_MJIT`. This change remove `--enable/disable-install-mjit-header` option. * Makefile.in: introduce the `ENABLE_MJIT` variable. * common.mk: use `ENABLE_MJIT` option. * internal.h: respect `USE_MJIT`. Same as other *.c, *.h. * test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23mjit.c: disable calling JIT-ed codek0kubun
when TracePoint is enabled. We're cancelling JIT-ed code execution AFTER each instruction, but there is no guard before the first insn of method. To prevent spoiling performance, I don't want to modify the JIT-ed code to fix this. So this commit replaces `mjit_enabled` check with `mjit_call_p` check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03Add TracePoint#parametersmame
It can be used to get the parameters' information of method and block. There was no way to get block parameters. It was possible but ineffective to get method parameters via Method object: `tp.defined_class.method(tp.method_id).parameters` TracePoint#parameters allows us to get the information easily. [Feature #14694] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17vm_trace: implement postponed_jobs as st_tablenormal
st_table allows the use of st_shift to act as an order-preserving queue while allowing fast lookups to prevent duplicate jobs. In typical Ruby apps, this table will only have one entry for gc_finalize_deferred_register. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17vm_trace: remove rb_postponed_job_t->flagsnormal
This field has been taking up space for 5 years and never used. Save 8kb of memory on x86-64 for now. If we ever care about this flag, we'll simply re-add it. * vm_trace.c (rb_postponed_job_struct): remove flags (postponed_job_register): comment out flags assignment [ruby-core:87052] [Misc #14764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17vm_trace.c: spelling fix: PJRR_SUCESS => PJRR_SUCCESSnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04mjit_compile.c: merge initial JIT compilerk0kubun
which has been developed by Takashi Kokubun <takashikkbn@gmail> as YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>. This JIT compiler is designed to be a safe migration path to introduce JIT compiler to MRI. So this commit does not include any bytecode changes or dynamic instruction modifications, which are done in original MJIT. This commit even strips off some aggressive optimizations from YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still fairly faster than Ruby 2.5 in some benchmarks (attached below). Note that this JIT compiler passes `make test`, `make test-all`, `make test-spec` without JIT, and even with JIT. Not only it's perfectly safe with JIT disabled because it does not replace VM instructions unlike MJIT, but also with JIT enabled it stably runs Ruby applications including Rails applications. I'm expecting this version as just "initial" JIT compiler. I have many optimization ideas which are skipped for initial merging, and you may easily replace this JIT compiler with a faster one by just replacing mjit_compile.c. `mjit_compile` interface is designed for the purpose. common.mk: update dependencies for mjit_compile.c. internal.h: declare `rb_vm_insn_addr2insn` for MJIT. vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to compiler. This avoids to include some functions which take a long time to compile, e.g. vm_exec_core. Some of the purpose is achieved in transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are manually resolved for now. Load mjit_helper.h for MJIT header. mjit_helper.h: New. This is a file used only by JIT-ed code. I'll refactor `mjit_call_cfunc` later. vm_eval.c: add some #ifdef switches to skip compiling some functions like Init_vm_eval. win32/mkexports.rb: export thread/ec functions, which are used by MJIT. include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify that a function is exported only for MJIT. array.c: export a function used by MJIT. bignum.c: ditto. class.c: ditto. compile.c: ditto. error.c: ditto. gc.c: ditto. hash.c: ditto. iseq.c: ditto. numeric.c: ditto. object.c: ditto. proc.c: ditto. re.c: ditto. st.c: ditto. string.c: ditto. thread.c: ditto. variable.c: ditto. vm_backtrace.c: ditto. vm_insnhelper.c: ditto. vm_method.c: ditto. I would like to improve maintainability of function exports, but I believe this way is acceptable as initial merging if we clarify the new exports are for MJIT (so that we can use them as TODO list to fix) and add unit tests to detect unresolved symbols. I'll add unit tests of JIT compilations in succeeding commits. Author: Takashi Kokubun <takashikkbn@gmail.com> Contributor: wanabe <s.wanabe@gmail.com> Part of [Feature #14235] --- * Known issues * Code generated by gcc is faster than clang. The benchmark may be worse in macOS. Following benchmark result is provided by gcc w/ Linux. * Performance is decreased when Google Chrome is running * JIT can work on MinGW, but it doesn't improve performance at least in short running benchmark. * Currently it doesn't perform well with Rails. We'll try to fix this before release. --- * Benchmark reslts Benchmarked with: Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores - 2.0.0-p0: Ruby 2.0.0-p0 - r62186: Ruby trunk (early 2.6.0), before MJIT changes - JIT off: On this commit, but without `--jit` option - JIT on: On this commit, and with `--jit` option ** Optcarrot fps Benchmark: https://github.com/mame/optcarrot | |2.0.0-p0 |r62186 |JIT off |JIT on | |:--------|:--------|:--------|:--------|:--------| |fps |37.32 |51.46 |51.31 |58.88 | |vs 2.0.0 |1.00x |1.38x |1.37x |1.58x | ** MJIT benchmarks Benchmark: https://github.com/benchmark-driver/mjit-benchmarks (Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks) | |2.0.0-p0 |r62186 |JIT off |JIT on | |:----------|:--------|:--------|:--------|:--------| |aread |1.00 |1.09 |1.07 |2.19 | |aref |1.00 |1.13 |1.11 |2.22 | |aset |1.00 |1.50 |1.45 |2.64 | |awrite |1.00 |1.17 |1.13 |2.20 | |call |1.00 |1.29 |1.26 |2.02 | |const2 |1.00 |1.10 |1.10 |2.19 | |const |1.00 |1.11 |1.10 |2.19 | |fannk |1.00 |1.04 |1.02 |1.00 | |fib |1.00 |1.32 |1.31 |1.84 | |ivread |1.00 |1.13 |1.12 |2.43 | |ivwrite |1.00 |1.23 |1.21 |2.40 | |mandelbrot |1.00 |1.13 |1.16 |1.28 | |meteor |1.00 |2.97 |2.92 |3.17 | |nbody |1.00 |1.17 |1.15 |1.49 | |nest-ntimes|1.00 |1.22 |1.20 |1.39 | |nest-while |1.00 |1.10 |1.10 |1.37 | |norm |1.00 |1.18 |1.16 |1.24 | |nsvb |1.00 |1.16 |1.16 |1.17 | |red-black |1.00 |1.02 |0.99 |1.12 | |sieve |1.00 |1.30 |1.28 |1.62 | |trees |1.00 |1.14 |1.13 |1.19 | |while |1.00 |1.12 |1.11 |2.41 | ** Discourse's script/bench.rb Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb NOTE: Rails performance was somehow a little degraded with JIT for now. We should fix this. (At least I know opt_aref is performing badly in JIT and I have an idea to fix it. Please wait for the fix.) *** JIT off Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 17 75: 18 90: 22 99: 29 home_admin: 50: 21 75: 21 90: 27 99: 40 topic_admin: 50: 17 75: 18 90: 22 99: 32 categories: 50: 35 75: 41 90: 43 99: 77 home: 50: 39 75: 46 90: 49 99: 95 topic: 50: 46 75: 52 90: 56 99: 101 *** JIT on Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 19 75: 21 90: 25 99: 33 home_admin: 50: 24 75: 26 90: 30 99: 35 topic_admin: 50: 19 75: 20 90: 25 99: 30 categories: 50: 40 75: 44 90: 48 99: 76 home: 50: 42 75: 48 90: 51 99: 89 topic: 50: 49 75: 55 90: 58 99: 99 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31Fix wrong function names in rb_bug messages [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11do not disable `trace_` prefix insns.ko1
* vm.c: introduce `ruby_vm_event_enabled_flags` which represents which event flags are enabled before. * vm_trace.c: do not turn off `trace_` prefix instructions because turn on overhead is a matter if a program repeats turn on and turn off frequently. * iseq.c (finish_iseq_build): respect `ruby_vm_event_enabled_flags`. * vm_insnhelper.c (vm_trace): check `ruby_vm_event_flags` and disable lazy trace-off technique (do not disable traces). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06Remove RUBY_EVENT_SPECIFIED_LINEmame
Follow up of r61044 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06fix last commitko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06remove unsupported RUBY_EVENT_SPECIFIED_LINE.ko1
* vm_trace.c (get_event_id): remove experimental in past, and not supported now feature. * vm_trace.c (tracepoint_inspect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06remove `PUSH_TAG`/`EXEC_AG`/`POP_TAG`/`JUMO_TAG`.ko1
* eval_intern.h: remove non-`EC_` prefix *_TAG() macros. Use `EC_` prefix macros explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01vm_trace.c: suppress -Wclobbered warningnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01vm_trace.c: remove duplicate flagnobu
* vm_trace.c (rb_suppress_tracing): remove duplicate flag `tracing`, which equals to `ec->trace_arg != NULL`. and that `ec->trace_arg` points `dummy_trace_arg` means it was NULL at the beginning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18introduce `trace_events' info for iseq.ko1
* vm_core.h (rb_iseq_t::aux): add `trace_events` which represents which events are enabled on this iseq. With this information, we can skip useless trace-on changes for ISeqs. * vm_trace.c (RUBY_EVENTS_TRACE_BY_ISEQ): moved to iseq.h and rename it with ISEQ_TRACE_EVENTS. * iseq.h: introduce ISEQ_USE_COMPILE_DATA iseq (imemo) flag to represent COMPILE_DATA is available. In other words, iseq->aux.trace_events is not available when this flag is set. * ISEQ_COMPILE_DATA() is changed from a macro. * ISEQ_COMPILE_DATA_ALLOC() is added. * ISEQ_COMPILE_DATA_CLEAR() is added. * iseq.c: use them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e