* 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:
kosaki 2012-11-22 08:01:49 +00:00
Родитель 82e7d00344
Коммит 4d7e8b7305
5 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -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>
* vm.c: Don't define vm_collect_usage_operand() and

Просмотреть файл

@ -334,7 +334,7 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
.d.h:
@$(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) $(RM) $@.tmp

Просмотреть файл

@ -1,3 +1,5 @@
#include "vm_core.h"
provider ruby {
probe function__entry(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__end(const char *, int);
#if VM_COLLECT_USAGE_DETAILS
probe insn(const char *);
probe insn__operand(const char *, const char *);
#endif
probe gc__mark__begin();
probe gc__mark__end();

4
vm.c
Просмотреть файл

@ -63,10 +63,6 @@ rb_vm_control_frame_block_ptr(rb_control_frame_t *cfp)
return VM_CF_BLOCK_PTR(cfp);
}
#ifndef VM_COLLECT_USAGE_DETAILS
#define VM_COLLECT_USAGE_DETAILS 0
#endif
#if VM_COLLECT_USAGE_DETAILS
static void vm_collect_usage_operand(int insn, int n, VALUE op);
static void vm_collect_usage_insn(int insn);

Просмотреть файл

@ -14,6 +14,10 @@
#define RUBY_VM_THREAD_MODEL 2
#ifndef VM_COLLECT_USAGE_DETAILS
#define VM_COLLECT_USAGE_DETAILS 0
#endif
#include "ruby/ruby.h"
#include "ruby/st.h"