From 569fcca41770fba4cec59515dfc9b0158150ea0b Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sat, 19 Feb 2022 13:50:02 -0600 Subject: [PATCH 1/2] Profile.Allocs: jl_raw_alloc_t.task is untyped pointer --- src/gc-alloc-profiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gc-alloc-profiler.cpp b/src/gc-alloc-profiler.cpp index 88177e0ea20ef..e7ab1a6fdf1f5 100644 --- a/src/gc-alloc-profiler.cpp +++ b/src/gc-alloc-profiler.cpp @@ -20,7 +20,7 @@ struct jl_raw_alloc_t { jl_datatype_t *type_address; jl_raw_backtrace_t backtrace; size_t size; - jl_task_t *task; + void *task; uint64_t timestamp; }; @@ -135,7 +135,7 @@ void _maybe_record_alloc_to_profile(jl_value_t *val, size_t size, jl_datatype_t type, get_raw_backtrace(), size, - jl_current_task, + (void *)jl_current_task, cycleclock() }); } From 60210c585bd9478ba2eb2b2f070901201e8e60bd Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Sat, 19 Feb 2022 13:53:02 -0600 Subject: [PATCH 2/2] Profile.Allocs: Note that task is unrooted --- stdlib/Profile/src/Allocs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Profile/src/Allocs.jl b/stdlib/Profile/src/Allocs.jl index aa689936d4598..26dd90a821e01 100644 --- a/stdlib/Profile/src/Allocs.jl +++ b/stdlib/Profile/src/Allocs.jl @@ -123,7 +123,7 @@ struct Alloc type::Any stacktrace::StackTrace size::Int - task::Ptr{Cvoid} + task::Ptr{Cvoid} # N.B. unrooted, may not be valid timestamp::UInt64 end