Question
I'm debugging a memory leak in a rake task. I want to see a call stack of:
* Living objects
* What object or line originally allocated those objects
Is this possible with ruby-prof?
Setup
Gems
rails 3.2.16
Rake task
Imports a CSV file directly into a MySql database using DATA LOAD INFILE and Active Record objects.
What I've Tried
I've tried the modes:
RubyProf::ALLOCATIONS
RubyProf::MEMORY
The documentation says:
RubyProf::ALLOCATIONS Object allocation reports show how many objects each method in a program allocates.
RubyProf::MEMORY Memory usage reports show how much memory each method in a program uses.
This implies that ruby-prof just reports on the total allocation of objects, not just the ones that are living.
That means I can't use it for memory leak tracking... is that right?