Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Profiling object allocations hangs if app traps interrupt #16

Open
bhb opened this Issue Dec 7, 2010 · 0 comments

Comments

Projects
None yet
1 participant

bhb commented Dec 7, 2010

For the following code

trap("INT") do                                                                                                                                                                  
  puts "interrupted"                                                                                                                                                            
end
550_000.times { {} }

The following command will work:

CPUPROFILE=/tmp/my_app_profile RUBYOPT="-r`gem which perftools | tail -1`" ruby test.rb

However, the following command will hang:

CPUPROFILE_OBJECTS=1 CPUPROFILE=/tmp/my_app_profile RUBYOPT="-r`gem which perftools | tail -1`" ruby test.rb

Profiling object allocations works again if you comment out the code that traps interrupt.

CPUPROFILE_REALTIME=1 causes no problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment