Project

General

Profile

Actions

Feature #10932

open

Enabling allocation tracing as early as possible

Added by tenderlovemaking (Aaron Patterson) over 9 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:68397]

Description

Hi,

I'd like to be able to enable allocation tracing as early as possible. I've attached a patch that I use to do that when I'm debugging code that I don't know very well.

The way I use it is like this:

$ ruby -robjspace/trace_start some_test.rb

I like using this because many times I can't figure out when to enable object tracing. Can we add this feature to object space?


Files

trace_start.diff (305 Bytes) trace_start.diff tenderlovemaking (Aaron Patterson), 03/03/2015 07:53 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #17762: A simple way to trace object allocationClosedmame (Yusuke Endoh)Actions
Actions #1

Updated by ko1 (Koichi Sasada) over 9 years ago

Matz has no objection (except file name).

I have 2 concerns.

(1) file name

We alraedy have tracer.rb.

How about objspace/allocation_tracer.rb?
(not clear?)

(2) including ObjectSpace

Should not include.

Updated by tenderlovemaking (Aaron Patterson) over 9 years ago

How about objspace/allocation_tracer.rb?

I think that is fine.

Should not include.

Any reason why not? Usually I don't know where to include it while I'm debugging, and doing ObjectSpace.allocation_sourcefile is a lot to type. If including isn't an option, could we add shorter method names?

Updated by ko1 (Koichi Sasada) over 9 years ago

Aaron Patterson wrote:

Should not include.

Any reason why not? Usually I don't know where to include it while I'm debugging, and doing ObjectSpace.allocation_sourcefile is a lot to type. If including isn't an option, could we add shorter method names?

I'm not sure we can restrict usage only to debugging.

Actions #4

Updated by mame (Yusuke Endoh) over 3 years ago

  • Related to Feature #17762: A simple way to trace object allocation added
Actions #5

Updated by hsbt (Hiroshi SHIBATA) 8 months ago

  • Status changed from Open to Assigned
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0