<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/gc/mmtk/mmtk.h, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/mmtk] Implement fast path for bump pointer allocator</title>
<updated>2025-12-21T02:55:12+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-20T21:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=038b158fa30d1b1cda153aeb10dac5f59f966036'/>
<id>038b158fa30d1b1cda153aeb10dac5f59f966036</id>
<content type='text'>
Adding a fast path for bump pointer allocator can improve allocation
performance.

For the following microbenchmark with MMTK_HEAP_MIN=100MiB:

    10_000_000.times { String.new }

Before:

    810.7 ms ±   8.3 ms    [User: 790.9 ms, System: 40.3 ms]

After:

    777.9 ms ±  10.4 ms    [User: 759.0 ms, System: 37.9 ms]

https://github.com/ruby/mmtk/commit/0ff5c9f579
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding a fast path for bump pointer allocator can improve allocation
performance.

For the following microbenchmark with MMTK_HEAP_MIN=100MiB:

    10_000_000.times { String.new }

Before:

    810.7 ms ±   8.3 ms    [User: 790.9 ms, System: 40.3 ms]

After:

    777.9 ms ±  10.4 ms    [User: 759.0 ms, System: 37.9 ms]

https://github.com/ruby/mmtk/commit/0ff5c9f579
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Call rb_bug when Ruby mutator thread panics</title>
<updated>2025-12-20T13:40:00+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-12-19T22:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6bf921051ceba1742318e3c92dddd50ba4f05d17'/>
<id>6bf921051ceba1742318e3c92dddd50ba4f05d17</id>
<content type='text'>
This will allow the Ruby backtrace, memory mapping, etc. to be outputted
when a Ruby mutator thread panics.

https://github.com/ruby/mmtk/commit/d10fd325dd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow the Ruby backtrace, memory mapping, etc. to be outputted
when a Ruby mutator thread panics.

https://github.com/ruby/mmtk/commit/d10fd325dd
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Skip weak references that are special consts</title>
<updated>2025-07-30T13:26:19+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-07-29T20:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=74887a2c121bef639b7aae8d81d1e758994b5062'/>
<id>74887a2c121bef639b7aae8d81d1e758994b5062</id>
<content type='text'>
If a reference marked weak becomes a special const, it will crash because
it is not a GC handled object. We should skip special consts here.

https://github.com/ruby/mmtk/commit/870a79426b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a reference marked weak becomes a special const, it will crash because
it is not a GC handled object. We should skip special consts here.

https://github.com/ruby/mmtk/commit/870a79426b
</pre>
</div>
</content>
</entry>
<entry>
<title>Move `object_id` in object fields.</title>
<updated>2025-05-08T05:58:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-04-21T07:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f48e45d1e9c4412d5f3ee49241d0b9359651ce7c'/>
<id>f48e45d1e9c4412d5f3ee49241d0b9359651ce7c</id>
<content type='text'>
And get rid of the `obj_to_id_tbl`

It's no longer needed, the `object_id` is now stored inline
in the object alongside instance variables.

We still need the inverse table in case `_id2ref` is invoked, but
we lazily build it by walking the heap if that happens.

The `object_id` concern is also no longer a GC implementation
concern, but a generic implementation.

Co-Authored-By: Matt Valentine-House &lt;matt@eightbitraptor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And get rid of the `obj_to_id_tbl`

It's no longer needed, the `object_id` is now stored inline
in the object alongside instance variables.

We still need the inverse table in case `_id2ref` is invoked, but
we lazily build it by walking the heap if that happens.

The `object_id` concern is also no longer a GC implementation
concern, but a generic implementation.

Co-Authored-By: Matt Valentine-House &lt;matt@eightbitraptor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Do root scanning in scan_vm_specific_roots</title>
<updated>2025-04-08T03:12:50+00:00</updated>
<author>
<name>Kunshan Wang</name>
<email>wks1986@gmail.com</email>
</author>
<published>2025-04-07T07:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d17ab5a430d0068a9016746402b296ab7f87abe1'/>
<id>d17ab5a430d0068a9016746402b296ab7f87abe1</id>
<content type='text'>
We rely on scan_vm_specific_roots to reach all stacks via the following
path:

    VM -&gt; ractors -&gt; threads -&gt; fibers -&gt; stacks

https://github.com/ruby/mmtk/commit/0a6a835aaa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We rely on scan_vm_specific_roots to reach all stacks via the following
path:

    VM -&gt; ractors -&gt; threads -&gt; fibers -&gt; stacks

https://github.com/ruby/mmtk/commit/0a6a835aaa
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Trigger forced GC in GC.start</title>
<updated>2025-02-24T23:30:00+00:00</updated>
<author>
<name>Kunshan Wang</name>
<email>wks1986@gmail.com</email>
</author>
<published>2025-02-21T08:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa7b5e2df4e2acbc571998161ff4542b97b9d735'/>
<id>aa7b5e2df4e2acbc571998161ff4542b97b9d735</id>
<content type='text'>
We now use `MMTK::handle_user_collection_request(true, ...)` to force
triggering a GC instead of enabling GC temporarily.

https://github.com/ruby/mmtk/commit/02ef47f818
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We now use `MMTK::handle_user_collection_request(true, ...)` to force
triggering a GC instead of enabling GC temporarily.

https://github.com/ruby/mmtk/commit/02ef47f818
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Add mmtk_heap_max to GC.config</title>
<updated>2025-01-17T15:44:24+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-01-17T15:44:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5fceba661469ee34de462e36c053dce20de02f82'/>
<id>5fceba661469ee34de462e36c053dce20de02f82</id>
<content type='text'>
https://github.com/ruby/mmtk/commit/6a78ffaf16
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/mmtk/commit/6a78ffaf16
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Add mmtk_heap_min to GC.config</title>
<updated>2025-01-16T21:40:31+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-01-16T21:40:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=179899c6165a3a525a184781c9aafcd816d4f767'/>
<id>179899c6165a3a525a184781c9aafcd816d4f767</id>
<content type='text'>
https://github.com/ruby/mmtk/commit/5bbac70c69
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/mmtk/commit/5bbac70c69
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Add mmtk_heap_mode to GC.config</title>
<updated>2025-01-16T16:20:04+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-01-15T19:01:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2538f4d521249463d4564f7bc05606eb2f7caff0'/>
<id>2538f4d521249463d4564f7bc05606eb2f7caff0</id>
<content type='text'>
https://github.com/ruby/mmtk/commit/810f897603
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/mmtk/commit/810f897603
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/mmtk] Add mmtk_plan to GC.config</title>
<updated>2025-01-15T18:08:03+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-01-15T18:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ab1565ebe3691d85c0cc38c895ad0b35b35abd40'/>
<id>ab1565ebe3691d85c0cc38c895ad0b35b35abd40</id>
<content type='text'>
https://github.com/ruby/mmtk/commit/67da9ea5b8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/mmtk/commit/67da9ea5b8
</pre>
</div>
</content>
</entry>
</feed>
