diff options
author | Jemma Issroff <[email protected]> | 2022-12-05 14:59:07 -0500 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-12-05 14:33:16 -0800 |
commit | e4aba8f519ca0b63fb3da11d6573443545aaef9b (patch) | |
tree | 934e63283ac62da54780be89a2ae1a05032c3dd1 /ext/objspace | |
parent | e7642d8095d7f597c322ed26797d649aec7edbd9 (diff) |
Add shape_id to heap dump
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6864
Diffstat (limited to 'ext/objspace')
-rw-r--r-- | ext/objspace/objspace_dump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index 61fa0f04ac..41da368267 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -378,6 +378,9 @@ dump_object(VALUE obj, struct dump_config *dc) dump_append(dc, "{\"address\":"); dump_append_ref(dc, obj); + dump_append(dc, ", \"shape_id\":"); + dump_append_sizet(dc, rb_shape_get_shape_id(obj)); + dump_append(dc, ", \"type\":\""); dump_append(dc, obj_type(obj)); dump_append(dc, "\""); |