Pages tagged gdb:

Hijack: Get A Live IRB Prompt For Any Existing Ruby Process
http://www.rubyinside.com/hijack-get-a-live-irb-prompt-for-any-existing-ruby-process-2232.html

Only requires that gdb be available on the box. No requiring libraries or listening on sockets to get the console. Rad.
Whoah, hot-swapping IRB prompt for running Ruby process.
Linux Assembly and Disassembly an Introduction
http://www.milw0rm.com/papers/47
objdump
6 Line EventMachine Bugfix = 2x faster GC, +1300% requests/sec at time to bleed by Joe Damato
http://timetobleed.com/6-line-eventmachine-bugfix-2x-faster-gc-1300-requestssec/
"This results in an increase from 500 requests/sec to 7000 requests/sec when using Sinatra+Thin+Epoll+Threads. That is pretty ill." -- Joe Damato
On top of all that, this patch helps with Ruby’s green threads, too. If the epoll_wait causes a Ruby event to fire and that event creates a Ruby thread, that Ruby thread gets an entire copy of the existing stack. Each time that thread is switched into and out of, that thread stack has to be memcpy’d into and out of place. Reducing those memcpys by ~800,000 bytes is a HUGE performance win. Want to learn more about threading implementations? Check out my threading models post: here. Fixing this turned out to be pretty simple. A six (6!!) line patch: * Speeds up GC by 2-3x because of the huge decrease in stack frame size. * Fixes an open bug in EventMachine where using threads with Epoll causes lots of slowness. The reason is that each thread will inherit an ~800,000 byte stack that gets copied in and out every context switch. * This results in an increase from 500 requests/sec to 7000 requests/sec when using Sinatra+Thin+Epoll+Threads. That is pretty ill.
l in all, a productive debugging session lasting about an hour. The result was a simple patch, with 2 big performance improvements.
Ksplice » Attack of the Cosmic Rays! - System administration and software blog
http://blog.ksplice.com/2010/06/attack-of-the-cosmic-rays/
a really nice article on debugging
Amazing forensic methods to compare system cache in memory with image on disk.