bug: Wrong main_thread offset
kakkoyun opened this issue · comments
I have discovered that >= 3.0.0 the main_thread_offset
is wrong
rbperf/src/ruby_versions/ruby_3_0_0.yaml
Line 13 in fc31fb4
It was supposed to be 40
, but it's been calculated as 32
.
I have no idea how things are not broken 🤔
I've opened the issue here to track it down. I'll report it back if I find something else.
Thanks for opening the issue, Kemal! I need to refresh my understanding of how actors and threads work under the hood, but I think the naming I picked might be wrong. I think that using main_ractor
is more correct, as we want to fetch the stack of the currently executing code (no matter if it's the ractor or thread that was created first or not).
The best way to check this, besides inspecting CRuby's implementation might be to write a reproducer with multiple threads and ractors and checking which stack we are reading