<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/rjit.c, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>RJIT: Rewind $! after compilation</title>
<updated>2023-12-23T06:18:14+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-23T06:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=da02d08f2793c1c5d2ce084d6ceb6fa58ed641f2'/>
<id>da02d08f2793c1c5d2ce084d6ceb6fa58ed641f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Make --rjit-trace actually work</title>
<updated>2023-12-22T05:46:19+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-22T05:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2e0277b133b9040808f45d0ec9930a0fd7422c3b'/>
<id>2e0277b133b9040808f45d0ec9930a0fd7422c3b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Add --rjit-trace to allow TracePoint during JIT</title>
<updated>2023-12-22T05:05:13+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-22T04:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=64c52cd1c2df840a021dd952b42bddde09534b1b'/>
<id>64c52cd1c2df840a021dd952b42bddde09534b1b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Avoid incrementing vm_insns_count</title>
<updated>2023-12-22T01:12:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-22T01:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=009968a700209336eb592ccb83bddcf7b2c17984'/>
<id>009968a700209336eb592ccb83bddcf7b2c17984</id>
<content type='text'>
during compilation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
during compilation
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Rename pause/resume to disable/enable</title>
<updated>2023-12-21T22:25:41+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-21T22:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c73959cff40ba0f1d71ea6e3fce19b5f287e8494'/>
<id>c73959cff40ba0f1d71ea6e3fce19b5f287e8494</id>
<content type='text'>
like YJIT. They don't work in the same way yet, but it's nice to make
the naming consistent first so that we will not need to rename them
later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
like YJIT. They don't work in the same way yet, but it's nice to make
the naming consistent first so that we will not need to rename them
later.
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Share rb_vm_insns_count for vm_insns_count</title>
<updated>2023-12-19T07:55:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-12-19T07:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=eb872d17524f299bdd023f005da38ffcddffa90a'/>
<id>eb872d17524f299bdd023f005da38ffcddffa90a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add `flags` to `rb_postponed_job_preregister`</title>
<updated>2023-12-10T06:39:06+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2023-12-09T16:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c4c39082af3520cd96aefc2219a7037865f3f710'/>
<id>c4c39082af3520cd96aefc2219a7037865f3f710</id>
<content type='text'>
for future extensions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for future extensions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the semantics of rb_postponed_job_register</title>
<updated>2023-12-10T06:00:37+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>kj@kjtsanaktsidis.id.au</email>
</author>
<published>2023-11-19T11:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f8effa209adb3ce050c100ffaffe6f3cc1508185'/>
<id>f8effa209adb3ce050c100ffaffe6f3cc1508185</id>
<content type='text'>
Our current implementation of rb_postponed_job_register suffers from
some safety issues that can lead to interpreter crashes (see bug #1991).
Essentially, the issue is that jobs can be called with the wrong
arguments.

We made two attempts to fix this whilst keeping the promised semantics,
but:
  * The first one involved masking/unmasking when flushing jobs, which
    was believed to be too expensive
  * The second one involved a lock-free, multi-producer, single-consumer
    ringbuffer, which was too complex

The critical insight behind this third solution is that essentially the
only user of these APIs are a) internal, or b) profiling gems.

For a), none of the usages actually require variable data; they will
work just fine with the preregistration interface.

For b), generally profiling gems only call a single callback with a
single piece of data (which is actually usually just zero) for the life
of the program. The ringbuffer is complex because it needs to support
multi-word inserts of job &amp; data (which can't be atomic); but nobody
actually even needs that functionality, really.

So, this comit:
  * Introduces a pre-registration API for jobs, with a GVL-requiring
    rb_postponed_job_prereigster, which returns a handle which can be
    used with an async-signal-safe rb_postponed_job_trigger.
  * Deprecates rb_postponed_job_register (and re-implements it on top of
    the preregister function for compatability)
  * Moves all the internal usages of postponed job register
    pre-registration
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our current implementation of rb_postponed_job_register suffers from
some safety issues that can lead to interpreter crashes (see bug #1991).
Essentially, the issue is that jobs can be called with the wrong
arguments.

We made two attempts to fix this whilst keeping the promised semantics,
but:
  * The first one involved masking/unmasking when flushing jobs, which
    was believed to be too expensive
  * The second one involved a lock-free, multi-producer, single-consumer
    ringbuffer, which was too complex

The critical insight behind this third solution is that essentially the
only user of these APIs are a) internal, or b) profiling gems.

For a), none of the usages actually require variable data; they will
work just fine with the preregistration interface.

For b), generally profiling gems only call a single callback with a
single piece of data (which is actually usually just zero) for the life
of the program. The ringbuffer is complex because it needs to support
multi-word inserts of job &amp; data (which can't be atomic); but nobody
actually even needs that functionality, really.

So, this comit:
  * Introduces a pre-registration API for jobs, with a GVL-requiring
    rb_postponed_job_prereigster, which returns a handle which can be
    used with an async-signal-safe rb_postponed_job_trigger.
  * Deprecates rb_postponed_job_register (and re-implements it on top of
    the preregister function for compatability)
  * Moves all the internal usages of postponed job register
    pre-registration
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Tweak the default call threshold</title>
<updated>2023-04-27T01:19:48+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-04-27T01:19:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=417eb83b48f2e9eb551e8dd5163778c3ef278972'/>
<id>417eb83b48f2e9eb551e8dd5163778c3ef278972</id>
<content type='text'>
This number works better on yjit-bench (ruby-lsp).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This number works better on yjit-bench (ruby-lsp).
</pre>
</div>
</content>
</entry>
<entry>
<title>RJIT: Add --rjit-verify-ctx option</title>
<updated>2023-04-04T07:35:29+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2023-04-04T05:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=19506650efeb8b19cea3f72d3f95547c5cbc3659'/>
<id>19506650efeb8b19cea3f72d3f95547c5cbc3659</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
