From: Clifford Heath Date: 2007-11-11T08:45:04+09:00 Subject: Re: enterprise ruby M. Edward (Ed) Borasky wrote: > I'm in the process of re-factoring the Rakefile from my profiling > efforts. I'd be happy to profile your source as part of that. By the > way, are you starting with 1.9 or 1.8? I'm still profiling 1.8 only, but > I expect to have 1.9 profiling working within a week or so. What profiler are you using Ed? I just ask because I wrote a profiler a decade ago that used gcc's -pg (gprof profiling) with a custom prof library that used tail patching and the TSC register to get real-time nano-second resolution on profiled functions, including parent/child rollups. The use of *real-time* in profiling is fantastic, because it tells you where, for example, I/O or excessive page-faulting is hurting some function. I also hooked the memory allocation functions to gather memory info, including both growth and flow (in/out). To carefully select functions to profile, rather than profiling all, also helps a lot. Finally, the TSC register counts processor cycles, so you get nanosecond-resolution. A lot of Unix-based systems are designed using flawed performance data from the kernel (statistical) profiling, that simply doesn't see I/O or VM times. I've no idea whether the hacks I used to do the tail-patching still work with a current gcc, but it would be good to reactivate tprof if possible. It'd be great to have a Ruby that can do such profiling. I still have the code somewhere... Clifford Heath.