path: root/vm_exec.c
AgeCommit message (Collapse)Author
2014-08-12* vm_exec.c: improve performance in ppc64 arch.hsbt
[ruby-core:63437] [Feature #9997] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14* vm_exec.c (cfp): Fixes a SEGV issue in r44554.yugui
r11 can be broken by subroutine and sometimes causes SEGV at runtime. Use r13 instead. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10* vm_exec.c (cfp): Avoid generating invalid binary foryugui
NativeClient. r15 on x86_64 is reserved by NativeClient. So r15 to cfp used to generate invalid binary under some combinations of compiler optimization flags. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.ko1
disable stack overflow check for every stack pushing as default. * vm_exec.c (vm_stack_overflow_for_insn): ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-18vm_core.h: extract VM_STACK_OVERFLOWED_Pnobu
* vm_core.h (VM_STACK_OVERFLOWED_P, WHEN_VM_STACK_OVERFLOWED): extract condition from CHECK_VM_STACK_OVERFLOW. * vm_exec.c (vm_stack_overflow_for_insn): move rb_bug call. * vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): share the condition with CHECK_VM_STACK_OVERFLOW. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18* vm_exec.c: Correct predefined macro name. This typo is introduced bynaruse
r36534 and should be backported to ruby_2_0_0. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-03* vm_exec.c: check VM_COLLECT_USAGE_DETAILS.ko1
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-03* vm_exec.c: vm_analysis_insn should be statkc.ko1
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-12* probes.d: add DTrace probe declarations. [ruby-core:27448]tenderlove
* array.c (empty_ary_alloc, ary_new): added array create DTrace probe. * compile.c (rb_insns_name): allowing DTrace probes to access instruction sequence name. * translate probes.d file to appropriate header file. * declare dependencies on the DTrace header. * add a test for existence of DTrace. * eval.c (setup_exception): add a probe for when an exception is raised. * gc.c: Add DTrace probes for mark begin and end, and sweep begin and end. * hash.c (empty_hash_alloc): Add a probe for hash allocation. * insns.def: Add probes for function entry and return. * internal.h: function declaration for compile.c change. * load.c (rb_f_load): add probes for `load` entry and exit, require entry and exit, and wrapping search_required for load path search. * object.c (rb_obj_alloc): added a probe for general object creation. * parse.y (yycompile0): added a probe around parse and compile phase. * string.c (empty_str_alloc, str_new): DTrace probes for string allocation. * test/dtrace/*: tests for DTrace probes. * vm.c (vm_invoke_proc): add probes for function return on exception raise, hash create, and instruction sequence execution. * vm_core.h: add probe declarations for function entry and exit. * vm_dump.c: add probes header file. * vm_eval.c (vm_call0_cfunc, vm_call0_cfunc_with_frame): add probe on function entry and return. * vm_exec.c: expose instruction number to instruction name function. * vm_insnshelper.c: add function entry and exit probes for cfunc methods. * vm_insnhelper.h: vm usage information is always collected, so uncomment the functions. 12 19:14:50 2012 Akinori MUSHA <> * (isinf, isnan): isinf() and isnan() are macros on DragonFly which cannot be found by AC_REPLACE_FUNCS(). This workaround enforces the fact that they exist on DragonFly. 12 15:59:38 2012 Shugo Maeda <> * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo), vm_insnhelper.c (vm_search_method): revert r37616 because it's too slow. [ruby-dev:46477] * test/ruby/test_refinement.rb (test_inline_method_cache): skip the test until the bug is fixed efficiently. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07* vm_exec.c, insns.def (leave): solve problems onko1
OPT_CALL_THREADED_CODE. Catch up finish frame structure on OPT_CALL_THREADED_CODE. * vm_core.h: add rb_thread_t#retval for temporary space on OPT_CALL_THREADED_CODE. * vm.c (th_init): clear rb_thread_t#retval as Qundef. * vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25Suppress warnings.naruse
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15* vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).ko1
Before this commit: `finish frame' was place holder which indicates that VM loop needs to return function. If a C method calls a Ruby methods (a method written by Ruby), then VM loop will be (re-)invoked. When the Ruby method returns, then also VM loop should be escaped. `finish frame' has only one instruction `finish', which returns VM loop function. VM loop function executes `finish' instruction, then VM loop function returns itself. With such mechanism, `leave' instruction (which returns one frame from current scope) doesn't need to check that this `leave' should also return from VM loop function. Strictly, one branch can be removed from `leave' instructon. Consideration: However, pushing the `finish frame' needs costs because it needs several memory accesses. The number of pushing `finish frame' is greater than I had assumed. Of course, pushing `finish frame' consumes additional control frame. Moreover, recent processors has good branch prediction, with which we can ignore such trivial checking. After this commit: Finally, I decide to remove `finish frame' and `finish' instruction. Some parts of VM depend on `finish frame', so the new frame flag VM_FRAME_FLAG_FINISH is introduced. If this frame should escape from VM function loop, then the result of VM_FRAME_TYPE_FINISH_P(cfp) is true. `leave' instruction checks this flag every time. I measured performance on it. However on my environments, it improves some benchmarks and slows some benchmarks down. Maybe it is because of C compiler optimization parameters. I'll re-visit here if this cause problems. * insns.def (leave, finish): remove finish instruction. * vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c: apply above changes. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31* vm_exec.c: remove conditions for clangnaruse
because clang version 3.0 (trunk 132165) doesn't need them. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23* include/ruby/intern.h: pcc can't use __builtin_constant_p.naruse
* vm_exec.c: change condition. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-07* vm_exec.c (vm_exec_core): Treat clang as non gcc on thisnaruse
context: It has __asm__ but doesn't works well. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-27* vm_exec.c (DECL_SC_REG): use __clang__.naruse
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-26* vm_exec.c (DECL_SC_REG): check defined(__asm__) before use it.naruse
LLVM/clang defines __GNUC__ but doesn't have __asm__.. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* vm.c: add a prefix "rb_" to exposed functionsko1
vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(), vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(), vm_get_sourceline(), vm_cref(), vm_localjump_error(), vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump(). This changes may affect only core because most of renamed functions require a pointer of not-exposed struct such as rb_thread_t or NODE. In short, they are core functions. * cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c, vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c: ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-14* README.EXT, README.EXT.ja, vm_exec.c, vm_insnhelper.c: updatemame
filenames. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28* vm_exec.c (vm_exec_core): add an UNLIKELY() hint.ko1
* vm_insnhelper.h (BASIC_OP_UNREDEFINED_P): add a LIKELY() hint. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* clean upko1
- remove blockinlining.$(OBJEXT) to built - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h) - make VM_CORE_H_INCLUDES variable (vm_core.h) - simplify rules. - make depends rule to output depend status using gcc -MM. * include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h. * include/ruby.h: ditto. * load.c: add inclusion explicitly. * enumerator.c, object.c, parse.y, thread.c, vm_dump.c: remove useless inclusion. * eval_intern.h: cleanup inclusion. * vm_core.h: rb_thread_t should be defined in this file. * vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c. * vm.h, vm_exec.h: rename vm.h to vm_exec.h. * insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h. * vm.c, vm_insnhelper.c, vm_insnhelper.h: - rename vm_eval() to vm_exec_core(). - rename vm_eval_body() to vm_exec(). - cleanup include order. * vm_method.c: fix comment. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e