Project

General

Profile

Actions

Feature #2565

closed

adding hooks for better tracing

Added by yugui (Yuki Sonoda) almost 15 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
[ruby-core:27448]

Description

=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


Files

probe_hacks.patch (3.23 KB) probe_hacks.patch hacking probes in to trunk tenderlovemaking (Aaron Patterson), 06/30/2011 05:41 AM
dtrace.diff (31.8 KB) dtrace.diff tenderlovemaking (Aaron Patterson), 05/02/2012 08:25 AM
noname (500 Bytes) noname Anonymous, 05/02/2012 11:53 AM
noname (500 Bytes) noname Anonymous, 05/02/2012 11:53 AM
noname (500 Bytes) noname Anonymous, 05/03/2012 02:29 AM
noname (500 Bytes) noname Anonymous, 05/03/2012 09:53 AM
0001-Generate-probes.h-from-probes.d.patch (1.57 KB) 0001-Generate-probes.h-from-probes.d.patch dummy_probe_gen.rb which generates probes.h from probes.d vo.x (Vit Ondruch), 05/11/2012 11:28 PM
noname (500 Bytes) noname Anonymous, 05/14/2012 08:53 AM
0001-Generate-probes.h-from-probes.d.patch (1.58 KB) 0001-Generate-probes.h-from-probes.d.patch dummy_probe_gen.rb which generates probes.h from probes.d with fixed handling of one-line comments vo.x (Vit Ondruch), 05/14/2012 05:54 PM
Dtrace_SystemTap support for Ruby (3).pptx (33.5 KB) Dtrace_SystemTap support for Ruby (3).pptx yugui (Yuki Sonoda), 06/30/2012 02:44 PM
6594.pdf (77.8 KB) 6594.pdf Integrated Support for HOM trans (Thomas Sawyer), 07/01/2012 08:28 AM
6609.pdf (77 KB) 6609.pdf Self Extended Module as Toplevel Object trans (Thomas Sawyer), 07/01/2012 08:28 AM
5922.pdf (73.3 KB) 5922.pdf Migrate equal? to identical? trans (Thomas Sawyer), 07/01/2012 08:47 AM
5922.pdf (73.2 KB) 5922.pdf Migrate equal? to identical? trans (Thomas Sawyer), 07/01/2012 08:53 AM
noname (500 Bytes) noname Anonymous, 07/02/2012 11:53 PM
noname (500 Bytes) noname Anonymous, 07/03/2012 06:23 AM
dtrace.patch (32.4 KB) dtrace.patch updated dtrace patch with sed script tenderlovemaking (Aaron Patterson), 07/19/2012 03:52 AM
noname (500 Bytes) noname Anonymous, 07/30/2012 05:53 AM
noname (500 Bytes) noname Anonymous, 07/30/2012 05:59 AM
probes.diff (43.1 KB) probes.diff tenderlovemaking (Aaron Patterson), 10/27/2012 06:01 AM
probes.diff (43.9 KB) probes.diff tenderlovemaking (Aaron Patterson), 11/02/2012 05:07 AM

Related issues 2 (0 open2 closed)

Related to Ruby master - Feature #1279: Add DTrace ProbesClosedko1 (Koichi Sasada)03/13/2009Actions
Related to Ruby master - Feature #7022: add event hook for garbage collectionClosedauthorNari (Narihiro Nakamura)09/14/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0