ruby-changes:25741
From: kosaki <ko1@a...>
Date: Thu, 22 Nov 2012 17:02:04 +0900 (JST)
Subject: [ruby-changes:25741] kosaki:r37798 (trunk): * Makefile.in: run preprocessor when making probe.h
kosaki 2012-11-22 17:01:49 +0900 (Thu, 22 Nov 2012) New Revision: 37798 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37798 Log: * 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] Modified files: trunk/ChangeLog trunk/Makefile.in trunk/probes.d trunk/vm.c trunk/vm_core.h Index: ChangeLog =================================================================== --- ChangeLog (revision 37797) +++ ChangeLog (revision 37798) @@ -1,3 +1,9 @@ +Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@g...> + + * 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@g...> * vm.c: Don't define vm_collect_usage_operand() and Index: vm_core.h =================================================================== --- vm_core.h (revision 37797) +++ vm_core.h (revision 37798) @@ -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" Index: probes.d =================================================================== --- probes.d (revision 37797) +++ probes.d (revision 37798) @@ -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 @@ 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(); Index: Makefile.in =================================================================== --- Makefile.in (revision 37797) +++ Makefile.in (revision 37798) @@ -334,7 +334,7 @@ .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 Index: vm.c =================================================================== --- vm.c (revision 37797) +++ vm.c (revision 37798) @@ -63,10 +63,6 @@ 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/