Re: Does RubyProf::ALLOCATIONS work on 1.9.x??

106 views
Skip to first unread message

Mark Corner

unread,
Oct 23, 2012, 11:37:12 AM10/23/12
to ruby-opt...@googlegroups.com
I am guessing that it is related to this bug here:
https://github.com/rdp/ruby-prof/issues/86

Which 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)
Reply all
Reply to author
Forward
0 new messages