Hacker News new | past | comments | ask | show | jobs | submit login
rbtrace: like strace, but for ruby code (github.com/tmm1)
101 points by tmm1 on Feb 21, 2011 | hide | past | favorite | 11 comments



Wow, this looks super useful. Thanks a lot!


Anything similar for Python?

I am aware of this: http://docs.python.org/devguide/gdb.html only.


rbtrace is built on ruby's event hook api, which provides events when ruby and C extension methods are called, and when they return.

python offers a very similar event hook api: http://www.doughellmann.com/PyMOTW/sys/tracing.html


Thank you.

I used Python for 6 years and had no idea about sys.settrace()


Why use --firehose instead of the more-standard -v/vv/vvv way?


Because "firehose" is what Twitter calls it?


If you tried it, you would understand. Ruby programs make a _LOT_ of method calls.

Unfortunately the firehose doesn't work too well on OSX, because the unix message queue API I'm using (msgget(2)) is capped in the kernel to 2048 bytes and 40 messages per queue.


it could be made to work through a FIFO though, I guess? if so I could take a shot at it :)


A FIFO might work. Do you know how big the buffers associated with FIFOs on OSX are?


sadly, I do not, I was sure I had a reference somewhere but I am completely unable to find it again :(


...and Slashdot before them. Actual strace uses -v.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: