Bug #8456

Sugfault in Ruby Head

Added by Sam Saffron 11 months ago. Updated 11 months ago.

[ruby-core:55182]
Status:Closed
Priority:High
Assignee:Koichi Sasada
Category:-
Target version:-
ruby -v:ruby-head Backport:

Description

Was just going to try out the allocation tracing snazzy feature and got this:

https://gist.github.com/SamSaffron/5659655

To repro:

  1. Grab Discourse from https://github.com/discourse/discourse
  2. gem install bundler
  3. bundle

Associated revisions

Revision 40974
Added by Koichi Sasada 11 months ago

  • ext/objspace/object_tracing.c: fix a bug reported at " [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head" Care about the case TracePoint#path #=> `nil'.
  • ext/objspace/object_tracing.c: add two new methods:
  • ObjectSpace.allocationclasspath(o)
  • ObjectSpace.allocationmethodid(o) They are not useful for Object.new because they are always "Class" and :new. To trace more useful information, we need to maintain call-tree using call/return hooks, which is implemented by ll-prof http://sunagae.net/wiki/doku.php?id=software:llprof
  • test/objspace/test_objspace.rb: add a test.

History

#1 Updated by Koichi Sasada 11 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r40974.
Sam, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/objspace/object_tracing.c: fix a bug reported at " [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head" Care about the case TracePoint#path #=> `nil'.
  • ext/objspace/object_tracing.c: add two new methods:
  • ObjectSpace.allocationclasspath(o)
  • ObjectSpace.allocationmethodid(o) They are not useful for Object.new because they are always "Class" and :new. To trace more useful information, we need to maintain call-tree using call/return hooks, which is implemented by ll-prof http://sunagae.net/wiki/doku.php?id=software:llprof
  • test/objspace/test_objspace.rb: add a test.

#2 Updated by Koichi Sasada 11 months ago

Thank you for trying.
If you have feedback about this feature, please let us know.

Also available in: Atom PDF