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?
If not, what tool should I use?
- rails 3.2.16
- event_bus 1.0.0 (https://github.com/kevinrutherford/event_bus)
- activerecord-fast-import (https://github.com/jsuchal/activerecord-fast-import)
- 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
All it says in the documentation is:
Object allocation reports show how many objects each method in a program allocates.
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.
I've tried Ruby-Mass and Bloat Check but neither seem to be able to do what I want. Ruby-Mass also crashes because it's finding FactoryGirl objects in memory for some reason...