[ruby-cvs:64426] tenderlove:r57260 (trunk): Add `full` option to `ObjectSpace.dump_all`

tenderlove at ruby-lang.org tenderlove at ruby-lang.org
Wed Jan 4 07:42:10 JST 2017


tenderlove	2017-01-04 07:42:10 +0900 (Wed, 04 Jan 2017)

  New Revision: 57260

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57260

  Log:
    Add `full` option to `ObjectSpace.dump_all`
    
    The `full` option includes all slots (even `T_NONE`) in the JSON output.
    This is to help with debugging heap fragmentation.
    
    Here is an example usage:
    
    ```ruby
    File.open('heap.json', 'w') do |f|
      ObjectSpace.dump_all(output: f, full: true)
    end
    ```
    
    The `heap.json` file contains all slots, including empty slots.
    
    [Feature #13001] [ruby-core:78468]

  Modified files:
    trunk/ext/objspace/objspace_dump.c
    trunk/test/objspace/test_objspace.rb


More information about the ruby-cvs mailing list