Patches: Browse | Submit New | Admin

[#11497] patch to track object allocation

Date:
2007-06-11 06:28
Priority:
3
Submitted By:
Sylvain Joyeux (lapinot)
Assigned To:
Yukihiro Matsumoto (matz)
Category:
Language / Runtime / Core Libraries
State:
Open
Summary:
patch to track object allocation

Detailed description
This patch provides an API from both Ruby and C to get two values:
  - ObjectSpace.live_objects: the count of live objects
  - ObjectSpace.allocated_objects: the count of objects allocated since the ruby interpreter started

This patch allows to profile memory allocation without changing the code too much.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-04-11 09:27
Sender: Sylvain Joyeux

See my comment on #19302. I have no wonder why it needs a 
year to get bugs fixed on anything but the core of the 
core: everybody wants matz to clear up before moving the 
little finger.

This is a very small, non intrusive patch. If you have 
doubts, then ask for clarification -- to me or matz. But 
don't expect me to fight for this patch. I'm already 
maintaining my patched Ruby and having one more in the 
queue will not change anything for me. I won't spend hours 
fighting for such small changes.

Date: 2008-04-11 06:15
Sender: Akinori MUSHA

Was this discussed on ruby-core or elsewhere?

You have to convince matz and folks that this will be useful
for trunk first.
Date: 2007-11-01 00:31
Sender: Roger Pack

After noting that this allows Ruby profilers to keep track of
allocations per method call (and fast and well), I favor this
patch as it would add enhanced debug functionality "out
of the box" for all users.
Date: 2007-10-31 22:59
Sender: Roger Pack

what's the benefit over existing ObjectSpace func's?
Date: 2007-06-11 06:35
Sender: Sylvain Joyeux

Related patch to ruby-prof
http://rubyforge.org/tracker/index.php?func=detail&aid=11498&
amp;group_id=1814&atid=7062

Attached Files:

Name Description Download
ruby-track-alloc.patch Download

Changes:

Field Old Value Date By
assigned_toshyouhei2007-06-11 10:41shyouhei
File Added2087: ruby-track-alloc.patch2007-06-11 06:28lapinot