mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add VM insns counter like debug_counter (#2789)
This commit is contained in:
parent
bf04fe086b
commit
a994b0aee7
Notes:
git
2019-12-28 17:44:33 +09:00
Merged-By: k0kubun <takashikkbn@gmail.com>
2 changed files with 36 additions and 1 deletions
|
@ -41,6 +41,10 @@ typedef rb_iseq_t *ISEQ;
|
|||
#define throwdebug if(0)printf
|
||||
/* #define throwdebug printf */
|
||||
|
||||
#ifndef USE_INSNS_COUNTER
|
||||
#define USE_INSNS_COUNTER 0
|
||||
#endif
|
||||
|
||||
/************************************************/
|
||||
#if defined(DISPATCH_XXX)
|
||||
error !
|
||||
|
@ -75,7 +79,8 @@ error !
|
|||
(reg_pc - reg_cfp->iseq->body->iseq_encoded), \
|
||||
(reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), \
|
||||
RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
|
||||
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded));
|
||||
rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); \
|
||||
if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
|
||||
|
||||
#define INSN_DISPATCH_SIG(insn)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue