From 0a38d0ce4231dfcaf122b865ba87dc665667f72e Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Wed, 29 Dec 2021 17:34:57 -0600 Subject: [PATCH] Add USDT for task start --- src/julia_internal.h | 2 ++ src/task.c | 1 + src/uprobes.d | 1 + 3 files changed, 4 insertions(+) diff --git a/src/julia_internal.h b/src/julia_internal.h index cb3df0bc5d653..e38fff476638c 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -1535,6 +1535,7 @@ uint16_t __gnu_f2h_ieee(float param) JL_NOTSAFEPOINT; #define JL_PROBE_RT_RUN_TASK(task, ptls) do ; while (0) #define JL_PROBE_RT_PAUSE_TASK(task, ptls) do ; while (0) #define JL_PROBE_RT_NEW_TASK(parent, child, ptls) do ; while (0) +#define JL_PROBE_RT_START_TASK(task, ptls) do ; while (0) #define JL_PROBE_RT_START_PROCESS_EVENTS(task) do ; while (0) #define JL_PROBE_RT_FINISH_PROCESS_EVENTS(task) do ; while (0) #define JL_PROBE_RT_MULTIQ_INSERT_SUCCESS(ptls) do ; while (0) @@ -1555,6 +1556,7 @@ uint16_t __gnu_f2h_ieee(float param) JL_NOTSAFEPOINT; #define JL_PROBE_RT_RUN_TASK_ENABLED() (0) #define JL_PROBE_RT_PAUSE_TASK_ENABLED() (0) #define JL_PROBE_RT_NEW_TASK_ENABLED() (0) +#define JL_PROBE_RT_START_TASK_ENABLED() (0) #define JL_PROBE_RT_START_PROCESS_EVENTS_ENABLED() (0) #define JL_PROBE_RT_FINISH_PROCESS_EVENTS_ENABLED() (0) #define JL_PROBE_RT_MULTIQ_INSERT_SUCCESS_ENABLED() (0) diff --git a/src/task.c b/src/task.c index bbafc9b06679a..7d982ae40146b 100644 --- a/src/task.c +++ b/src/task.c @@ -913,6 +913,7 @@ CFI_NORETURN #endif ct->started = 1; + JL_PROBE_RT_START_TASK(ct, ptls); if (jl_atomic_load_relaxed(&ct->_isexception)) { record_backtrace(ptls, 0); jl_push_excstack(&ct->excstack, ct->result, diff --git a/src/uprobes.d b/src/uprobes.d index 4800486ec6009..d96174e5bab5b 100644 --- a/src/uprobes.d +++ b/src/uprobes.d @@ -13,6 +13,7 @@ provider julia { probe rt__run__task(jl_task_t *task, jl_ptls_t ptls); probe rt__pause__task(jl_task_t *task, jl_ptls_t ptls); probe rt__new__task(jl_task_t *parent, jl_task_t *child, jl_ptls_t ptls); + probe rt__start__task(jl_task_t *task, jl_ptls_t ptls); probe rt__start__process__events(jl_task_t *task); probe rt__finish__process__events(jl_task_t *task); probe rt__multiq__insert__success(jl_ptls_t ptls);