5 ms·
rbtrace: like strace, but for ruby code
- jhund 16y agoWow, this looks super useful. Thanks a lot!
- bsergean 16y agoYes, very cool indeed. I wish python had something like that. I'm looking at the code but it's not obvious how this thing works ...
- rhizome 16y agoWhy use --firehose instead of the more-standard -v/vv/vvv way?
- jrockway 16y agoBecause "firehose" is what Twitter calls it?
- tmm1 16y agoIf 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.
- riffraff 16y agoit could be made to work through a FIFO though, I guess? if so I could take a shot at it :)
- rhizome 16y ago...and Slashdot before them. Actual strace uses -v.
- rdtsc 16y agoAnything similar for Python? I am aware of this: http://docs.python.org/devguide/gdb.html http://docs.python.org/devguide/gdb.html only.
- tmm1 16y agorbtrace 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 http://www.doughellmann.com/PyMOTW/sys/tracing.html
- rdtsc 16y agoThank you. I used Python for 6 years and had no idea about sys.settrace()