From: James Abley Date: 2009-03-16T09:27:28+09:00 Subject: [ruby-core:22904] [Bug #1152] profiler.rb is not concurrent-execution threadsafe Issue #1152 has been updated by James Abley. File 1152.patch added Sample patch attached for discussion. There are style and best practice issues with this patch due to my lack of ruby experience. Please forgive and be so kind as to suggest improvements. It is intended to highlight some of the areas that must be considered when making the change to provide thread-safe profiling. The patch alters the code to make the capture of the data thread-safe AFAICT. There may be some issues with the data fields / calculations. I wasn't completely clear what each field in the array was supposed to be storing. The main issue unresolved by this patch is how best to present the information. I've opted for showing information per-thread and a summary as well. * Should there be a version number outputted, in case downstream tools are doing something with this information? * Any comments on how the information is being presented?? * Should profiling be configurable, so that it may not show output per thread, etc. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1152 ---------------------------------------- http://redmine.ruby-lang.org