aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* removes the dtrace support. reverts r26239, r26238 and r26235.yugui2010-01-052-50/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * trace.h: new file. wraps tracing mechanisms.yugui2010-01-032-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Suppressknu2009-12-311-2/+2
| | | | | | | | compiler warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h: include addrinfo.h only when using our ownusa2009-12-311-0/+2
| | | | | | | | getaddrinfo.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/raddrinfo.c (addrinfo_type): typed.nobu2009-12-301-15/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: use have_struct_member.nobu2009-12-302-8/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: fix for wide-getaddrinfo option.nobu2009-12-307-56/+60
| | | | | | | | * ext/socket/addrinfo.c: rename {addr,name}info functions to ensure those are used on darwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb: fix for extstatic.nobu2009-12-301-5/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (foleparam_initialize): add foleparam_initializesuke2009-12-271-1/+75
| | | | | | | | | | to check argument of WIN32OLE_PARAM.new * test/win32ole/test_win32ole_param.rb (test_s_new): add some assertion to test WIN32OLE_PARAM.new git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/bigdecimal/bigdecimal_en.html: Remove obsolete information, fix typosmarcandre2009-12-061-28/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (to_int): DL::CPtr supports to_inttenderlove2009-12-041-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (ungetc): RDoc updated. trunk allowsnahi2009-12-041-4/+3
| | | | | | | pushing back behind the beginning of the pseudo stream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: initialize @hostname of SSLSocket to avoid nahi2009-12-021-0/+3
| | | | | | | warning at SSLSocket#connect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb (command_output): $makeflags are already quoted.nobu2009-11-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Do notknu2009-11-251-4/+13
| | | | | | | | | call rb_inspect() on an object that does not implement necessary methods; reported by NaHi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/getnameinfo.c: need to include extconf.h for HAVE_* macros.usa2009-11-191-0/+3
| | | | | | | | reported by Kenta Murata <mrkn AT mrkn.jp> via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): Fix comparisons [ruby-core:26646]marcandre2009-11-141-6/+4
| | | | | | * test/bigdecimal/test_bigdecimal.rb (class): Fix and improve tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk/variable.rb (TkVariable::coerce): fix bug on a numeric value.nagai2009-11-131-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk/variable.rb: TkVariable#*(other) and /(other) have anagai2009-11-131-2/+2
| | | | | | | bug on handling of the "other" value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_zlib_adler32): fix typo.mame2009-11-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_to_ptr): when wrapping a pointer it shouldtenderlove2009-11-121-0/+1
| | | | | | | keep a reference to the object it's wrapping * test/dl/test_func.rb use standard test methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_each_line): rdoc fixmarcandre2009-11-091-2/+4
| | | | | | * ext/bigdecimal/bigdecimal.c (#infinite?, #nonzero?): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (**) updating documentationtenderlove2009-11-081-6/+37
| | | | | | | * test/dl/test_cfunc.rb (test_ptr=, test_ptr) testing the pointer accessor methods on CFunc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_inspect): making inspect consistent acrosstenderlove2009-11-071-1/+1
| | | | | | | platforms * test/dl/test_cptr.rb (test_inspect): testing inspect git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_initialize): cleaning up C macrostenderlove2009-11-061-9/+47
| | | | | | | * ext/dl/cfunc.c (**): adding documentation * test/dl/test_cfunc.rb (test_set_calltype) testing calltype git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_s_malloc, rb_dlptr_initialize): addingtenderlove2009-11-061-0/+19
| | | | | | | | documentation * test/dl/test_cptr.rb (**): testing that malloc works when passed free functions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_to_str, rb_dlptr_to_s) adding documentationtenderlove2009-11-061-4/+29
| | | | | | | * test/dl/test_cptr.rb (test_to_str, test_to_s) testing the stringification of DL::Ptr git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_inspect, rb_dlptr_plus, rb_dlptr_minus)tenderlove2009-11-061-3/+21
| | | | | | | | documenting +, -, inspect * text/dl/test_cptr.rb (test_minus, test_plus, test_inspect) testing minus, plus, and inspect git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-047-33/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_cptr.rb (test_to_ptr*): testing DL::CPtr#to_ptrtenderlove2009-11-031-7/+25
| | | | | | | * ext/dl/cptr.c (rb_dlptr_free_set, rb_dlptr_free_get, rb_dlptr_s_to_ptr): adding documentation, fixing indentation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_eql, rb_dlptr_cmp): DL::CPtr#== and DL::CPtr#<=>tenderlove2009-11-031-1/+22
| | | | | | should not raise an exception when compared to a different object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/win32/lib/win32/registry.rb: update rdoc. [ruby-core:26022]naruse2009-11-021-236/+242
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c: fixed rdoc. [ruby-core:26457]naruse2009-11-011-162/+154
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (socket_s_ip_address_list): use FreeLibrary() towanabe2009-11-011-4/+4
| | | | | | | free HMODULE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_ptr, rb_dlptr_ref) adding documentationtenderlove2009-11-011-0/+12
| | | | | | * test/dl/test_cptr.rb (test_ref_ptr) testing CPtr#ref and CPtr#ptr git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_to_value) added documentationtenderlove2009-11-011-0/+5
| | | | | | * test/dl/test_cptr.rb (test_to_value) testing DL::CPtr#to_value git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cptr.c (rb_dlptr_size) splitting function to reduce complexitytenderlove2009-11-012-12/+49
| | | | | | | | | | | * ext/dl/cptr.c (rb_dlptr_null_p, rb_dlptr_aref, rb_dlptr_aset) adding documentation * ext/dl/dl.c (rb_dl_free) adding documentation * test/dl/test_cptr.rb (test_null?, test_size, test_size=, test_aref_aset) Improving test coverage * test/dl/test_dl2.rb (test_free_secure) improving test coverage git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_dl2.rb (**) testing malloc and realloctenderlove2009-11-011-0/+13
| | | | | | * ext/dl/dl.c (**) adding documentation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb : Compilation failure on AIX.kanemoto2009-10-281-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_each_group): fixed typo.nobu2009-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (Init_stringio): added read_nonblock andnobu2009-10-271-0/+2
| | | | | | | write_nonblock aliases. [ruby-dev:39551] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_data_type): typed.nobu2009-10-271-15/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/tk/variable.rb: add TkVariable#+@ and -@ method.nagai2009-10-271-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/tcltklib.c: mistake on operation. sorry.nagai2009-10-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/tcltklib.c,stubs.c: remove errors or warnings when compilednagai2009-10-263-2/+33
| | | | | | | | with old ruby 1.8.x. * ext/tk/tkutil/tkutil.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/lib/remote-tk.rb: typo fixed.nagai2009-10-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/handle.c (dlhandle_sym): fixed an invalid local variablenobu2009-10-251-4/+4
| | | | | | | declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/handle.c (rb_dlhandle_close): fixed an invalid localnobu2009-10-251-1/+1
| | | | | | | variable declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/handle.c (**) adding documentationtenderlove2009-10-251-0/+6
| | | | | | * test/dl/test_handle.rb (test_NEXT) testing the NEXT handle git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/handle.c (rb_dlhandle_close_enabled_p) testing that handles cantenderlove2009-10-251-0/+28
| | | | | | be enabled and disabled for closure on GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e