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?
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?
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.