<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/thread_win32.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Allow `RUBY_DEBUG_LOG` format to be empty</title>
<updated>2022-08-06T01:52:00+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-07-28T07:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=27173e3735ff509dc8d9cc9b410baff84adf57dc'/>
<id>27173e3735ff509dc8d9cc9b410baff84adf57dc</id>
<content type='text'>
GCC warns of empty format strings, perhaps because they have no
effects in printf() and there are better ways than sprintf().
However, ruby_debug_log() adds informations other than the format,
this warning is not the case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC warns of empty format strings, perhaps because they have no
effects in printf() and there are better ways than sprintf().
However, ruby_debug_log() adds informations other than the format,
this warning is not the case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand tabs [ci skip]</title>
<updated>2022-07-21T16:42:04+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-07-21T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b21e94bebed90180d8ff63dad03b8b948361089'/>
<id>5b21e94bebed90180d8ff63dad03b8b948361089</id>
<content type='text'>
[Misc #18891]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Misc #18891]
</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>Fix warnings by old gcc</title>
<updated>2022-06-23T13:52:45+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-06-23T13:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b180ffa62270dc32bb69167822b4c698def5c8f7'/>
<id>b180ffa62270dc32bb69167822b4c698def5c8f7</id>
<content type='text'>
* Use PRIxSIZE instead of "z"
* Fix sign-compare warning
* Suppress unused-but-set-variable warning
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use PRIxSIZE instead of "z"
* Fix sign-compare warning
* Suppress unused-but-set-variable warning
</pre>
</div>
</content>
</entry>
<entry>
<title>Non-void functions must return value</title>
<updated>2022-06-23T07:45:05+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-06-23T07:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c25c1d4e54c51594cbc6a6d51ae79885bea7a7b3'/>
<id>c25c1d4e54c51594cbc6a6d51ae79885bea7a7b3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>GVL Instrumentation API: add STARTED and EXITED events</title>
<updated>2022-06-17T07:08:26+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-06-15T12:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6c1e1158d71b533b255ae7a2731598455918071'/>
<id>b6c1e1158d71b533b255ae7a2731598455918071</id>
<content type='text'>
[Feature #18339]

After experimenting with the initial version of the API I figured there is a need
for an exit event to cleanup instrumentation data. e.g. if you record data in a
{thread_id -&gt; data} table, you need to free associated data when a thread goes away.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #18339]

After experimenting with the initial version of the API I figured there is a need
for an exit event to cleanup instrumentation data. e.g. if you record data in a
{thread_id -&gt; data} table, you need to free associated data when a thread goes away.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused rb_thread_create_mjit_thread</title>
<updated>2022-06-15T17:57:38+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-06-15T17:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a327ce8b07e8778b838a5b82939bea9409cfa9f5'/>
<id>a327ce8b07e8778b838a5b82939bea9409cfa9f5</id>
<content type='text'>
follow up https://github.com/ruby/ruby/pull/6006
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
follow up https://github.com/ruby/ruby/pull/6006
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #18339] GVL Instrumentation API</title>
<updated>2022-06-03T13:13:33+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-01-27T16:12:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9125374726fbf68c05ee7585d4a374ffc5efc5db'/>
<id>9125374726fbf68c05ee7585d4a374ffc5efc5db</id>
<content type='text'>
Ref: https://bugs.ruby-lang.org/issues/18339

Design:

- This tries to minimize the overhead when no hook is registered.
  It should only incur an extra unsynchronized boolean check.
- The hook list is protected with a read-write lock as to cause
  contention when some hooks are registered.
- The hooks MUST be thread safe, and MUST NOT call into Ruby as they
  are executed outside the GVL.
- It's simply a noop on Windows.

API:

```
rb_internal_thread_event_hook_t * rb_internal_thread_add_event_hook(rb_internal_thread_event_callback callback, rb_event_flag_t internal_event, void *user_data);
bool rb_internal_thread_remove_event_hook(rb_internal_thread_event_hook_t * hook);
```

You can subscribe to 3 events:

  - READY: called right before attempting to acquire the GVL
  - RESUMED: called right after successfully acquiring the GVL
  - SUSPENDED: called right after releasing the GVL.

The hooks MUST be threadsafe, as they are executed outside of the GVL, they also MUST NOT call any Ruby API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ref: https://bugs.ruby-lang.org/issues/18339

Design:

- This tries to minimize the overhead when no hook is registered.
  It should only incur an extra unsynchronized boolean check.
- The hook list is protected with a read-write lock as to cause
  contention when some hooks are registered.
- The hooks MUST be thread safe, and MUST NOT call into Ruby as they
  are executed outside the GVL.
- It's simply a noop on Windows.

API:

```
rb_internal_thread_event_hook_t * rb_internal_thread_add_event_hook(rb_internal_thread_event_callback callback, rb_event_flag_t internal_event, void *user_data);
bool rb_internal_thread_remove_event_hook(rb_internal_thread_event_hook_t * hook);
```

You can subscribe to 3 events:

  - READY: called right before attempting to acquire the GVL
  - RESUMED: called right after successfully acquiring the GVL
  - SUSPENDED: called right after releasing the GVL.

The hooks MUST be threadsafe, as they are executed outside of the GVL, they also MUST NOT call any Ruby API.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove `DEBUG_OUT()` macro</title>
<updated>2022-05-24T07:28:07+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-05-24T06:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=62e08d4b844a3f4f7a6dadc6083cd0585485931b'/>
<id>62e08d4b844a3f4f7a6dadc6083cd0585485931b</id>
<content type='text'>
This macro is no longer used ([GH-5933]).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This macro is no longer used ([GH-5933]).
</pre>
</div>
</content>
</entry>
<entry>
<title>use `RUBY_DEBUG_LOG` instead of `thread_debug`</title>
<updated>2022-05-24T01:06:51+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-05-23T18:58:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4111028a5cc229c314c2b93271d205206b207088'/>
<id>4111028a5cc229c314c2b93271d205206b207088</id>
<content type='text'>
`thread_debug()` was introduced to print debug messages
on `THREAD_DEBUG &gt; 0` but `RUBY_DEBUG_LOG()` is more controllable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`thread_debug()` was introduced to print debug messages
on `THREAD_DEBUG &gt; 0` but `RUBY_DEBUG_LOG()` is more controllable.
</pre>
</div>
</content>
</entry>
</feed>
