<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/-ext-/thread, 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>Remove unused statement</title>
<updated>2023-12-12T01:31:37+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2023-12-12T01:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=535eb4de1109f5b8a8bde063dacc4c6fabf2322c'/>
<id>535eb4de1109f5b8a8bde063dacc4c6fabf2322c</id>
<content type='text'>
... to disable a warning: assigned but unused variable - expected
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... to disable a warning: assigned but unused variable - expected
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test of GVL instrumentation on Ractor sleeping</title>
<updated>2023-12-09T20:01:29+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2023-12-09T19:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9e09e5aa3af03a42cf6ef59da2779b0a5d5a6505'/>
<id>9e09e5aa3af03a42cf6ef59da2779b0a5d5a6505</id>
<content type='text'>
It seems that the Ractor sleep GVL event arrives very slightly after the
value becomes available and other threads wake (which makes sense) so we
need a little additional time to ensure we end up in a consisteny state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems that the Ractor sleep GVL event arrives very slightly after the
value becomes available and other threads wake (which makes sense) so we
need a little additional time to ensure we end up in a consisteny state.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing GVL hooks for M:N threads and ractors</title>
<updated>2023-12-09T17:31:41+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2023-12-09T05:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2ad4fec1a369e1cbd0c65d52062946a4fbfb84b'/>
<id>b2ad4fec1a369e1cbd0c65d52062946a4fbfb84b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add missing GVL hooks for M:N threads and ractors"</title>
<updated>2023-12-04T02:37:06+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2023-12-04T02:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=85bc80a51be0ceedcc57e7b6b779e6f8f885859e'/>
<id>85bc80a51be0ceedcc57e7b6b779e6f8f885859e</id>
<content type='text'>
This reverts commit ad54fbf281ca1935e79f4df1460b0106ba76761e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit ad54fbf281ca1935e79f4df1460b0106ba76761e.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing GVL hooks for M:N threads and ractors</title>
<updated>2023-12-02T18:06:07+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2023-11-29T23:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad54fbf281ca1935e79f4df1460b0106ba76761e'/>
<id>ad54fbf281ca1935e79f4df1460b0106ba76761e</id>
<content type='text'>
[Bug #20019]

This fixes GVL instrumentation in three locations it was missing:
- Suspending when blocking on a Ractor
- Suspending when doing a coroutine transfer from an M:N thread
- Resuming after an M:N thread starts

Co-authored-by: Matthew Draper &lt;matthew@trebex.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20019]

This fixes GVL instrumentation in three locations it was missing:
- Suspending when blocking on a Ractor
- Suspending when doing a coroutine transfer from an M:N thread
- Resuming after an M:N thread starts

Co-authored-by: Matthew Draper &lt;matthew@trebex.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Further fix the GVL instrumentation API</title>
<updated>2023-11-28T19:06:55+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-11-28T10:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=982641939cf709d22dbc060df57cbed31acd3b97'/>
<id>982641939cf709d22dbc060df57cbed31acd3b97</id>
<content type='text'>
Followup: https://github.com/ruby/ruby/pull/9029

[Bug #20019]

Some events still weren't triggered from the right place.

The test suite was also improved a bit more.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup: https://github.com/ruby/ruby/pull/9029

[Bug #20019]

Some events still weren't triggered from the right place.

The test suite was also improved a bit more.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor and fix the GVL instrumentation API</title>
<updated>2023-11-27T16:37:57+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-11-24T12:18:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=23a7714343b372234972ef0dacf774d07fe65ced'/>
<id>23a7714343b372234972ef0dacf774d07fe65ced</id>
<content type='text'>
This entirely changes how it is tested. Rather than to use counters
we now record the timeline of events with associated threads which
makes it much easier to assert that certains events are only preceded
by a specific event, and makes it much easier to debug unexpected
timelines.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
Co-Authored-By: JP Camara &lt;jp@jpcamara.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This entirely changes how it is tested. Rather than to use counters
we now record the timeline of events with associated threads which
makes it much easier to assert that certains events are only preceded
by a specific event, and makes it much easier to debug unexpected
timelines.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
Co-Authored-By: JP Camara &lt;jp@jpcamara.com&gt;
Co-Authored-By: John Hawthorn &lt;john@hawthorn.email&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>GVL Instrumentation: pass thread-&gt;self as part of event data</title>
<updated>2023-11-13T07:45:20+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2023-11-09T12:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9ca41e999159096cb0872b4babbb94bf5d1af4ce'/>
<id>9ca41e999159096cb0872b4babbb94bf5d1af4ce</id>
<content type='text'>
Context: https://github.com/ivoanjo/gvl-tracing/pull/4

Some hooks may want to collect data on a per thread basis.
Right now the only way to identify the concerned thread is to
use `rb_nativethread_self()` or similar, but even then because
of the thread cache or MaNy, two distinct Ruby threads may report
the same native thread id.

By passing `thread-&gt;self`, hooks can use it as a key to store
the metadata.

NB: Most hooks are executed outside the GVL, so such data collection
need to use a thread-safe data-structure, and shouldn't use the
reference in other ways from inside the hook.

They must also either pin that value or handle compaction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Context: https://github.com/ivoanjo/gvl-tracing/pull/4

Some hooks may want to collect data on a per thread basis.
Right now the only way to identify the concerned thread is to
use `rb_nativethread_self()` or similar, but even then because
of the thread cache or MaNy, two distinct Ruby threads may report
the same native thread id.

By passing `thread-&gt;self`, hooks can use it as a key to store
the metadata.

NB: Most hooks are executed outside the GVL, so such data collection
need to use a thread-safe data-structure, and shouldn't use the
reference in other ways from inside the hook.

They must also either pin that value or handle compaction.
</pre>
</div>
</content>
</entry>
<entry>
<title>GVL Instrumentation: remove the EXITED count assertion</title>
<updated>2022-07-13T17:39:31+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-07-13T16:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=664c23db79dd0d500a834ef0ec8da443d95ddfd6'/>
<id>664c23db79dd0d500a834ef0ec8da443d95ddfd6</id>
<content type='text'>
It's very flaky for some unknown reason. Something we have
an extra EXITED event. I suspect some other test is causing this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's very flaky for some unknown reason. Something we have
an extra EXITED event. I suspect some other test is causing this.
</pre>
</div>
</content>
</entry>
<entry>
<title>thread/test_instrumentation_api: cleanup all existing threads in setup</title>
<updated>2022-07-13T12:13:41+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-07-13T11:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=268269687c8747eb0bb67b09025b7ff7f495eba6'/>
<id>268269687c8747eb0bb67b09025b7ff7f495eba6</id>
<content type='text'>
We saw the following failure:
```
TestThreadInstrumentation#test_thread_instrumentation [/tmp/ruby/v3/src/trunk-random3/test/-ext-/thread/test_instrumentation_api.rb:25]:
Expected 0..3 to include 4.
```

Which shouldn't happen unless somehow there was a leaked thread.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We saw the following failure:
```
TestThreadInstrumentation#test_thread_instrumentation [/tmp/ruby/v3/src/trunk-random3/test/-ext-/thread/test_instrumentation_api.rb:25]:
Expected 0..3 to include 4.
```

Which shouldn't happen unless somehow there was a leaked thread.
</pre>
</div>
</content>
</entry>
</feed>
