Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapes: objects with lots of ivars are always too complex #542

Open
casperisfine opened this issue Oct 10, 2023 · 6 comments
Open

Shapes: objects with lots of ivars are always too complex #542

casperisfine opened this issue Oct 10, 2023 · 6 comments

Comments

@casperisfine
Copy link

casperisfine commented Oct 10, 2023

class Record
  def initialize
    100.times do |i|
      instance_variable_set("@ivar_#{i}", i)
    end
  end
end

puts RUBY_DESCRIPTION
require "objspace"
puts ObjectSpace.dump(Record.new)
puts ObjectSpace.dump(Record.new)
puts "-" * 40
ObjectSpace.dump_shapes(output: :stdout)

On 3.2.2:

{"address":"0x1005202a0", "type":"OBJECT", "shape_id":132, "slot_size":40, "class":"0x1006099c8", "ivars":100, "memsize":1576, "flags":{"wb_protected":true}}
{"address":"0x10050d2b8", "type":"OBJECT", "shape_id":132, "slot_size":40, "class":"0x1006099c8", "ivars":100, "memsize":1576, "flags":{"wb_protected":true}}

On ruby-head:

{"address":"0x1077439e0", "type":"OBJECT", "shape_id":11, "slot_size":40, "class":"0x1061a8fe0", "ivars":100, "too_complex_shape":true, "memsize":3424, "flags":{"wb_protected":true}}
{"address":"0x1077409e8", "type":"OBJECT", "shape_id":11, "slot_size":40, "class":"0x1061a8fe0", "ivars":100, "too_complex_shape":true, "memsize":3424, "flags":{"wb_protected":true}}

Note how the object is marked as too_complex even though ivars were always defined in a consistent order.

Here's the full shape list:

