Project

General

Profile

Feature #13001

Add `full` option to `ObjectSpace.dump_all`

Added by tenderlovemaking (Aaron Patterson) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:78468]

Description

I would like to include T_NONE slots in the ObjectSpace.dump_all outpout so that I can visualize heap fragmentation. I've attached a patch that adds a "full" option to dump_all so that all slots are dumped to the JSON output, including T_NONE.

Thanks.


Files

0001-Add-full-option-to-ObjectSpace.dump_all.patch (3.28 KB) 0001-Add-full-option-to-ObjectSpace.dump_all.patch tenderlovemaking (Aaron Patterson), 12/02/2016 09:23 PM

Associated revisions

Revision ed2abc43
Added by tenderlove over 2 years ago

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:

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 57260
Added by tenderlovemaking (Aaron Patterson) over 2 years ago

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:

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]

Revision 57260
Added by tenderlove over 2 years ago

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:

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]

Revision 57260
Added by tenderlove over 2 years ago

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:

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]

History

Updated by shevegen (Robert A. Heiler) over 2 years ago

Dump all the things! \o/

#2

Updated by Anonymous over 2 years ago

  • Status changed from Open to Closed

Applied in changeset r57260.


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:

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]

Also available in: Atom PDF