PROFILER
1. A good chunk of the C-api in Rubinius is implemented as a rb_funcall back into a pure Ruby path. None of these paths show up during profiling. It would be great if they did show up so that it is easier to identify "slow paths" in C extensions.
2. On hydra (no-GIL branch) it would be interesting if there were an additional cli flag (-Xprofiler.by_thread ?) that would separate the statistics by thread. This sounds difficult, but it would be a helpful tool for identifying "hot" threads in a multi-threaded app. Additionally, it could probably help identify hot methods / bottlenecks where multiple threads come together for synchronization.
That's all for the moment.
cr
console> heap.diff(Time.now, Time.now + 60)
or
console> now_anchor = Time.now
console> 5.times do
console> sleep 60
console> heap.diff(now_anchor, Time.now)
console> end
to do heap diffs right in the console.
4. Extend the debugger so we can set breakpoint on stdlib or rbx internal Ruby code that is *called by* a C extension.
5. Provide a Ruby method for temporarily disabling the JIT around certain sections of code.
e.g.
def foo
Rubinius.jit :disable
<my code>
Rubinius.jit :enable
<other code>
end
Not hugely useful for all occasions, but there are a few times when you suspect code is problematic due to the JIT and you just want to get it out of the way.
cr
3. Add in the heap_dump (evanphx/heap_dump) functionality directly into rbx console (or make it a plug-in or something). It would be great to be able to write a command similar to this:
console> heap.diff(Time.now, Time.now + 60)
or
console> now_anchor = Time.now
console> 5.times do
console> sleep 60
console> heap.diff(now_anchor, Time.now)
console> end
to do heap diffs right in the console.
4. Extend the debugger so we can set breakpoint on stdlib or rbx internal Ruby code that is *called by* a C extension.
5. Provide a Ruby method for temporarily disabling the JIT around certain sections of code.
e.g.
def foo
Rubinius.jit :disable
<my code>
Rubinius.jit :enable
<other code>
end
Not hugely useful for all occasions, but there are a few times when you suspect code is problematic due to the JIT and you just want to get it out of the way.
cr
--
--- !ruby/object:MailingList
name: rubinius-dev
view: http://groups.google.com/group/rubinius-dev?hl=en
post: rubini...@googlegroups.com
unsubscribe: rubinius-dev...@googlegroups.com
On Sat, Feb 19, 2011 at 10:03 PM, Chuck Remes <cremes....@mac.com> wrote:3. Add in the heap_dump (evanphx/heap_dump) functionality directly into rbx console (or make it a plug-in or something). It would be great to be able to write a command similar to this:
console> heap.diff(Time.now, Time.now + 60)
or
console> now_anchor = Time.now
console> 5.times do
console> sleep 60
console> heap.diff(now_anchor, Time.now)
console> end
to do heap diffs right in the console.
4. Extend the debugger so we can set breakpoint on stdlib or rbx internal Ruby code that is *called by* a C extension.I wasn't aware this wasn't possible. Can you come up with the simplest test case to try?
I would like a tool that creates an "object reference stack" from the leaf node (that leaked) all the way back to its original owner.
e.g.
ruby% ruby reference_stacks dump1 LeakedClass
file7.rb:187 - Array.element 7 # element 7 is an instance of LeakedClass
file7.rb:55 - Hash.key 'a_key' # hash value for this key is the Array from line 187
file4.rb:21 - Bar#initialize # ivar refers to the hash from file7 line 55
file7.rb:187 - Array.element 6
file7.rb:55 - Hash.key 'another_key'
file4.rb:21 - Bar#initialize
etc.