diff options
author | Koichi Sasada <ko1@atdot.net> | 2023-03-31 17:33:05 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2023-03-31 18:08:34 +0900 |
commit | 369bdff9ca0d50e845b9623ec2d3e3f14e079248 (patch) | |
tree | 79f2b098c8c0a46c84def4a7499e9b8c87a5ac54 /ractor_core.h | |
parent | fdfd50d006b80c459537a0c8e5dcc7d409cb7789 (diff) | |
download | ruby-369bdff9ca0d50e845b9623ec2d3e3f14e079248.tar.gz |
add debug log to `rb_ractor_thread_switch`
Diffstat (limited to 'ractor_core.h')
-rw-r--r-- | ractor_core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ractor_core.h b/ractor_core.h index db5b0c77c7..cb57d48c59 100644 --- a/ractor_core.h +++ b/ractor_core.h @@ -280,6 +280,10 @@ rb_ractor_sleeper_thread_num(rb_ractor_t *r) static inline void rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th) { + RUBY_DEBUG_LOG("th:%d->%u%s", + cr->threads.running_ec ? (int)rb_th_serial(cr->threads.running_ec->thread_ptr) : -1, + rb_th_serial(th), cr->threads.running_ec == th->ec ? " (same)" : ""); + if (cr->threads.running_ec != th->ec) { if (0) { ruby_debug_printf("rb_ractor_thread_switch ec:%p->%p\n", |