1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
Jean Boussier 9125374726 [Feature #18339] GVL Instrumentation API
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.
2022-06-03 15:13:33 +02:00
..
-test- [Feature #18339] GVL Instrumentation API 2022-06-03 15:13:33 +02:00
bigdecimal [ruby/bigdecimal] Fix docs 2022-04-18 10:29:25 +09:00
cgi/escape [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
continuation [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
coverage Rust YJIT 2022-04-27 11:00:22 -04:00
date [ruby/date] Constify gperf-generated table 2022-05-24 17:23:42 +09:00
digest [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
etc [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
fcntl [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
fiddle [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
io Merge JRuby implementation for stringio and io-wait 2022-05-20 18:45:14 +09:00
json [flori/json] Bump version to 2.6.2 2022-05-20 17:49:13 +09:00
monitor [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
nkf [ruby/nkf] Constified invariant tables 2022-06-03 20:25:12 +09:00
objspace Rust YJIT 2022-04-27 11:00:22 -04:00
openssl Suppress warnings by OpenSSL 3 2022-03-16 20:49:00 +09:00
pathname Merge https://github.com/ruby/pathname/pull/8 for pathname 2022-05-20 18:36:01 +09:00
psych [ruby/psych] Prepare to develop 5.0.0 2022-05-18 10:03:48 +09:00
pty Update PTY.spawn's document 2022-04-13 15:43:28 -04:00
racc/cparse [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
rbconfig/sizeof [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
readline [ruby/readline-ext] Removed the duplicated dependencies 2022-03-25 20:27:58 +09:00
ripper [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
rubyvm
socket Fix broken links of rdoc 2022-03-17 10:11:38 +09:00
stringio [ruby/stringio] Fix extracting encoding names in the fallback code 2022-05-30 14:48:45 +09:00
strscan [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
syslog [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
win32
win32ole [ruby/win32ole] Get rid of potential undefined behavior 2022-03-15 08:33:40 +09:00
zlib Removed mswin patch for zlib-1.2.11 2022-04-05 14:30:47 +09:00
.document
extmk.rb Move the target directory of bundled gems like as rubygems 2022-04-07 09:47:10 +09:00
Setup
Setup.atheos
Setup.nt