GVL Instrumentation API: add STARTED and EXITED events

[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 -> data} table, you need to free associated data when a thread goes away.
This commit is contained in:
Jean Boussier 2022-06-15 14:37:41 +02:00
parent 20d4168250
commit b6c1e1158d
Notes: git 2022-06-17 16:08:50 +09:00
7 changed files with 57 additions and 31 deletions

View file

@ -135,6 +135,8 @@ thread_sched_to_waiting(struct rb_thread_sched *sched)
ReleaseMutex(sched->lock);
}
#define thread_sched_to_dead thread_sched_to_waiting
static void
thread_sched_yield(struct rb_thread_sched *sched, rb_thread_t *th)
{