mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
objspace_dump: Include shareable
flag
Given that the currently planned ractor local GC implementation performance will heavilly be influenced by the number of shareable objects it would be valuable to be able to know how many of them are in the heap.
This commit is contained in:
parent
7af5a632f4
commit
cb1ea54bbf
2 changed files with 10 additions and 1 deletions
|
@ -977,6 +977,13 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
assert_equal class_name, JSON.parse(json)["name"]
|
||||
end
|
||||
|
||||
def test_dump_include_shareable
|
||||
omit 'Not provided by mmtk' if RUBY_DESCRIPTION.include?("+GC[mmtk]")
|
||||
|
||||
assert_include(ObjectSpace.dump(ENV), '"shareable":true')
|
||||
assert_not_include(ObjectSpace.dump([]), '"shareable":true')
|
||||
end
|
||||
|
||||
def test_utf8_method_names
|
||||
name = "utf8_❨╯°□°❩╯︵┻━┻"
|
||||
obj = ObjectSpace.trace_object_allocations do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue