https://github.com/rdp/ruby-prof/issues/86Which seems to completely prevent memory profiling on 1.9.2, 1.9.3, and possibly others.
On Friday, October 19, 2012 3:52:14 PM UTC-4, Mark Corner wrote:
I am trying to get ALLOCATIONS to be profiled on 1.9.2 or 1.9.3 I have tried this on stock ruby, ruby with the gcdata patch and on the railsexpress ruby patches. No luck... I always just get output that looks exactly like the default CPU time output. I am assuming I can get allocations broken down by call stack.
Is this a known problem or amI doing something dumb??
require 'ruby-prof'
RubyProf::measure_mode = RubyProf::MEMORY
# Profile the code
RubyProf.start
a=[]
20000.times{
a << rand
}
result = RubyProf.stop
#printer = RubyProf::GraphPrinter.new(result)
printer = RubyProf::CallStackPrinter.new(result)
printer.print(STDOUT)