aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
Commit message (Collapse)AuthorAgeFilesLines
* * vm_core.h: rename macros and make them inline functions.ko12016-08-031-1/+1
| | | | | | | | * rename VM_FRAME_TYPE_FINISH_P() to VM_FRAME_FINISHED_P(). * rename VM_FRAME_TYPE_BMETHOD_P() to VM_FRAME_BMETHOD_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: introduce rb_vm_pop_frame() and use itko12016-07-261-1/+1
| | | | | | | | | | instead of setting rb_thread_t::cfp directly. * vm_insnhelper.c (vm_pop_frame): return the result of finish frame or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use TH_JUMP_TAGnobu2016-05-051-1/+1
| | | | | | | | * vm_eval.c (rb_eval_cmd, rb_catch_obj): use TH_JUMP_TAG with the same rb_thread_t used for TH_PUSH_TAG, instead of JUMP_TAG with the current thread global variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a cast to avoid signed integer overflow.akr2016-05-011-1/+1
| | | | | | | | | * vm_trace.c (recalc_remove_ruby_vm_event_flags): Add a cast to avoid signed integer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: Fix typos. [ci skip]yui-knk2016-04-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c: fix a typo in documentation.hsbt2015-12-141-1/+1
| | | | | | | | | | | | [ci skip][fix GH-1140] Patch by @jutaz * io.c: ditto. * iseq.c: ditto. * numeric.c: ditto. * process.c: ditto. * string.c: ditto. * vm_trace.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (exec_hooks_precheck): check need_clean everytimeko12015-11-071-6/+5
| | | | | | | | | | | to clean-up unused hooks. * vm_trace.c (list->need_clean): use as boolean value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_threadptr_exec_event_hooks_orig):ko12015-11-071-0/+2
| | | | | | | | | | | | maintain trace_running counter on internal events. This patch is made by Takashi Kokubun <takashikkbn@gmail.com>. [Bug #11603] https://github.com/ruby/ruby/pull/1059 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_source_loc and rb_source_locationnobu2015-10-311-2/+2
| | | | | | | | | * error.c, eval.c, eval_error.c, gc.c, variable.c, vm.c, vm_eval.c, vm_trace.c: use rb_source_loc/rb_source_location instead of combination of rb_sourcefile/rb_sourcefilename and rb_sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, cont.c, vm_trace.c: add a new eventko12015-08-211-0/+3
| | | | | | | | | | | fiber_switch. We need more discussion about this feature so that I don't write it on NEWS. [Feature #11348] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * make rb_iseq_t T_IMEMO object (type is imemo_iseq).ko12015-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All contents of previous rb_iseq_t is in rb_iseq_t::body. Remove rb_iseq_t::self because rb_iseq_t is an object. RubyVM::InstructionSequence is wrapper object points T_IMEMO/iseq. So RubyVM::ISeq.of(something) method returns different wrapper objects but they point the same T_IMEMO/iseq object. This patch is big, but most of difference is replacement of iseq->xxx to iseq->body->xxx. (previous) rb_iseq_t::compile_data is also located to rb_iseq_t::compile_data. It was moved from rb_iseq_body::compile_data. Now rb_iseq_t has empty two pointers. I will split rb_iseq_body data into static data and dynamic data. * compile.c: rename some functions/macros. Now, we don't need to separate iseq and iseqval (only VALUE). * eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq). * ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq. * gc.c: check T_IMEMO/iseq. * internal.h: add imemo_type::imemo_iseq. * iseq.c: define RubyVM::InstructionSequnce as T_OBJECT. Methods are implemented by functions named iseqw_.... * load.c (rb_load_internal0): rb_iseq_new_top() returns rb_iseq_t (T_IMEMO/iesq). * method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq). * vm_core.h (GetISeqPtr): removed because it is not T_DATA now. * vm_core.h (struct rb_iseq_body): remove padding for [Bug #10037][ruby-core:63721]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove redundant NULL check in mark functionsnormal2015-07-151-5/+3
| | | | | | | | | | | | | gc.c (gc_mark_children)only calls mark_func if the T_DATA ptr is non-NULL, so avoid redundantly checking for that in each mark function. * iseq.c (iseq_mark): remove check for data pointer * proc.c (binding_mark): ditto * vm.c (rb_thread_mark): ditto * vm_trace.c (tp_mark): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: unified a_call and a_returnnobu2015-04-251-2/+6
| | | | | | | * vm_trace.c (symbol2event_flag): use a uniform macro for a_call and a_return too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: not a static variablenobu2015-04-251-1/+1
| | | | | | | | * vm_trace.c (symbol2event_flag): should not be static but a mere local variable, so that unnecessary race condition does not happen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: indentnobu2015-04-251-1/+1
| | | | | | * vm_trace.c (thread_tracepoint): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: unnecessary method undefnobu2015-04-251-1/+0
| | | | | | | * vm_trace.c (Init_vm_trace): remove unnecessary method undef, that is overridden just after it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_tracepoint_new): fix documentation.ko12015-04-151-1/+1
| | | | | | | | Commented by @emilsoman. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_tracepoint_new): Add documentation forko12015-04-151-0/+30
| | | | | | | | | rb_tracepoint_new C level API [ci skip] Provided by @emilsoman. [fix GH-869] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: defer interrupts while postponed jobsnobu2014-12-131-3/+4
| | | | | | | | * vm_trace.c (rb_postponed_job_flush): mask signal trap interrupt too to defer handling after finalizers finished. [ruby-core:66825] [Bug #10595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: introduce new fieldko12014-12-101-1/+3
| | | | | | | | | | | | | | rb_thread_t::local_storage_recursive_hash_for_trace to store recursive hash to avoid creating new recursive (nested) hashes for each trace events. [Bug #10511] * vm_trace.c (rb_threadptr_exec_event_hooks_orig): use it. * cont.c: catch up this fix. * vm.c (rb_thread_mark): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use 0 for reservednobu2014-12-011-1/+1
| | | | | | | use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: add rb_thread_t::local_storage_recursive_hashko12014-11-271-2/+4
| | | | | | | | | | | | | | | | | to speed up Thread#[:__recursive_key__] access. [Bug #10511] * thread.c (threadptr_local_aref): add fast path for :__recursive_data__. * thread.c (threadptr_recursive_hash, threadptr_recursive_hash_set): add special accessor for recursive hash. * cont.c: store/restore local_storage_recursive_hash. * vm.c: init and mark local_storage_recursive_hash. * vm_trace.c (rb_threadptr_exec_event_hooks_orig): clear and restore local_storage_recursive_hash directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: Include ruby.h and ruby/encoding.h to beakr2014-11-151-3/+1
| | | | | | | | includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, proc.c, vm_backtrace.c, vm_trace.c:ktsj2014-10-181-1/+1
| | | | | | remove rb_binding_new_with_cfp, and use rb_vm_make_binding instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Avoid undefined behaviors found by gcc -fsanitize=undefined.akr2014-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | gcc (Debian 4.9.1-16) 4.9.1 * include/ruby/ruby.h (INT2FIX): Avoid undefined behavior. * node.h (nd_set_line): Ditto. * pack.c (encodes): Ditto. (pack_unpack): Ditto. * regint.h (BIT_STATUS_AT): Ditto. (BS_BIT): Ditto. * time.c (time_mdump): Ditto. (time_mload): Ditto. * vm_core.h (VM_FRAME_MAGIC_MASK): Ditto. * vm_trace.c (recalc_add_ruby_vm_event_flags): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c (rb_tp_t): pack 56 => 48 bytes on 64-bitnormal2014-10-021-1/+1
| | | | | | | 48 bytes is a common malloc size class on x86-64 machines which require 16-byte alignment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rlimit_resource_type, rlimit_resource_value):ktsj2014-07-301-1/+1
| | | | | | | | | | | | | | get rid of inadvertent dynamic symbol pin-down. * re.c (match_backref_number): ditto. * signal.c (esignal_init, rb_f_kill, trap_signm): ditto. * transcode.c (econv_opts): ditto. * vm_trace.c (symbol2event_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: add new method TracePoint.stat to debugko12014-06-131-0/+44
| | | | | | | | | | | | TracePoint mechanism. Ruby users should not use this method. So I don't note this method in the NEWS file. * test/runner.rb: detect zombie active TracePoints with TracePoint.stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: clear and restore recursive checking thread local datako12014-06-131-0/+2
| | | | | | | | | | | | | | to avoid unexpected throw from TracePoint. [Bug #9940] * test/ruby/test_settracefunc.rb: add a test. * thread.c: adde * rb_threadptr_reset_recursive_data(rb_thread_t *th); * rb_threadptr_restore_recursive_data(rb_thread_t *th, VALUE old); * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c, vm.c, thread.c: get rid of (maybe false positive) warnings aboutusa2014-05-291-1/+1
| | | | | | | using uninitialized var with VC++. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: remove rb_vm_living_threads_foreach functionnormal2014-05-281-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shorter code with fewer callbacks and casts should be more readable. * vm.c (rb_vm_living_threads_foreach): remove function [ruby-core:62745] * thread.c (terminate_i): remove * thread.c (terminate_all): implement (inlines old terminate_i) * thread.c (rb_thread_terminate_all): use terminate_all * thread.c (rb_thread_fd_close_i): remove * thread.c (rb_thread_fd_close): iterate inline * thread.c (thread_list_i): remove * thread.c (rb_thread_list): iterate inline * thread.c (rb_thread_atfork_internal): iterate inline * thread.c (terminate_atfork_i): update types to remove casts * thread.c (terminate_atfork_before_exec_i): ditto * thread.c (struct thgroup_list_params): remove definition * thread.c (thgroup_list_i): remove * thread.c (thgroup_list): iterate inline * thread.c (check_deadlock_i): remove * thread.c (debug_deadlock_check): implement (inlines check_deadlock_i) * thread.c (debug_i): remove * thread.c (rb_check_deadlock): iterate inline * vm.c (vm_mark_each_thread_func): remove * vm.c (rb_vm_mark): iterate inline * vm_core.h (rb_vm_living_threads_remove): remove * vm_trace.c (clear_trace_func_i): remove * vm_trace.c (rb_clear_trace_func): iterate inline git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm*: doubly-linked list from ccan to manage vm->living_threadsnormal2014-05-101-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A doubly-linked list for tracking living threads guarantees constant-time insert/delete performance with no corner cases of a hash table. I chose this ccan implementation of doubly-linked lists over the BSD sys/queue.h implementation since: 1) insertion and removal are both branchless 2) locality is improved if a struct may be a member of multiple lists (0002 patch in Feature 9632 will introduce a secondary list for waiting FDs) This also increases cache locality during iteration: improving performance in a new IO#close benchmark with many sleeping threads while still scanning the same number of threads. vm_thread_close 1.762 * vm_core.h (rb_vm_t): list_head and counter for living_threads (rb_thread_t): vmlt_node for living_threads linkage (rb_vm_living_threads_init): new function wrapper (rb_vm_living_threads_insert): ditto (rb_vm_living_threads_remove): ditto * vm.c (rb_vm_living_threads_foreach): new function wrapper * thread.c (terminate_i, thread_start_func_2, thread_create_core, thread_fd_close_i, thread_fd_close): update to use new APIs * vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct, vm_memsize, vm_init2, Init_VM): ditto * vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto * benchmark/bm_vm_thread_close.rb: added to show improvement * ccan/build_assert/build_assert.h: added as a dependency of list.h * ccan/check_type/check_type.h: ditto * ccan/container_of/container_of.h: ditto * ccan/licenses/BSD-MIT: ditto * ccan/licenses/CC0: ditto * ccan/str/str.h: ditto (stripped of unused macros) * ccan/list/list.h: ditto * common.mk: add CCAN_LIST_INCLUDES [ruby-core:61871][Feature 9632 (part 1)] Apologies for the size of this commit, but I think a good doubly-linked list will be useful for future features, too. This may be used to add ordering to a container_of-based hash table to preserve compatibility if required (e.g. feature 9614). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: fix typohsbt2014-01-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: isolate exceptionsnobu2013-12-171-0/+3
| | | | | | | | * vm_trace.c (rb_postponed_job_flush): isolate exceptions in postponed jobs and restore outer ones. based on a patch by tarui. [ruby-core:58652] [Bug #9168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_suppress_tracing): Fix initialization of stacktmm12013-12-041-0/+1
| | | | | | | | allocated rb_trace_arg_t structure. Without this patch, sometimes INTERNAL_EVENT_GC would be skipped accidentally inside rb_threadptr_exec_event_hooks_orig(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: skip "exception check" and "reentrant check (only normalko12013-11-261-51/+82
| | | | | | | | | events) for internal events. Reentrant check for internal events are remaining. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: prohibit to specify normal events and internal eventsko12013-11-261-1/+7
| | | | | | | | | | | simultaneously. I will introduce special care for internal events later. * ext/-test-/tracepoint/tracepoint.c: test this behavior. * test/-ext-/tracepoint/test_tracepoint.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (symbol2event_flag): add secret feature.ko12013-11-101-0/+2
| | | | | | | | | add a_call/a_return events. a_call is call | b_call | c_call, and same as a_return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: isolate errinfo in trace blocksnobu2013-11-071-0/+1
| | | | | | | | * vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not be propagated to trace blocks so that no argument raise does not throw internal objects. [ruby-dev:47793] [Bug #9088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko12013-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (tp_free): remvoed because empty free function.ko12013-10-291-7/+1
| | | | | | | | Use RUBY_TYPED_NEVER_FREE instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: exterminate Zombies.ko12013-10-221-20/+49
| | | | | | | | | | | | | | | | | | | | | | | There is a bug that T_ZOMBIE objects are not collected. Because there is a pass to miss finalizer postponed job with multi-threading. This patch solve this issue. * vm_trace.c (rb_postponed_job_register_one): set RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(th) if another same job is registered. There is a possibility to remain a postponed job without interrupt flag. * vm_trace.c (rb_postponed_job_register_one): check interrupt carefully. * vm_trace.c (rb_postponed_job_register_one): use additional space to avoid buffer full. * gc.c (gc_finalize_deferred_register): check failure. * thread.c (rb_threadptr_execute_interrupts): check `postponed_job_interrupt' immediately. There is a possibility to miss this flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush): fix bit operation.ko12013-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_postponed_job_flush): simplify.ko12013-10-111-39/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r43248. Should not set interrupt_flag.ko12013-10-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: use macronobu2013-10-101-1/+1
| | | | | | * vm_trace.c (rb_postponed_job_flush): use dedicated macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: suppress warningsnobu2013-10-101-6/+6
| | | | | | | * vm_trace.c (rb_postponed_job_flush): suppress clobbered variable warnings on some gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_trace.c: fix infinite hooknobu2013-10-101-11/+38
| | | | | | | | | | * thread.c (rb_threadptr_execute_interrupts): flush postponed job only once at last. * vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs registered while flushing to get rid of infinite reentrance of ObjectSpace.after_gc_start_hook. [ruby-dev:47400] [Bug #8492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (postponed_job): use preallocated buffer.ko12013-10-101-18/+49
| | | | | | | | | | | | | Pre-allocate MAX_POSTPONED_JOB (1024) sized buffer and use it. If rb_postponed_job_register() cause overflow, simply it fails and returns 0. And maybe rb_postponed_job_register() is signal safe. * vm_core.h: change data structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: [DOC] Fix TracePoint return values in exampleszzak2013-08-051-5/+5
| | | | | | | | Based on a patch by @sho-h [Fixes GH-373] https://github.com/ruby/ruby/pull/373 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e