1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool
yugui 72b199940d * trace.h: new file. wraps tracing mechanisms.
* defs/dtrace.d: new file. defined a dtrace provider "ruby".

* include/ruby/ruby.h (LIKELY): moved from vm.c.
  (UNLIKELY): ditto.
  (OBJSETUP): probe "object-create".
  (RUBY_EVENT_RESCUE): new event.

* vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it.
  (DEBUG_END_INSN): insn-return.

* vm.c (LIKELY): moved into ruby.h.
  (UNLIKELY): ditto.
  (Init_BareVM): embeded a probe "raise" into it.

* variable.c (rb_class2name_without_alloc): new utility function.

* tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs 
  dtrace.d if necessary.

* thread_pthread.c (add_signal_thread_list): probe "raise".
  (rb_thread_create_timer_thread): ditto.

* thread.c (rb_thread_schedule_rec): probes "thread-enter" and
  "thread-leave",
  (thread_start_func_2): ditto.
  (thread_cleanup_func): probe "thread-term"

* lib/mkmf.rb: supports dtrace postprocessor on making an extension.

* iseq.c (rb_vm_insn_name): new utility function.
  (rb_vm_insn_len): ditto.

* insns.def (hook): probes "method-etnry", "method-return", "line",
  and "rescue".

* compile.c (iseq_compile_each): adds a trace op for "rescue" probe.

* gc.c (garbage_collect): probes "gc-begin" and "gc-end".
  (obj_free): probe "object-free"
  (garbage_collect_with_gvl): probe "raise"
  (negative_size_allocation_error): ditto.
  (rb_memerror): ditto.

* eval.c (rb_rescue2): probe "rescue"
  (rb_longjmp): probe "raise"

* ext/probe/probe.c: new extension for application defined probes.

* ext/probe/extconf.rb: ditto.

* configure.in (--with-tracing-model): new option to choose a tracing
  mechanism.
  (DTRACE): new substitution. name of dtrace(1).
  (RUBY_TRACING_MODEL): new substitution.
  (DTRACE_OBJ): ditto.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on 
  the system needs postprocessing.
  (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace
  supports USDT.

* Makefile.in: 
  (DTRACE): new variable. name of dtrace(1).
  (TRACING_MODEL): new variable. name of the chosen tracing mechanism.
  (DTRACE_OBJ): same as the one in configure.in.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (CPPOUTFILE): new substitution. necessary for generating dtrace.d
  (trace_none.h): new target for TRACING_MODEL=none
  (RUBY_H_INCLUDES): appended a header for tracing.
  (distclean-local): also removes preprocessed version of dtrace.d
  ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs 
  postprocessing.
  ($(PROGRAM)): ditto.
  (golf): ditto.
  (miniruby): ditto.
  ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson 
  of defs/dtrace.d. generated if necessary.
  ($(arch_hdrdir)/ruby/trace_dtrace.h): new target.
  definition of probes.
  ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs 
  postprocessing.
  ($(DTRACE_OBJ)): ditto.
  ($(MINIDTRACE_OBJ)): ditto.
  ($(GOLFDTRACE_OBJ)): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03 15:36:17 +00:00
..
asm_parse.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
build-transcode * enc/trans/iso2022.trans: renamed from iso2022.erb.c. 2008-08-11 07:39:52 +00:00
compile_prelude.rb * tool/compile_prelude.rb: reverted. 2009-09-08 12:41:05 +00:00
config.guess * tool/config.{guess,sub}: updated to automake-1.11. 2009-09-11 02:33:32 +00:00
config.sub * tool/config.{guess,sub}: updated to automake-1.11. 2009-09-11 02:33:32 +00:00
enc-unicode.rb * tool/enc-unicode.rb, 2009-10-14 16:51:52 +00:00
eval.rb * tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb. 2009-12-31 15:00:04 +00:00
file2lastrev.rb * tool/file2lastrev.rb: executable. 2009-09-01 01:09:31 +00:00
generic_erb.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
ifchange Fix: raised error on tool/ifchange. 2009-05-05 02:33:02 +00:00
insns2vm.rb * tool/insns2vm.rb: remove -Kn option in shebang line because it's 2008-10-17 01:30:13 +00:00
install-sh * tool/install-sh: correction by Hiro Asari. 2009-12-28 08:21:30 +00:00
instruction.rb * tool/instruction.rb (make_header_prepare_stack): check stack 2009-09-23 02:28:08 +00:00
make-snapshot * tool/make-snapshot (package): creates .revision.time and passes 2009-03-17 12:42:56 +00:00
mdoc2man.rb * configure.in ($MANTYPE): followed ruby.1, which had moved. 2008-10-25 17:20:05 +00:00
mkconfig.rb * tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb. 2009-12-31 15:00:04 +00:00
node_name.rb
parse.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
rbinstall.rb * trace.h: new file. wraps tracing mechanisms. 2010-01-03 15:36:17 +00:00
rmdirs * Makefile.in, win32/Makefile.sub (RMDIRS): remove directory and 2009-01-25 02:06:29 +00:00
rubytest.rb * instruby.rb: moved into tool/. 2009-05-22 11:48:42 +00:00
runruby.rb * instruby.rb: moved into tool/. 2009-05-22 11:48:42 +00:00
strip-rdoc.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
transcode-tblgen.rb * transcode_data.h, transcode.c, tool/transcode-tblgen.rb: Added 2009-12-10 11:59:12 +00:00
vtlh.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
ytab.sed * tool/ytab.sed: replaces backslashes with slash for nmake. 2009-03-11 16:08:24 +00:00