<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/debug.h, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[DOC] Fix typo in rb_debug_inspector_current_depth</title>
<updated>2025-11-28T02:23:56+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2025-11-28T02:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=404e6aa9b5e56b094b50f54c00487e5a7bfdf142'/>
<id>404e6aa9b5e56b094b50f54c00487e5a7bfdf142</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark first argument to all C-API tracepoint functions as nonnull</title>
<updated>2025-03-28T14:08:28+00:00</updated>
<author>
<name>Richard Böhme</name>
<email>richard.boehme1999@gmail.com</email>
</author>
<published>2025-01-17T19:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3aee7b982b283d2355c249b863d4f3570c929e26'/>
<id>3aee7b982b283d2355c249b863d4f3570c929e26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make rb_tracearg_(parameters|eval_script|instruction_sequence) public C-API</title>
<updated>2025-03-28T14:08:28+00:00</updated>
<author>
<name>Richard Böhme</name>
<email>richard.boehme1999@gmail.com</email>
</author>
<published>2025-01-11T20:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=04ebedf7f0144e8d5b8b2cd9cd243a2581bf974c'/>
<id>04ebedf7f0144e8d5b8b2cd9cd243a2581bf974c</id>
<content type='text'>
This allows C-Extension developers to call those methods to retrieve
information about a TracePoint's parameters, eval script and
instruction sequence.

Implements [Feature #20757]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows C-Extension developers to call those methods to retrieve
information about a TracePoint's parameters, eval script and
instruction sequence.

Implements [Feature #20757]
</pre>
</div>
</content>
</entry>
<entry>
<title>Typo fixes for public headers [ci skip]</title>
<updated>2023-12-22T01:34:49+00:00</updated>
<author>
<name>Alan Wu</name>
<email>alanwu@ruby-lang.org</email>
</author>
<published>2023-12-22T01:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0c05551f5812f29c24a30cfbcaa60beab22569d0'/>
<id>0c05551f5812f29c24a30cfbcaa60beab22569d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix rb_postponed_job_register_once typo</title>
<updated>2023-12-21T17:17:22+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2023-12-20T18:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1710eb9367d7d11f059a17879e00ef7637265558'/>
<id>1710eb9367d7d11f059a17879e00ef7637265558</id>
<content type='text'>
Co-authored-by: Dustin Brown &lt;dbrown9@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Dustin Brown &lt;dbrown9@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Small doc improvements for rb_postponed_job API</title>
<updated>2023-12-13T02:35:05+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>ktsanaktsidis@zendesk.com</email>
</author>
<published>2023-12-11T03:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=626daa73ec244fa5a159dff31199bd336ec4ac8c'/>
<id>626daa73ec244fa5a159dff31199bd336ec4ac8c</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>[Feature #10602] Add new API rb_profile_thread_frames()</title>
<updated>2023-10-31T02:16:18+00:00</updated>
<author>
<name>Daisuke Aritomo</name>
<email>osyoyu@osyoyu.com</email>
</author>
<published>2023-09-29T06:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4adf418be963b3554962b2f27057be81486c57d9'/>
<id>4adf418be963b3554962b2f27057be81486c57d9</id>
<content type='text'>
Add a new API rb_profile_thread_frames(), which is essentialy a
per-thread version of rb_profile_frames().

While the original rb_profile_frames() always returns results about the
current active thread obtained by GET_EC(), this new API takes a Thread
to be profiled as an argument.

This should come in handy when profiling I/O-bound programs such as
webapps, since this new API allows us to learn about Threads performing
I/O (which do not have the GVL).

Profiling worker threads (such as Sidekiq workers) may be another
application.

Implements [Feature #10602]

Co-authored-by: Mike Perham &lt;mike@perham.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new API rb_profile_thread_frames(), which is essentialy a
per-thread version of rb_profile_frames().

While the original rb_profile_frames() always returns results about the
current active thread obtained by GET_EC(), this new API takes a Thread
to be profiled as an argument.

This should come in handy when profiling I/O-bound programs such as
webapps, since this new API allows us to learn about Threads performing
I/O (which do not have the GVL).

Profiling worker threads (such as Sidekiq workers) may be another
application.

Implements [Feature #10602]

Co-authored-by: Mike Perham &lt;mike@perham.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Fix description for `rb_postponed_job_register_one()`</title>
<updated>2023-10-04T05:12:50+00:00</updated>
<author>
<name>Daisuke Aritomo</name>
<email>di.aritomo@gmail.com</email>
</author>
<published>2023-10-04T05:12:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d28f96986c46771f545ce0cdceac5b1fbf33338'/>
<id>6d28f96986c46771f545ce0cdceac5b1fbf33338</id>
<content type='text'>
The current documentation for `rb_postponed_job_register_one()` is
explaining the differences with itself, where it should be explaining
the differences with `rb_postponed_job_register()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current documentation for `rb_postponed_job_register_one()` is
explaining the differences with itself, where it should be explaining
the differences with `rb_postponed_job_register()`.
</pre>
</div>
</content>
</entry>
</feed>
