Forum: Ruby-core adding hooks for better tracing

Posted by lancel (lancel lancel) (Guest)
on 2012-11-22 02:47
(Received via mailing list)
Issue #2565 has been updated by lancel (lancel lancel).


=begin
All of us have read the stories of excite people's 
((<lancel|URL:http://www.lancel1.com/>))  mind, the hero of the story to 
live only for a very limited time, sometimes up to a year, sometimes as 
short as one day. But we always want to know, the doomed choose how to 
spend their ((<sac lancel|URL:http://www.lancel1.com/>)) last days. Of 
course, I say is of free men who have a choice, not whose sphere of 
activities is strictly.458gyu854
=end

----------------------------------------
Feature #2565: adding hooks for better tracing
https://bugs.ruby-lang.org/issues/2565#change-33426

Author: yugui (Yuki Sonoda)
Status: Closed
Priority: Low
Assignee: tenderlovemaking (Aaron Patterson)
Category: core
Target version: 2.0.0


=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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.