$ ruby --disable-gems /tmp/too-complex.rb
ruby 3.3.0dev (2023-10-10T02:05:29Z shape-cache-miss-i.. 5245123a4b) [arm64-darwin22]
{"address":"0x1077439e0", "type":"OBJECT", "shape_id":11, "slot_size":40, "class":"0x1061a8fe0", "ivars":100, "too_complex_shape":true, "memsize":3424, "flags":{"wb_protected":true}}
{"address":"0x1077409e8", "type":"OBJECT", "shape_id":11, "slot_size":40, "class":"0x1061a8fe0", "ivars":100, "too_complex_shape":true, "memsize":3424, "flags":{"wb_protected":true}}
----------------------------------------
{"address":"0x105130000", "type":"SHAPE", "id":0, "depth":1, "shape_type":"ROOT", "edges":6, "memsize":184}
{"address":"0x105130020", "type":"SHAPE", "id":1, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":8, "edges":3, "memsize":120}
{"address":"0x105130040", "type":"SHAPE", "id":2, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":18, "edges":5, "memsize":184}
{"address":"0x105130060", "type":"SHAPE", "id":3, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":38, "edges":2, "memsize":120}
{"address":"0x105130080", "type":"SHAPE", "id":4, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":78, "edges":1, "memsize":32}
{"address":"0x1051300a0", "type":"SHAPE", "id":5, "parent_id":0, "depth":2, "shape_type":"T_OBJECT", "edges":3, "memsize":120}
{"address":"0x1051300c0", "type":"SHAPE", "id":6, "parent_id":1, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x1051300e0", "type":"SHAPE", "id":7, "parent_id":2, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x105130100", "type":"SHAPE", "id":8, "parent_id":3, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x105130120", "type":"SHAPE", "id":9, "parent_id":4, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x105130140", "type":"SHAPE", "id":10, "parent_id":0, "depth":2, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130160", "type":"SHAPE", "id":11, "parent_id":0, "depth":2, "shape_type":"OBJ_TOO_COMPLEX", "edges":0, "memsize":32}
{"address":"0x105130180", "type":"SHAPE", "id":12, "parent_id":1, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x1051301a0", "type":"SHAPE", "id":13, "parent_id":5, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(215)", "edges":1, "memsize":32}
{"address":"0x1051301c0", "type":"SHAPE", "id":14, "parent_id":13, "depth":4, "shape_type":"IVAR","edge_name":"ID_INTERNAL(212)", "edges":1, "memsize":32}
{"address":"0x1051301e0", "type":"SHAPE", "id":15, "parent_id":14, "depth":5, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130200", "type":"SHAPE", "id":16, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(906)", "edges":1, "memsize":32}
{"address":"0x105130220", "type":"SHAPE", "id":17, "parent_id":16, "depth":4, "shape_type":"IVAR","edge_name":"ID_INTERNAL(907)", "edges":0, "memsize":32}
{"address":"0x105130240", "type":"SHAPE", "id":18, "parent_id":2, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130260", "type":"SHAPE", "id":19, "parent_id":5, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130280", "type":"SHAPE", "id":20, "parent_id":1, "depth":3, "shape_type":"IVAR","edge_name":"@gem_prelude_index", "edges":1, "memsize":32}
{"address":"0x1051302a0", "type":"SHAPE", "id":21, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"@gem_prelude_index", "edges":1, "memsize":32}
{"address":"0x1051302c0", "type":"SHAPE", "id":22, "parent_id":20, "depth":4, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x1051302e0", "type":"SHAPE", "id":23, "parent_id":21, "depth":4, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130300", "type":"SHAPE", "id":24, "parent_id":3, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x105130320", "type":"SHAPE", "id":25, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(249)", "edges":0, "memsize":32}
{"address":"0x105130340", "type":"SHAPE", "id":26, "parent_id":5, "depth":3, "shape_type":"IVAR","edge_name":"@ivar_0", "edges":1, "memsize":32}
{"address":"0x105130360", "type":"SHAPE", "id":27, "parent_id":26, "depth":4, "shape_type":"IVAR","edge_name":"@ivar_1", "edges":1, "memsize":32}
{"address":"0x105130380", "type":"SHAPE", "id":28, "parent_id":27, "depth":5, "shape_type":"IVAR","edge_name":"@ivar_2", "edges":1, "memsize":32}
{"address":"0x1051303a0", "type":"SHAPE", "id":29, "parent_id":28, "depth":6, "shape_type":"CAPACITY_CHANGE", "capacity":6, "edges":1, "memsize":32}
{"address":"0x1051303c0", "type":"SHAPE", "id":30, "parent_id":29, "depth":7, "shape_type":"IVAR","edge_name":"@ivar_3", "edges":1, "memsize":32}
{"address":"0x1051303e0", "type":"SHAPE", "id":31, "parent_id":30, "depth":8, "shape_type":"IVAR","edge_name":"@ivar_4", "edges":1, "memsize":32}
{"address":"0x105130400", "type":"SHAPE", "id":32, "parent_id":31, "depth":9, "shape_type":"IVAR","edge_name":"@ivar_5", "edges":1, "memsize":32}
{"address":"0x105130420", "type":"SHAPE", "id":33, "parent_id":32, "depth":10, "shape_type":"CAPACITY_CHANGE", "capacity":12, "edges":1, "memsize":32}
{"address":"0x105130440", "type":"SHAPE", "id":34, "parent_id":33, "depth":11, "shape_type":"IVAR","edge_name":"@ivar_6", "edges":1, "memsize":32}
{"address":"0x105130460", "type":"SHAPE", "id":35, "parent_id":34, "depth":12, "shape_type":"IVAR","edge_name":"@ivar_7", "edges":1, "memsize":32}
{"address":"0x105130480", "type":"SHAPE", "id":36, "parent_id":35, "depth":13, "shape_type":"IVAR","edge_name":"@ivar_8", "edges":1, "memsize":32}
{"address":"0x1051304a0", "type":"SHAPE", "id":37, "parent_id":36, "depth":14, "shape_type":"IVAR","edge_name":"@ivar_9", "edges":1, "memsize":32}
{"address":"0x1051304c0", "type":"SHAPE", "id":38, "parent_id":37, "depth":15, "shape_type":"IVAR","edge_name":"@ivar_10", "edges":1, "memsize":32}
{"address":"0x1051304e0", "type":"SHAPE", "id":39, "parent_id":38, "depth":16, "shape_type":"IVAR","edge_name":"@ivar_11", "edges":1, "memsize":32}
{"address":"0x105130500", "type":"SHAPE", "id":40, "parent_id":39, "depth":17, "shape_type":"CAPACITY_CHANGE", "capacity":24, "edges":1, "memsize":32}
{"address":"0x105130520", "type":"SHAPE", "id":41, "parent_id":40, "depth":18, "shape_type":"IVAR","edge_name":"@ivar_12", "edges":1, "memsize":32}
{"address":"0x105130540", "type":"SHAPE", "id":42, "parent_id":41, "depth":19, "shape_type":"IVAR","edge_name":"@ivar_13", "edges":1, "memsize":32}
{"address":"0x105130560", "type":"SHAPE", "id":43, "parent_id":42, "depth":20, "shape_type":"IVAR","edge_name":"@ivar_14", "edges":1, "memsize":32}
{"address":"0x105130580", "type":"SHAPE", "id":44, "parent_id":43, "depth":21, "shape_type":"IVAR","edge_name":"@ivar_15", "edges":1, "memsize":32}
{"address":"0x1051305a0", "type":"SHAPE", "id":45, "parent_id":44, "depth":22, "shape_type":"IVAR","edge_name":"@ivar_16", "edges":1, "memsize":32}
{"address":"0x1051305c0", "type":"SHAPE", "id":46, "parent_id":45, "depth":23, "shape_type":"IVAR","edge_name":"@ivar_17", "edges":1, "memsize":32}
{"address":"0x1051305e0", "type":"SHAPE", "id":47, "parent_id":46, "depth":24, "shape_type":"IVAR","edge_name":"@ivar_18", "edges":1, "memsize":32}
{"address":"0x105130600", "type":"SHAPE", "id":48, "parent_id":47, "depth":25, "shape_type":"IVAR","edge_name":"@ivar_19", "edges":1, "memsize":32}
{"address":"0x105130620", "type":"SHAPE", "id":49, "parent_id":48, "depth":26, "shape_type":"IVAR","edge_name":"@ivar_20", "edges":1, "memsize":32}
{"address":"0x105130640", "type":"SHAPE", "id":50, "parent_id":49, "depth":27, "shape_type":"IVAR","edge_name":"@ivar_21", "edges":1, "memsize":32}
{"address":"0x105130660", "type":"SHAPE", "id":51, "parent_id":50, "depth":28, "shape_type":"IVAR","edge_name":"@ivar_22", "edges":1, "memsize":32}
{"address":"0x105130680", "type":"SHAPE", "id":52, "parent_id":51, "depth":29, "shape_type":"IVAR","edge_name":"@ivar_23", "edges":1, "memsize":32}
{"address":"0x1051306a0", "type":"SHAPE", "id":53, "parent_id":52, "depth":30, "shape_type":"CAPACITY_CHANGE", "capacity":48, "edges":1, "memsize":32}
{"address":"0x1051306c0", "type":"SHAPE", "id":54, "parent_id":53, "depth":31, "shape_type":"IVAR","edge_name":"@ivar_24", "edges":1, "memsize":32}
{"address":"0x1051306e0", "type":"SHAPE", "id":55, "parent_id":54, "depth":32, "shape_type":"IVAR","edge_name":"@ivar_25", "edges":1, "memsize":32}
{"address":"0x105130700", "type":"SHAPE", "id":56, "parent_id":55, "depth":33, "shape_type":"IVAR","edge_name":"@ivar_26", "edges":1, "memsize":32}
{"address":"0x105130720", "type":"SHAPE", "id":57, "parent_id":56, "depth":34, "shape_type":"IVAR","edge_name":"@ivar_27", "edges":1, "memsize":32}
{"address":"0x105130740", "type":"SHAPE", "id":58, "parent_id":57, "depth":35, "shape_type":"IVAR","edge_name":"@ivar_28", "edges":1, "memsize":32}
{"address":"0x105130760", "type":"SHAPE", "id":59, "parent_id":58, "depth":36, "shape_type":"IVAR","edge_name":"@ivar_29", "edges":1, "memsize":32}
{"address":"0x105130780", "type":"SHAPE", "id":60, "parent_id":59, "depth":37, "shape_type":"IVAR","edge_name":"@ivar_30", "edges":1, "memsize":32}
{"address":"0x1051307a0", "type":"SHAPE", "id":61, "parent_id":60, "depth":38, "shape_type":"IVAR","edge_name":"@ivar_31", "edges":1, "memsize":32}
{"address":"0x1051307c0", "type":"SHAPE", "id":62, "parent_id":61, "depth":39, "shape_type":"IVAR","edge_name":"@ivar_32", "edges":1, "memsize":32}
{"address":"0x1051307e0", "type":"SHAPE", "id":63, "parent_id":62, "depth":40, "shape_type":"IVAR","edge_name":"@ivar_33", "edges":1, "memsize":32}
{"address":"0x105130800", "type":"SHAPE", "id":64, "parent_id":63, "depth":41, "shape_type":"IVAR","edge_name":"@ivar_34", "edges":1, "memsize":32}
{"address":"0x105130820", "type":"SHAPE", "id":65, "parent_id":64, "depth":42, "shape_type":"IVAR","edge_name":"@ivar_35", "edges":1, "memsize":32}
{"address":"0x105130840", "type":"SHAPE", "id":66, "parent_id":65, "depth":43, "shape_type":"IVAR","edge_name":"@ivar_36", "edges":1, "memsize":32}
{"address":"0x105130860", "type":"SHAPE", "id":67, "parent_id":66, "depth":44, "shape_type":"IVAR","edge_name":"@ivar_37", "edges":1, "memsize":32}
{"address":"0x105130880", "type":"SHAPE", "id":68, "parent_id":67, "depth":45, "shape_type":"IVAR","edge_name":"@ivar_38", "edges":1, "memsize":32}
{"address":"0x1051308a0", "type":"SHAPE", "id":69, "parent_id":68, "depth":46, "shape_type":"IVAR","edge_name":"@ivar_39", "edges":1, "memsize":32}
{"address":"0x1051308c0", "type":"SHAPE", "id":70, "parent_id":69, "depth":47, "shape_type":"IVAR","edge_name":"@ivar_40", "edges":1, "memsize":32}
{"address":"0x1051308e0", "type":"SHAPE", "id":71, "parent_id":70, "depth":48, "shape_type":"IVAR","edge_name":"@ivar_41", "edges":1, "memsize":32}
{"address":"0x105130900", "type":"SHAPE", "id":72, "parent_id":71, "depth":49, "shape_type":"IVAR","edge_name":"@ivar_42", "edges":1, "memsize":32}
{"address":"0x105130920", "type":"SHAPE", "id":73, "parent_id":72, "depth":50, "shape_type":"IVAR","edge_name":"@ivar_43", "edges":1, "memsize":32}
{"address":"0x105130940", "type":"SHAPE", "id":74, "parent_id":73, "depth":51, "shape_type":"IVAR","edge_name":"@ivar_44", "edges":1, "memsize":32}
{"address":"0x105130960", "type":"SHAPE", "id":75, "parent_id":74, "depth":52, "shape_type":"IVAR","edge_name":"@ivar_45", "edges":1, "memsize":32}
{"address":"0x105130980", "type":"SHAPE", "id":76, "parent_id":75, "depth":53, "shape_type":"IVAR","edge_name":"@ivar_46", "edges":1, "memsize":32}
{"address":"0x1051309a0", "type":"SHAPE", "id":77, "parent_id":76, "depth":54, "shape_type":"IVAR","edge_name":"@ivar_47", "edges":1, "memsize":32}
{"address":"0x1051309c0", "type":"SHAPE", "id":78, "parent_id":77, "depth":55, "shape_type":"CAPACITY_CHANGE", "capacity":96, "edges":1, "memsize":32}
{"address":"0x1051309e0", "type":"SHAPE", "id":79, "parent_id":78, "depth":56, "shape_type":"IVAR","edge_name":"@ivar_48", "edges":1, "memsize":32}
{"address":"0x105130a00", "type":"SHAPE", "id":80, "parent_id":79, "depth":57, "shape_type":"IVAR","edge_name":"@ivar_49", "edges":1, "memsize":32}
{"address":"0x105130a20", "type":"SHAPE", "id":81, "parent_id":80, "depth":58, "shape_type":"IVAR","edge_name":"@ivar_50", "edges":1, "memsize":32}
{"address":"0x105130a40", "type":"SHAPE", "id":82, "parent_id":81, "depth":59, "shape_type":"IVAR","edge_name":"@ivar_51", "edges":1, "memsize":32}
{"address":"0x105130a60", "type":"SHAPE", "id":83, "parent_id":82, "depth":60, "shape_type":"IVAR","edge_name":"@ivar_52", "edges":1, "memsize":32}
{"address":"0x105130a80", "type":"SHAPE", "id":84, "parent_id":83, "depth":61, "shape_type":"IVAR","edge_name":"@ivar_53", "edges":1, "memsize":32}
{"address":"0x105130aa0", "type":"SHAPE", "id":85, "parent_id":84, "depth":62, "shape_type":"IVAR","edge_name":"@ivar_54", "edges":1, "memsize":32}
{"address":"0x105130ac0", "type":"SHAPE", "id":86, "parent_id":85, "depth":63, "shape_type":"IVAR","edge_name":"@ivar_55", "edges":1, "memsize":32}
{"address":"0x105130ae0", "type":"SHAPE", "id":87, "parent_id":86, "depth":64, "shape_type":"IVAR","edge_name":"@ivar_56", "edges":1, "memsize":32}
{"address":"0x105130b00", "type":"SHAPE", "id":88, "parent_id":87, "depth":65, "shape_type":"IVAR","edge_name":"@ivar_57", "edges":1, "memsize":32}
{"address":"0x105130b20", "type":"SHAPE", "id":89, "parent_id":88, "depth":66, "shape_type":"IVAR","edge_name":"@ivar_58", "edges":1, "memsize":32}
{"address":"0x105130b40", "type":"SHAPE", "id":90, "parent_id":89, "depth":67, "shape_type":"IVAR","edge_name":"@ivar_59", "edges":1, "memsize":32}
{"address":"0x105130b60", "type":"SHAPE", "id":91, "parent_id":90, "depth":68, "shape_type":"IVAR","edge_name":"@ivar_60", "edges":1, "memsize":32}
{"address":"0x105130b80", "type":"SHAPE", "id":92, "parent_id":91, "depth":69, "shape_type":"IVAR","edge_name":"@ivar_61", "edges":1, "memsize":32}
{"address":"0x105130ba0", "type":"SHAPE", "id":93, "parent_id":92, "depth":70, "shape_type":"IVAR","edge_name":"@ivar_62", "edges":1, "memsize":32}
{"address":"0x105130bc0", "type":"SHAPE", "id":94, "parent_id":93, "depth":71, "shape_type":"IVAR","edge_name":"@ivar_63", "edges":1, "memsize":32}
{"address":"0x105130be0", "type":"SHAPE", "id":95, "parent_id":94, "depth":72, "shape_type":"IVAR","edge_name":"@ivar_64", "edges":1, "memsize":32}
{"address":"0x105130c00", "type":"SHAPE", "id":96, "parent_id":95, "depth":73, "shape_type":"IVAR","edge_name":"@ivar_65", "edges":1, "memsize":32}
{"address":"0x105130c20", "type":"SHAPE", "id":97, "parent_id":96, "depth":74, "shape_type":"IVAR","edge_name":"@ivar_66", "edges":1, "memsize":32}
{"address":"0x105130c40", "type":"SHAPE", "id":98, "parent_id":97, "depth":75, "shape_type":"IVAR","edge_name":"@ivar_67", "edges":1, "memsize":32}
{"address":"0x105130c60", "type":"SHAPE", "id":99, "parent_id":98, "depth":76, "shape_type":"IVAR","edge_name":"@ivar_68", "edges":1, "memsize":32}
{"address":"0x105130c80", "type":"SHAPE", "id":100, "parent_id":99, "depth":77, "shape_type":"IVAR","edge_name":"@ivar_69", "edges":1, "memsize":32}
{"address":"0x105130ca0", "type":"SHAPE", "id":101, "parent_id":100, "depth":78, "shape_type":"IVAR","edge_name":"@ivar_70", "edges":1, "memsize":32}
{"address":"0x105130cc0", "type":"SHAPE", "id":102, "parent_id":101, "depth":79, "shape_type":"IVAR","edge_name":"@ivar_71", "edges":1, "memsize":32}
{"address":"0x105130ce0", "type":"SHAPE", "id":103, "parent_id":102, "depth":80, "shape_type":"IVAR","edge_name":"@ivar_72", "edges":1, "memsize":32}
{"address":"0x105130d00", "type":"SHAPE", "id":104, "parent_id":103, "depth":81, "shape_type":"IVAR","edge_name":"@ivar_73", "edges":1, "memsize":32}
{"address":"0x105130d20", "type":"SHAPE", "id":105, "parent_id":104, "depth":82, "shape_type":"IVAR","edge_name":"@ivar_74", "edges":1, "memsize":32}
{"address":"0x105130d40", "type":"SHAPE", "id":106, "parent_id":105, "depth":83, "shape_type":"IVAR","edge_name":"@ivar_75", "edges":1, "memsize":32}
{"address":"0x105130d60", "type":"SHAPE", "id":107, "parent_id":106, "depth":84, "shape_type":"IVAR","edge_name":"@ivar_76", "edges":1, "memsize":32}
{"address":"0x105130d80", "type":"SHAPE", "id":108, "parent_id":107, "depth":85, "shape_type":"IVAR","edge_name":"@ivar_77", "edges":1, "memsize":32}
{"address":"0x105130da0", "type":"SHAPE", "id":109, "parent_id":108, "depth":86, "shape_type":"IVAR","edge_name":"@ivar_78", "edges":1, "memsize":32}
{"address":"0x105130dc0", "type":"SHAPE", "id":110, "parent_id":109, "depth":87, "shape_type":"IVAR","edge_name":"@ivar_79", "edges":0, "memsize":32}

cc @tenderlove @jemmaissroff

@casperisfine
Copy link
Author

casperisfine commented Oct 10, 2023

And the 3.2.2 shape list to compare:

$ ruby --disable-gems /tmp/too-complex.rb
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
{"address":"0x1005202a0", "type":"OBJECT", "shape_id":132, "slot_size":40, "class":"0x1006099c8", "ivars":100, "memsize":1576, "flags":{"wb_protected":true}}
{"address":"0x10050d2b8", "type":"OBJECT", "shape_id":132, "slot_size":40, "class":"0x1006099c8", "ivars":100, "memsize":1576, "flags":{"wb_protected":true}}
----------------------------------------
{"address":"0x101290000", "type":"SHAPE", "id":0, "depth":1, "shape_type":"ROOT", "edges":6, "memsize":184}
{"address":"0x101290020", "type":"SHAPE", "id":1, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":8, "edges":3, "memsize":120}
{"address":"0x101290040", "type":"SHAPE", "id":2, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":18, "edges":5, "memsize":184}
{"address":"0x101290060", "type":"SHAPE", "id":3, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":38, "edges":2, "memsize":120}
{"address":"0x101290080", "type":"SHAPE", "id":4, "parent_id":0, "depth":2, "shape_type":"INITIAL_CAPACITY", "capacity":78, "edges":1, "memsize":120}
{"address":"0x1012900a0", "type":"SHAPE", "id":5, "parent_id":0, "depth":2, "shape_type":"T_OBJECT", "edges":3, "memsize":120}
{"address":"0x1012900c0", "type":"SHAPE", "id":6, "parent_id":1, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x1012900e0", "type":"SHAPE", "id":7, "parent_id":2, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x101290100", "type":"SHAPE", "id":8, "parent_id":3, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x101290120", "type":"SHAPE", "id":9, "parent_id":4, "depth":3, "shape_type":"T_OBJECT", "edges":0, "memsize":56}
{"address":"0x101290140", "type":"SHAPE", "id":10, "parent_id":0, "depth":2, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x101290160", "type":"SHAPE", "id":11, "parent_id":0, "depth":2, "shape_type":"OBJ_TOO_COMPLEX", "edges":0, "memsize":32}
{"address":"0x101290180", "type":"SHAPE", "id":12, "parent_id":1, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x1012901a0", "type":"SHAPE", "id":13, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(250)", "edges":2, "memsize":120}
{"address":"0x1012901c0", "type":"SHAPE", "id":14, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(194)", "edges":0, "memsize":32}
{"address":"0x1012901e0", "type":"SHAPE", "id":15, "parent_id":5, "depth":3, "shape_type":"IVAR","edge_name":"ID_INTERNAL(215)", "edges":1, "memsize":120}
{"address":"0x101290200", "type":"SHAPE", "id":16, "parent_id":15, "depth":4, "shape_type":"IVAR","edge_name":"ID_INTERNAL(212)", "edges":1, "memsize":120}
{"address":"0x101290220", "type":"SHAPE", "id":17, "parent_id":16, "depth":5, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x101290240", "type":"SHAPE", "id":18, "parent_id":13, "depth":4, "shape_type":"IVAR","edge_name":"ID_INTERNAL(911)", "edges":1, "memsize":120}
{"address":"0x101290260", "type":"SHAPE", "id":19, "parent_id":18, "depth":5, "shape_type":"IVAR","edge_name":"ID_INTERNAL(912)", "edges":0, "memsize":32}
{"address":"0x101290280", "type":"SHAPE", "id":20, "parent_id":5, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x1012902a0", "type":"SHAPE", "id":21, "parent_id":1, "depth":3, "shape_type":"IVAR","edge_name":"@gem_prelude_index", "edges":1, "memsize":120}
{"address":"0x1012902c0", "type":"SHAPE", "id":22, "parent_id":2, "depth":3, "shape_type":"IVAR","edge_name":"@gem_prelude_index", "edges":1, "memsize":120}
{"address":"0x1012902e0", "type":"SHAPE", "id":23, "parent_id":21, "depth":4, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x101290300", "type":"SHAPE", "id":24, "parent_id":22, "depth":4, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x101290320", "type":"SHAPE", "id":25, "parent_id":2, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}
{"address":"0x101290340", "type":"SHAPE", "id":26, "parent_id":13, "depth":4, "shape_type":"IVAR","edge_name":"ID_INTERNAL(249)", "edges":0, "memsize":32}
{"address":"0x101290360", "type":"SHAPE", "id":27, "parent_id":5, "depth":3, "shape_type":"IVAR","edge_name":"@ivar_0", "edges":1, "memsize":120}
{"address":"0x101290380", "type":"SHAPE", "id":28, "parent_id":27, "depth":4, "shape_type":"IVAR","edge_name":"@ivar_1", "edges":1, "memsize":120}
{"address":"0x1012903a0", "type":"SHAPE", "id":29, "parent_id":28, "depth":5, "shape_type":"IVAR","edge_name":"@ivar_2", "edges":1, "memsize":120}
{"address":"0x1012903c0", "type":"SHAPE", "id":30, "parent_id":29, "depth":6, "shape_type":"CAPACITY_CHANGE", "capacity":6, "edges":1, "memsize":120}
{"address":"0x1012903e0", "type":"SHAPE", "id":31, "parent_id":30, "depth":7, "shape_type":"IVAR","edge_name":"@ivar_3", "edges":1, "memsize":120}
{"address":"0x101290400", "type":"SHAPE", "id":32, "parent_id":31, "depth":8, "shape_type":"IVAR","edge_name":"@ivar_4", "edges":1, "memsize":120}
{"address":"0x101290420", "type":"SHAPE", "id":33, "parent_id":32, "depth":9, "shape_type":"IVAR","edge_name":"@ivar_5", "edges":1, "memsize":120}
{"address":"0x101290440", "type":"SHAPE", "id":34, "parent_id":33, "depth":10, "shape_type":"CAPACITY_CHANGE", "capacity":12, "edges":1, "memsize":120}
{"address":"0x101290460", "type":"SHAPE", "id":35, "parent_id":34, "depth":11, "shape_type":"IVAR","edge_name":"@ivar_6", "edges":1, "memsize":120}
{"address":"0x101290480", "type":"SHAPE", "id":36, "parent_id":35, "depth":12, "shape_type":"IVAR","edge_name":"@ivar_7", "edges":1, "memsize":120}
{"address":"0x1012904a0", "type":"SHAPE", "id":37, "parent_id":36, "depth":13, "shape_type":"IVAR","edge_name":"@ivar_8", "edges":1, "memsize":120}
{"address":"0x1012904c0", "type":"SHAPE", "id":38, "parent_id":37, "depth":14, "shape_type":"IVAR","edge_name":"@ivar_9", "edges":1, "memsize":120}
{"address":"0x1012904e0", "type":"SHAPE", "id":39, "parent_id":38, "depth":15, "shape_type":"IVAR","edge_name":"@ivar_10", "edges":1, "memsize":120}
{"address":"0x101290500", "type":"SHAPE", "id":40, "parent_id":39, "depth":16, "shape_type":"IVAR","edge_name":"@ivar_11", "edges":1, "memsize":120}
{"address":"0x101290520", "type":"SHAPE", "id":41, "parent_id":40, "depth":17, "shape_type":"CAPACITY_CHANGE", "capacity":24, "edges":1, "memsize":120}
{"address":"0x101290540", "type":"SHAPE", "id":42, "parent_id":41, "depth":18, "shape_type":"IVAR","edge_name":"@ivar_12", "edges":1, "memsize":120}
{"address":"0x101290560", "type":"SHAPE", "id":43, "parent_id":42, "depth":19, "shape_type":"IVAR","edge_name":"@ivar_13", "edges":1, "memsize":120}
{"address":"0x101290580", "type":"SHAPE", "id":44, "parent_id":43, "depth":20, "shape_type":"IVAR","edge_name":"@ivar_14", "edges":1, "memsize":120}
{"address":"0x1012905a0", "type":"SHAPE", "id":45, "parent_id":44, "depth":21, "shape_type":"IVAR","edge_name":"@ivar_15", "edges":1, "memsize":120}
{"address":"0x1012905c0", "type":"SHAPE", "id":46, "parent_id":45, "depth":22, "shape_type":"IVAR","edge_name":"@ivar_16", "edges":1, "memsize":120}
{"address":"0x1012905e0", "type":"SHAPE", "id":47, "parent_id":46, "depth":23, "shape_type":"IVAR","edge_name":"@ivar_17", "edges":1, "memsize":120}
{"address":"0x101290600", "type":"SHAPE", "id":48, "parent_id":47, "depth":24, "shape_type":"IVAR","edge_name":"@ivar_18", "edges":1, "memsize":120}
{"address":"0x101290620", "type":"SHAPE", "id":49, "parent_id":48, "depth":25, "shape_type":"IVAR","edge_name":"@ivar_19", "edges":1, "memsize":120}
{"address":"0x101290640", "type":"SHAPE", "id":50, "parent_id":49, "depth":26, "shape_type":"IVAR","edge_name":"@ivar_20", "edges":1, "memsize":120}
{"address":"0x101290660", "type":"SHAPE", "id":51, "parent_id":50, "depth":27, "shape_type":"IVAR","edge_name":"@ivar_21", "edges":1, "memsize":120}
{"address":"0x101290680", "type":"SHAPE", "id":52, "parent_id":51, "depth":28, "shape_type":"IVAR","edge_name":"@ivar_22", "edges":1, "memsize":120}
{"address":"0x1012906a0", "type":"SHAPE", "id":53, "parent_id":52, "depth":29, "shape_type":"IVAR","edge_name":"@ivar_23", "edges":1, "memsize":120}
{"address":"0x1012906c0", "type":"SHAPE", "id":54, "parent_id":53, "depth":30, "shape_type":"CAPACITY_CHANGE", "capacity":48, "edges":1, "memsize":120}
{"address":"0x1012906e0", "type":"SHAPE", "id":55, "parent_id":54, "depth":31, "shape_type":"IVAR","edge_name":"@ivar_24", "edges":1, "memsize":120}
{"address":"0x101290700", "type":"SHAPE", "id":56, "parent_id":55, "depth":32, "shape_type":"IVAR","edge_name":"@ivar_25", "edges":1, "memsize":120}
{"address":"0x101290720", "type":"SHAPE", "id":57, "parent_id":56, "depth":33, "shape_type":"IVAR","edge_name":"@ivar_26", "edges":1, "memsize":120}
{"address":"0x101290740", "type":"SHAPE", "id":58, "parent_id":57, "depth":34, "shape_type":"IVAR","edge_name":"@ivar_27", "edges":1, "memsize":120}
{"address":"0x101290760", "type":"SHAPE", "id":59, "parent_id":58, "depth":35, "shape_type":"IVAR","edge_name":"@ivar_28", "edges":1, "memsize":120}
{"address":"0x101290780", "type":"SHAPE", "id":60, "parent_id":59, "depth":36, "shape_type":"IVAR","edge_name":"@ivar_29", "edges":1, "memsize":120}
{"address":"0x1012907a0", "type":"SHAPE", "id":61, "parent_id":60, "depth":37, "shape_type":"IVAR","edge_name":"@ivar_30", "edges":1, "memsize":120}
{"address":"0x1012907c0", "type":"SHAPE", "id":62, "parent_id":61, "depth":38, "shape_type":"IVAR","edge_name":"@ivar_31", "edges":1, "memsize":120}
{"address":"0x1012907e0", "type":"SHAPE", "id":63, "parent_id":62, "depth":39, "shape_type":"IVAR","edge_name":"@ivar_32", "edges":1, "memsize":120}
{"address":"0x101290800", "type":"SHAPE", "id":64, "parent_id":63, "depth":40, "shape_type":"IVAR","edge_name":"@ivar_33", "edges":1, "memsize":120}
{"address":"0x101290820", "type":"SHAPE", "id":65, "parent_id":64, "depth":41, "shape_type":"IVAR","edge_name":"@ivar_34", "edges":1, "memsize":120}
{"address":"0x101290840", "type":"SHAPE", "id":66, "parent_id":65, "depth":42, "shape_type":"IVAR","edge_name":"@ivar_35", "edges":1, "memsize":120}
{"address":"0x101290860", "type":"SHAPE", "id":67, "parent_id":66, "depth":43, "shape_type":"IVAR","edge_name":"@ivar_36", "edges":1, "memsize":120}
{"address":"0x101290880", "type":"SHAPE", "id":68, "parent_id":67, "depth":44, "shape_type":"IVAR","edge_name":"@ivar_37", "edges":1, "memsize":120}
{"address":"0x1012908a0", "type":"SHAPE", "id":69, "parent_id":68, "depth":45, "shape_type":"IVAR","edge_name":"@ivar_38", "edges":1, "memsize":120}
{"address":"0x1012908c0", "type":"SHAPE", "id":70, "parent_id":69, "depth":46, "shape_type":"IVAR","edge_name":"@ivar_39", "edges":1, "memsize":120}
{"address":"0x1012908e0", "type":"SHAPE", "id":71, "parent_id":70, "depth":47, "shape_type":"IVAR","edge_name":"@ivar_40", "edges":1, "memsize":120}
{"address":"0x101290900", "type":"SHAPE", "id":72, "parent_id":71, "depth":48, "shape_type":"IVAR","edge_name":"@ivar_41", "edges":1, "memsize":120}
{"address":"0x101290920", "type":"SHAPE", "id":73, "parent_id":72, "depth":49, "shape_type":"IVAR","edge_name":"@ivar_42", "edges":1, "memsize":120}
{"address":"0x101290940", "type":"SHAPE", "id":74, "parent_id":73, "depth":50, "shape_type":"IVAR","edge_name":"@ivar_43", "edges":1, "memsize":120}
{"address":"0x101290960", "type":"SHAPE", "id":75, "parent_id":74, "depth":51, "shape_type":"IVAR","edge_name":"@ivar_44", "edges":1, "memsize":120}
{"address":"0x101290980", "type":"SHAPE", "id":76, "parent_id":75, "depth":52, "shape_type":"IVAR","edge_name":"@ivar_45", "edges":1, "memsize":120}
{"address":"0x1012909a0", "type":"SHAPE", "id":77, "parent_id":76, "depth":53, "shape_type":"IVAR","edge_name":"@ivar_46", "edges":1, "memsize":120}
{"address":"0x1012909c0", "type":"SHAPE", "id":78, "parent_id":77, "depth":54, "shape_type":"IVAR","edge_name":"@ivar_47", "edges":1, "memsize":120}
{"address":"0x1012909e0", "type":"SHAPE", "id":79, "parent_id":78, "depth":55, "shape_type":"CAPACITY_CHANGE", "capacity":96, "edges":1, "memsize":120}
{"address":"0x101290a00", "type":"SHAPE", "id":80, "parent_id":79, "depth":56, "shape_type":"IVAR","edge_name":"@ivar_48", "edges":1, "memsize":120}
{"address":"0x101290a20", "type":"SHAPE", "id":81, "parent_id":80, "depth":57, "shape_type":"IVAR","edge_name":"@ivar_49", "edges":1, "memsize":120}
{"address":"0x101290a40", "type":"SHAPE", "id":82, "parent_id":81, "depth":58, "shape_type":"IVAR","edge_name":"@ivar_50", "edges":1, "memsize":120}
{"address":"0x101290a60", "type":"SHAPE", "id":83, "parent_id":82, "depth":59, "shape_type":"IVAR","edge_name":"@ivar_51", "edges":1, "memsize":120}
{"address":"0x101290a80", "type":"SHAPE", "id":84, "parent_id":83, "depth":60, "shape_type":"IVAR","edge_name":"@ivar_52", "edges":1, "memsize":120}
{"address":"0x101290aa0", "type":"SHAPE", "id":85, "parent_id":84, "depth":61, "shape_type":"IVAR","edge_name":"@ivar_53", "edges":1, "memsize":120}
{"address":"0x101290ac0", "type":"SHAPE", "id":86, "parent_id":85, "depth":62, "shape_type":"IVAR","edge_name":"@ivar_54", "edges":1, "memsize":120}
{"address":"0x101290ae0", "type":"SHAPE", "id":87, "parent_id":86, "depth":63, "shape_type":"IVAR","edge_name":"@ivar_55", "edges":1, "memsize":120}
{"address":"0x101290b00", "type":"SHAPE", "id":88, "parent_id":87, "depth":64, "shape_type":"IVAR","edge_name":"@ivar_56", "edges":1, "memsize":120}
{"address":"0x101290b20", "type":"SHAPE", "id":89, "parent_id":88, "depth":65, "shape_type":"IVAR","edge_name":"@ivar_57", "edges":1, "memsize":120}
{"address":"0x101290b40", "type":"SHAPE", "id":90, "parent_id":89, "depth":66, "shape_type":"IVAR","edge_name":"@ivar_58", "edges":1, "memsize":120}
{"address":"0x101290b60", "type":"SHAPE", "id":91, "parent_id":90, "depth":67, "shape_type":"IVAR","edge_name":"@ivar_59", "edges":1, "memsize":120}
{"address":"0x101290b80", "type":"SHAPE", "id":92, "parent_id":91, "depth":68, "shape_type":"IVAR","edge_name":"@ivar_60", "edges":1, "memsize":120}
{"address":"0x101290ba0", "type":"SHAPE", "id":93, "parent_id":92, "depth":69, "shape_type":"IVAR","edge_name":"@ivar_61", "edges":1, "memsize":120}
{"address":"0x101290bc0", "type":"SHAPE", "id":94, "parent_id":93, "depth":70, "shape_type":"IVAR","edge_name":"@ivar_62", "edges":1, "memsize":120}
{"address":"0x101290be0", "type":"SHAPE", "id":95, "parent_id":94, "depth":71, "shape_type":"IVAR","edge_name":"@ivar_63", "edges":1, "memsize":120}
{"address":"0x101290c00", "type":"SHAPE", "id":96, "parent_id":95, "depth":72, "shape_type":"IVAR","edge_name":"@ivar_64", "edges":1, "memsize":120}
{"address":"0x101290c20", "type":"SHAPE", "id":97, "parent_id":96, "depth":73, "shape_type":"IVAR","edge_name":"@ivar_65", "edges":1, "memsize":120}
{"address":"0x101290c40", "type":"SHAPE", "id":98, "parent_id":97, "depth":74, "shape_type":"IVAR","edge_name":"@ivar_66", "edges":1, "memsize":120}
{"address":"0x101290c60", "type":"SHAPE", "id":99, "parent_id":98, "depth":75, "shape_type":"IVAR","edge_name":"@ivar_67", "edges":1, "memsize":120}
{"address":"0x101290c80", "type":"SHAPE", "id":100, "parent_id":99, "depth":76, "shape_type":"IVAR","edge_name":"@ivar_68", "edges":1, "memsize":120}
{"address":"0x101290ca0", "type":"SHAPE", "id":101, "parent_id":100, "depth":77, "shape_type":"IVAR","edge_name":"@ivar_69", "edges":1, "memsize":120}
{"address":"0x101290cc0", "type":"SHAPE", "id":102, "parent_id":101, "depth":78, "shape_type":"IVAR","edge_name":"@ivar_70", "edges":1, "memsize":120}
{"address":"0x101290ce0", "type":"SHAPE", "id":103, "parent_id":102, "depth":79, "shape_type":"IVAR","edge_name":"@ivar_71", "edges":1, "memsize":120}
{"address":"0x101290d00", "type":"SHAPE", "id":104, "parent_id":103, "depth":80, "shape_type":"IVAR","edge_name":"@ivar_72", "edges":1, "memsize":120}
{"address":"0x101290d20", "type":"SHAPE", "id":105, "parent_id":104, "depth":81, "shape_type":"IVAR","edge_name":"@ivar_73", "edges":1, "memsize":120}
{"address":"0x101290d40", "type":"SHAPE", "id":106, "parent_id":105, "depth":82, "shape_type":"IVAR","edge_name":"@ivar_74", "edges":1, "memsize":120}
{"address":"0x101290d60", "type":"SHAPE", "id":107, "parent_id":106, "depth":83, "shape_type":"IVAR","edge_name":"@ivar_75", "edges":1, "memsize":120}
{"address":"0x101290d80", "type":"SHAPE", "id":108, "parent_id":107, "depth":84, "shape_type":"IVAR","edge_name":"@ivar_76", "edges":1, "memsize":120}
{"address":"0x101290da0", "type":"SHAPE", "id":109, "parent_id":108, "depth":85, "shape_type":"IVAR","edge_name":"@ivar_77", "edges":1, "memsize":120}
{"address":"0x101290dc0", "type":"SHAPE", "id":110, "parent_id":109, "depth":86, "shape_type":"IVAR","edge_name":"@ivar_78", "edges":1, "memsize":120}
{"address":"0x101290de0", "type":"SHAPE", "id":111, "parent_id":110, "depth":87, "shape_type":"IVAR","edge_name":"@ivar_79", "edges":1, "memsize":120}
{"address":"0x101290e00", "type":"SHAPE", "id":112, "parent_id":111, "depth":88, "shape_type":"IVAR","edge_name":"@ivar_80", "edges":1, "memsize":120}
{"address":"0x101290e20", "type":"SHAPE", "id":113, "parent_id":112, "depth":89, "shape_type":"IVAR","edge_name":"@ivar_81", "edges":1, "memsize":120}
{"address":"0x101290e40", "type":"SHAPE", "id":114, "parent_id":113, "depth":90, "shape_type":"IVAR","edge_name":"@ivar_82", "edges":1, "memsize":120}
{"address":"0x101290e60", "type":"SHAPE", "id":115, "parent_id":114, "depth":91, "shape_type":"IVAR","edge_name":"@ivar_83", "edges":1, "memsize":120}
{"address":"0x101290e80", "type":"SHAPE", "id":116, "parent_id":115, "depth":92, "shape_type":"IVAR","edge_name":"@ivar_84", "edges":1, "memsize":120}
{"address":"0x101290ea0", "type":"SHAPE", "id":117, "parent_id":116, "depth":93, "shape_type":"IVAR","edge_name":"@ivar_85", "edges":1, "memsize":120}
{"address":"0x101290ec0", "type":"SHAPE", "id":118, "parent_id":117, "depth":94, "shape_type":"IVAR","edge_name":"@ivar_86", "edges":1, "memsize":120}
{"address":"0x101290ee0", "type":"SHAPE", "id":119, "parent_id":118, "depth":95, "shape_type":"IVAR","edge_name":"@ivar_87", "edges":1, "memsize":120}
{"address":"0x101290f00", "type":"SHAPE", "id":120, "parent_id":119, "depth":96, "shape_type":"IVAR","edge_name":"@ivar_88", "edges":1, "memsize":120}
{"address":"0x101290f20", "type":"SHAPE", "id":121, "parent_id":120, "depth":97, "shape_type":"IVAR","edge_name":"@ivar_89", "edges":1, "memsize":120}
{"address":"0x101290f40", "type":"SHAPE", "id":122, "parent_id":121, "depth":98, "shape_type":"IVAR","edge_name":"@ivar_90", "edges":1, "memsize":120}
{"address":"0x101290f60", "type":"SHAPE", "id":123, "parent_id":122, "depth":99, "shape_type":"IVAR","edge_name":"@ivar_91", "edges":1, "memsize":120}
{"address":"0x101290f80", "type":"SHAPE", "id":124, "parent_id":123, "depth":100, "shape_type":"IVAR","edge_name":"@ivar_92", "edges":1, "memsize":120}
{"address":"0x101290fa0", "type":"SHAPE", "id":125, "parent_id":124, "depth":101, "shape_type":"IVAR","edge_name":"@ivar_93", "edges":1, "memsize":120}
{"address":"0x101290fc0", "type":"SHAPE", "id":126, "parent_id":125, "depth":102, "shape_type":"IVAR","edge_name":"@ivar_94", "edges":1, "memsize":120}
{"address":"0x101290fe0", "type":"SHAPE", "id":127, "parent_id":126, "depth":103, "shape_type":"IVAR","edge_name":"@ivar_95", "edges":1, "memsize":120}
{"address":"0x101291000", "type":"SHAPE", "id":128, "parent_id":127, "depth":104, "shape_type":"CAPACITY_CHANGE", "capacity":192, "edges":1, "memsize":120}
{"address":"0x101291020", "type":"SHAPE", "id":129, "parent_id":128, "depth":105, "shape_type":"IVAR","edge_name":"@ivar_96", "edges":1, "memsize":120}
{"address":"0x101291040", "type":"SHAPE", "id":130, "parent_id":129, "depth":106, "shape_type":"IVAR","edge_name":"@ivar_97", "edges":1, "memsize":120}
{"address":"0x101291060", "type":"SHAPE", "id":131, "parent_id":130, "depth":107, "shape_type":"IVAR","edge_name":"@ivar_98", "edges":1, "memsize":120}
{"address":"0x101291080", "type":"SHAPE", "id":132, "parent_id":131, "depth":108, "shape_type":"IVAR","edge_name":"@ivar_99", "edges":0, "memsize":32}
{"address":"0x1012910a0", "type":"SHAPE", "id":133, "parent_id":3, "depth":3, "shape_type":"FROZEN", "edges":0, "memsize":32}

@casperisfine
Copy link
Author

Ok, after digging a bit it's because we run into ruby#7188, initially it was set at 50, now it's at 80.

I'll try to figure out the reasoning.

@casperisfine
Copy link
Author

Ah, it was in response to https://bugs.ruby-lang.org/issues/19334.

@casperisfine
Copy link
Author

So what happened with the idea of keeping an id_table of ivar_name => shape_id every X shape? Was it ever explored?

@tenderlove
Copy link

So what happened with the idea of keeping an id_table of ivar_name => shape_id every X shape? Was it ever explored?

AFAIK it just hasn't been prioritized yet. I implemented a functional red black tree for doing the lookups, but we're not sure if the memory usage is worth the speed. IOW, are inline cache misses frequent enough that it's a bottleneck? Especially with YJIT enabled.

My red-black tree implementation is here. I'll rebase it against master so we can try again.

@casperisfine
Copy link
Author

IOW, are inline cache misses frequent enough that it's a bottleneck? Especially with YJIT enabled.

I don't have actual production number. I was working from micro-benchmark, e.g. trying to eyeball the performance impact of the rather common "memoization" pattern.

It would be nice to get some production statistics, but we'd need a modified ruby build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants