dumpster
Version, currently master branch1 version
- master branchlatestOct 24, 2024
github.com/place-labs/dumpster
Fast memory dump analysis for Ruby
Installation
# Add this to your shard.yml
dependencies:
dumpster:
github: place-labs/dumpster
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- Kim Burgess
- Target
dumpsterfrom src/dumpster.cr
Dependencies
Runtime Dependencies
- future*github: crystal-community/future.cr
- linalg*github: konovod/linalg
- numcry*github: aca-labs/numcry, branch: master
- terminimal*github: aca-labs/terminimal
- json_mapping*github: crystal-lang/json_mapping.cr
README
Dumpster
An analysis tool for Ruby MRI heap dumps.
Provides automated analysis and identification of potential memory leaks within a program.
Usage
Capturing Heap Dumps
Using rbtrace, enable allocation tracking on the ruby process you'd like to inspect. Note: this will result in a perf impact while active. Use with care.
rbtrace -p <pid> -e 'Thread.new{require "objspace";ObjectSpace.trace_object_allocations_start}.join'
After the process has had time to rotate through a few GC generations, export via:
rbtrace -p <pid> -e 'Thread.new{require "objspace";io=File.open("/tmp/ruby-heap.dump", "w");ObjectSpace.dump_all(output: io);io.close}.join'
To stop tracking and clear allocations from mem:
rbtrace -p <pid> -e 'Thread.new{GC.start;require "objspace";ObjectSpace.trace_object_allocations_stop;ObjectSpace.trace_object_allocations_clear}.join'
Analysis
!! When using outside of a dev context, analysis should always take place on a machine remote to that running the application under analysis.
./dumpster ruby-heap.dump
Depending on the size of heap dump being parsed, analysis may take some time. Progress will be provided. When complete, a ordered list of 'locations of interest' will be provided. These are lines responsible for an increasing number of long-lived object allocations that may be indicative of a memory leak.
Contributing
- Fork it ( https://github.com/[your-github-name]/dumpster/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Kim Burgess Kim Burgess - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Oct 24, 2024
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/place-labs/dumpster
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1