mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor and fix the GVL instrumentation API
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é <etienne.barrie@gmail.com> Co-Authored-By: JP Camara <jp@jpcamara.com> Co-Authored-By: John Hawthorn <john@hawthorn.email>
This commit is contained in:
parent
e3875dd0f8
commit
23a7714343
5 changed files with 346 additions and 134 deletions
4
thread.c
4
thread.c
|
@ -5406,10 +5406,6 @@ Init_Thread(void)
|
|||
// it assumes blocked by thread_sched_to_waiting().
|
||||
// thread_sched_to_running(sched, th);
|
||||
|
||||
#ifdef RB_INTERNAL_THREAD_HOOK
|
||||
RB_INTERNAL_THREAD_HOOK(RUBY_INTERNAL_THREAD_EVENT_RESUMED, th);
|
||||
#endif
|
||||
|
||||
th->pending_interrupt_queue = rb_ary_hidden_new(0);
|
||||
th->pending_interrupt_queue_checked = 0;
|
||||
th->pending_interrupt_mask_stack = rb_ary_hidden_new(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue