mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Makefile.in: run preprocessor when making probe.h
* probes.d: define probe insn and insn__operand only when VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82e7d00344
commit
4d7e8b7305
5 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* Makefile.in: run preprocessor when making probe.h
|
||||||
|
* probes.d: define probe insn and insn__operand only when
|
||||||
|
VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370]
|
||||||
|
|
||||||
Thu Nov 22 16:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Thu Nov 22 16:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* vm.c: Don't define vm_collect_usage_operand() and
|
* vm.c: Don't define vm_collect_usage_operand() and
|
||||||
|
|
|
@ -334,7 +334,7 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
|
||||||
|
|
||||||
.d.h:
|
.d.h:
|
||||||
@$(ECHO) translating probes $<
|
@$(ECHO) translating probes $<
|
||||||
$(Q) $(DTRACE) -o $@.tmp -h -s $<
|
$(Q) $(DTRACE) -o $@.tmp -h -C $(INCFLAGS) -s $<
|
||||||
$(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' $@.tmp > $@
|
$(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' $@.tmp > $@
|
||||||
$(Q) $(RM) $@.tmp
|
$(Q) $(RM) $@.tmp
|
||||||
|
|
||||||
|
|
4
probes.d
4
probes.d
|
@ -1,3 +1,5 @@
|
||||||
|
#include "vm_core.h"
|
||||||
|
|
||||||
provider ruby {
|
provider ruby {
|
||||||
probe function__entry(const char *, const char *, const char *, int);
|
probe function__entry(const char *, const char *, const char *, int);
|
||||||
probe function__return(const char *, const char *, const char *, int);
|
probe function__return(const char *, const char *, const char *, int);
|
||||||
|
@ -21,8 +23,10 @@ provider ruby {
|
||||||
probe parse__begin(const char *, int);
|
probe parse__begin(const char *, int);
|
||||||
probe parse__end(const char *, int);
|
probe parse__end(const char *, int);
|
||||||
|
|
||||||
|
#if VM_COLLECT_USAGE_DETAILS
|
||||||
probe insn(const char *);
|
probe insn(const char *);
|
||||||
probe insn__operand(const char *, const char *);
|
probe insn__operand(const char *, const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
probe gc__mark__begin();
|
probe gc__mark__begin();
|
||||||
probe gc__mark__end();
|
probe gc__mark__end();
|
||||||
|
|
4
vm.c
4
vm.c
|
@ -63,10 +63,6 @@ rb_vm_control_frame_block_ptr(rb_control_frame_t *cfp)
|
||||||
return VM_CF_BLOCK_PTR(cfp);
|
return VM_CF_BLOCK_PTR(cfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VM_COLLECT_USAGE_DETAILS
|
|
||||||
#define VM_COLLECT_USAGE_DETAILS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if VM_COLLECT_USAGE_DETAILS
|
#if VM_COLLECT_USAGE_DETAILS
|
||||||
static void vm_collect_usage_operand(int insn, int n, VALUE op);
|
static void vm_collect_usage_operand(int insn, int n, VALUE op);
|
||||||
static void vm_collect_usage_insn(int insn);
|
static void vm_collect_usage_insn(int insn);
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
|
|
||||||
#define RUBY_VM_THREAD_MODEL 2
|
#define RUBY_VM_THREAD_MODEL 2
|
||||||
|
|
||||||
|
#ifndef VM_COLLECT_USAGE_DETAILS
|
||||||
|
#define VM_COLLECT_USAGE_DETAILS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ruby/ruby.h"
|
#include "ruby/ruby.h"
|
||||||
#include "ruby/st.h"
|
#include "ruby/st.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue