Issue #2565 has been updated by Aaron Patterson.

File probe_hacks.patch added

Hi, I am interested in this functionality too.  I'm interested in this because I have an application where object creation has increased.  The increased objects are hash, array, and string literals.  The existing trace methods will not be triggered on allocation of those objects, and the scripting / filtering / speed of dtrace is useful to me.

I've been patching trunk with the attached patch in order to debug my current issues.  I don't think it's as complete as yugui's commit though.

What can I do to get dtrace support in trunk?  How can I help?
----------------------------------------
Feature #2565: adding hooks for better tracing
http://redmine.ruby-lang.org/issues/2565

Author: Yuki Sonoda
Status: Assigned
Priority: Low
Assignee: Yuki Sonoda
Category: core
Target version: 1.9.x


=begin
 Hi,
 
 I made a commit that embeded dtrace probes into Ruby so that you can
 profile a Ruby application at runtime. (r26235)
 
 Adding probes had been approved by a Ruby developer's meeting,
 however, the commit was little larger than what other committers
 expected. I got some objection for the commit. [ruby-dev:39954]
 In the end, I decided to temporarily revert the commit. (r26243)
 
 I discussed how we should support dynamic runtime tracing, with ko1,
 mame, naruse, unak and shyouhei. The problems of the commit were:
 * the probes duplicated with the event_hook framework
 (rb_add_event_hook, Kernel#set_trace_func)
 * Design of the probes were not verified enough.
   * more trial and error are necessary, to make it clear what is
 necessary to trace a Ruby application.
 
 I accepted ko1's suggestion:
 * reverting the commit
 * adding some hooks for rb_add_event_hook().
 * implementing probes for dynamic runtime tracing on the event_hook framework.
   * these probes can be implemented as a gem
   * I will aget a chance for trial and error.
   * The probes possibly will be merged into Ruby itself after enough
 designed and getting enough use cases.
 
 Here is a patch to add the hooks I and ko1 talked about. (attached)
 And here is an extension library that provides prove points to dtrace,
 on top of the hooks. (http://github.com/yugui/vm_probes )
 
 What do you think?  Can I commit the patch I attached?
 
 Thank you,
 -- Yuki Sonoda (Yugui)
 
 Attachment: adding-hooks.patch
=end



-- 
http://redmine.ruby-lang.org