rubinius/rubinius — Issue #1414: Profiler.graph
Author: hosiawak
Created: 2011-11-17 18:55:38+00:00
State: open

Running

./bin/mspec ci -T -Xprofile -T -Xprofiler.graph spec/ruby/core/string/split_spec.rb

on a clean build

raises:

An exception occurred running at_exit handlers
Coercion error: obj.to_int did NOT return a Fixnum (was Bignum) (TypeError)

Backtrace:
Rubinius::Type.coerce_to at kernel/common/type.rb:31
Array#[] at kernel/common/array.rb:139
{ } in Rubinius::Profiler::Instrumenter#thread_graph at lib/tooling/profiler
/profiler.rb:354
{ } in Enumerable(Array)#sort_by at kernel/common/enumerable.rb:155
Array#map at kernel/bootstrap/array18.rb:16
Enumerable(Array)#sort_by at kernel/common/enumerable.rb:153
{ } in Rubinius::Profiler::Instrumenter#thread_graph at lib/tooling/profiler
/profiler.rb:351
Array#each at kernel/bootstrap/array.rb:66
Rubinius::Profiler::Instrumenter#thread_graph at lib/tooling/profiler
/profiler.rb:344
{ } in Rubinius::Profiler::Instrumenter#graph at lib/tooling/profiler
/profiler.rb:296
Array#each at kernel/bootstrap/array.rb:66
Rubinius::Profiler::Instrumenter#graph at lib/tooling/profiler/profiler.rb:295
Rubinius::Profiler::Instrumenter#show at lib/tooling/profiler/profiler.rb:111
Profiler__.print_profile at lib/profiler.rb:19
{ } in Object#__script__ at lib/profile.rb:4
Rubinius::Loader#run_at_exits at kernel/loader.rb:667
Rubinius::Loader#epilogue at kernel/loader.rb:687
Rubinius::Loader#main at kernel/loader.rb:815

https://github.com/rubinius/rubinius/blob/master/lib/tooling/profiler/profiler.rb#L354

total is a Bignum, I think the callers array should be sorted by some other value, not clr[total]

Can anyone else reproduce it ?