From a5abe6721805784d9598f4ed3c5081efbe6b3b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Thu, 20 Jun 2024 23:30:26 +0200 Subject: [PATCH] Format code --- .JuliaFormatter.toml | 1 + src/API.jl | 14 ++- src/Extrae.jl | 17 ++- src/FFI.jl | 278 +++++++++++++++++++++++++++++++++---------- 4 files changed, 238 insertions(+), 72 deletions(-) create mode 100644 .JuliaFormatter.toml diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml new file mode 100644 index 0000000..323237b --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1 @@ +style = "blue" diff --git a/src/API.jl b/src/API.jl index ebf2893..1e83f45 100644 --- a/src/API.jl +++ b/src/API.jl @@ -12,7 +12,7 @@ function version() FFI.Extrae_get_version(major, minor, rev) - VersionNumber(major[], minor[], rev[]) + return VersionNumber(major[], minor[], rev[]) end """ @@ -29,7 +29,6 @@ No major problems should occur if the library is initialized twice, only a warni """ init() = FFI.Extrae_init() - """ isinit() @@ -44,7 +43,7 @@ Finalize the tracing library and dumps the intermediate tracing buffers onto dis """ function finish() FFI.Extrae_fini() - Libc.flush_cstdio() + return Libc.flush_cstdio() end """ @@ -87,7 +86,9 @@ function emit(::Event{T,V}; counters::Bool=false) where {T,V} end end -emit(events::Vector{Event}; counters::Bool=false) = foreach(e -> event(e; counters=counters), events) +function emit(events::Vector{Event}; counters::Bool=false) + return foreach(e -> event(e; counters=counters), events) +end """ previous_hwc_set() @@ -108,7 +109,8 @@ next_hwc_set() = FFI.Extrae_next_hwc_set() Select the range of tasks (not threads!) to store information from in the tracefile. """ -set_tracing_tasks(interval::UnitRange{UInt32}) = FFI.Extrae_set_tracing_tasks(interval.start::UInt32, interval.stop::UInt32) +set_tracing_tasks(interval::UnitRange{UInt32}) = + FFI.Extrae_set_tracing_tasks(interval.start::UInt32, interval.stop::UInt32) """ setoption(options) @@ -164,4 +166,4 @@ In order to gather performance counters during the execution of these calls, the Note that you need to compile your application binary with debugging information (typically the `-g` compiler flag) in order to translate the captured addresses into valuable information such as function name, file name and line number. """ -user_function(enter) = FFI.Extrae_user_function(enter) \ No newline at end of file +user_function(enter) = FFI.Extrae_user_function(enter) diff --git a/src/Extrae.jl b/src/Extrae.jl index cd6de93..f50728b 100644 --- a/src/Extrae.jl +++ b/src/Extrae.jl @@ -7,12 +7,27 @@ include("API.jl") include("Macros.jl") export Event, typecode, valuecode, description -export version, init, isinit, finish, flush, instrumentation, emit, register, previous_hwc_set, next_hwc_set, set_tracing_tasks, setoption, network_counters, network_routes, user_function +export version, + init, + isinit, + finish, + flush, + instrumentation, + emit, + register, + previous_hwc_set, + next_hwc_set, + set_tracing_tasks, + setoption, + network_counters, + network_routes, + user_function function __init__() get!(ENV, "EXTRAE_HOME", Extrae_jll.artifact_dir) get!(ENV, "EXTRAE_DISABLE_OMP", true) get!(ENV, "EXTRAE_DISABLE_PTHREAD", false) + return nothing end end diff --git a/src/FFI.jl b/src/FFI.jl index 932dba5..85aa0cd 100644 --- a/src/FFI.jl +++ b/src/FFI.jl @@ -72,10 +72,18 @@ OMPtrace_flush() = @ccall lib.OMPtrace_flush()::Cvoid SEQtrace_flush() = @ccall lib.SEQtrace_flush()::Cvoid Extrae_user_function(enter::UInt32) = @ccall lib.Extrae_user_function(enter::UInt32)::UInt64 -OMPItrace_user_function(enter::UInt32) = @ccall lib.OMPItrace_user_function(enter::UInt32)::UInt64 -MPItrace_user_function(enter::UInt32) = @ccall lib.MPItrace_user_function(enter::UInt32)::UInt64 -OMPtrace_user_function(enter::UInt32) = @ccall lib.OMPtrace_user_function(enter::UInt32)::UInt64 -SEQtrace_user_function(enter::UInt32) = @ccall lib.SEQtrace_user_function(enter::UInt32)::UInt64 +function OMPItrace_user_function(enter::UInt32) + @ccall lib.OMPItrace_user_function(enter::UInt32)::UInt64 +end +function MPItrace_user_function(enter::UInt32) + @ccall lib.MPItrace_user_function(enter::UInt32)::UInt64 +end +function OMPtrace_user_function(enter::UInt32) + @ccall lib.OMPtrace_user_function(enter::UInt32)::UInt64 +end +function SEQtrace_user_function(enter::UInt32) + @ccall lib.SEQtrace_user_function(enter::UInt32)::UInt64 +end Extrae_event(type, value) = @ccall lib.Extrae_event(type::Type, value::Value)::Cvoid OMPItrace_event(type, value) = @ccall lib.OMPItrace_event(type::Type, value::Value)::Cvoid @@ -83,11 +91,21 @@ MPItrace_event(type, value) = @ccall lib.MPItrace_event(type::Type, value::Value OMPtrace_event(type, value) = @ccall lib.OMPtrace_event(type::Type, value::Value)::Cvoid SEQtrace_event(type, value) = @ccall lib.SEQtrace_event(type::Type, value::Value)::Cvoid -Extrae_nevent(count, types, values) = @ccall lib.Extrae_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -OMPItrace_nevent(count, types, values) = @ccall lib.OMPItrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -MPItrace_nevent(count, types, values) = @ccall lib.MPItrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -OMPtrace_nevent(count, types, values) = @ccall lib.OMPtrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -SEQtrace_nevent(count, types, values) = @ccall lib.SEQtrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +function Extrae_nevent(count, types, values) + @ccall lib.Extrae_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +end +function OMPItrace_nevent(count, types, values) + @ccall lib.OMPItrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +end +function MPItrace_nevent(count, types, values) + @ccall lib.MPItrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +end +function OMPtrace_nevent(count, types, values) + @ccall lib.OMPtrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +end +function SEQtrace_nevent(count, types, values) + @ccall lib.SEQtrace_nevent(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +end Extrae_shutdown() = @ccall lib.Extrae_shutdown()::Cvoid MPItrace_shutdown() = @ccall lib.MPItrace_shutdown()::Cvoid @@ -119,24 +137,72 @@ OMPItrace_next_hwc_set() = @ccall lib.OMPItrace_next_hwc_set()::Cvoid OMPtrace_next_hwc_set() = @ccall lib.OMPtrace_next_hwc_set()::Cvoid SEQtrace_next_hwc_set() = @ccall lib.SEQtrace_next_hwc_set()::Cvoid -Extrae_eventandcounters(type, value) = @ccall lib.Extrae_eventandcounters(type::Type, value::Value)::Cvoid -MPItrace_eventandcounters(type, value) = @ccall lib.MPItrace_eventandcounters(type::Type, value::Value)::Cvoid -OMPItrace_eventandcounters(type, value) = @ccall lib.OMPItrace_eventandcounters(type::Type, value::Value)::Cvoid -OMPtrace_eventandcounters(type, value) = @ccall lib.OMPtrace_eventandcounters(type::Type, value::Value)::Cvoid -SEQtrace_eventandcounters(type, value) = @ccall lib.SEQtrace_eventandcounters(type::Type, value::Value)::Cvoid +function Extrae_eventandcounters(type, value) + @ccall lib.Extrae_eventandcounters(type::Type, value::Value)::Cvoid +end +function MPItrace_eventandcounters(type, value) + @ccall lib.MPItrace_eventandcounters(type::Type, value::Value)::Cvoid +end +function OMPItrace_eventandcounters(type, value) + @ccall lib.OMPItrace_eventandcounters(type::Type, value::Value)::Cvoid +end +function OMPtrace_eventandcounters(type, value) + @ccall lib.OMPtrace_eventandcounters(type::Type, value::Value)::Cvoid +end +function SEQtrace_eventandcounters(type, value) + @ccall lib.SEQtrace_eventandcounters(type::Type, value::Value)::Cvoid +end -Extrae_neventandcounters(count, types, values) = @ccall lib.Extrae_neventandcounters(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -OMPItrace_neventandcounters(count, types, values) = @ccall lib.OMPItrace_neventandcounters(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -MPItrace_neventandcounters(count, types, values) = @ccall lib.MPItrace_neventandcounters(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -OMPtrace_neventandcounters(count, types, values) = @ccall lib.OMPtrace_neventandcounters(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid -SEQtrace_neventandcounters(count, types, values) = @ccall lib.SEQtrace_neventandcounters(count::UInt32, types::Ptr{Type}, values::Ptr{Value})::Cvoid +function Extrae_neventandcounters(count, types, values) + @ccall lib.Extrae_neventandcounters( + count::UInt32, types::Ptr{Type}, values::Ptr{Value} + )::Cvoid +end +function OMPItrace_neventandcounters(count, types, values) + @ccall lib.OMPItrace_neventandcounters( + count::UInt32, types::Ptr{Type}, values::Ptr{Value} + )::Cvoid +end +function MPItrace_neventandcounters(count, types, values) + @ccall lib.MPItrace_neventandcounters( + count::UInt32, types::Ptr{Type}, values::Ptr{Value} + )::Cvoid +end +function OMPtrace_neventandcounters(count, types, values) + @ccall lib.OMPtrace_neventandcounters( + count::UInt32, types::Ptr{Type}, values::Ptr{Value} + )::Cvoid +end +function SEQtrace_neventandcounters(count, types, values) + @ccall lib.SEQtrace_neventandcounters( + count::UInt32, types::Ptr{Type}, values::Ptr{Value} + )::Cvoid +end -Extrae_define_event_type(type, type_description, nvalues, values, values_description) = @ccall lib.Extrae_define_event_type(type::Ref{Type}, type_description::Cstring, nvalues::Ref{UInt32}, values::Ref{Vector{Value}}, values_description::Ptr{Ptr{UInt8}})::Cvoid +function Extrae_define_event_type( + type, type_description, nvalues, values, values_description +) + @ccall lib.Extrae_define_event_type( + type::Ref{Type}, + type_description::Cstring, + nvalues::Ref{UInt32}, + values::Ref{Vector{Value}}, + values_description::Ptr{Ptr{UInt8}}, + )::Cvoid +end -Extrae_set_tracing_tasks(from, to) = @ccall lib.Extrae_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid -OMPtrace_set_tracing_tasks(from, to) = @ccall lib.OMPtrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid -MPItrace_set_tracing_tasks(from, to) = @ccall lib.MPItrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid -OMPItrace_set_tracing_tasks(from, to) = @ccall lib.OMPItrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid +function Extrae_set_tracing_tasks(from, to) + @ccall lib.Extrae_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid +end +function OMPtrace_set_tracing_tasks(from, to) + @ccall lib.OMPtrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid +end +function MPItrace_set_tracing_tasks(from, to) + @ccall lib.MPItrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid +end +function OMPItrace_set_tracing_tasks(from, to) + @ccall lib.OMPItrace_set_tracing_tasks(from::UInt32, to::UInt32)::Cvoid +end @enum Options::Int32 begin Disable = 0 @@ -154,10 +220,18 @@ OMPItrace_set_tracing_tasks(from, to) = @ccall lib.OMPItrace_set_tracing_tasks(f end Extrae_set_options(options::Options) = @ccall lib.Extrae_set_options(options::Int32)::Cvoid -MPItrace_set_options(options::Options) = @ccall lib.MPItrace_set_options(options::Int32)::Cvoid -OMPtrace_set_options(options::Options) = @ccall lib.OMPtrace_set_options(options::Int32)::Cvoid -OMPItrace_set_options(options::Options) = @ccall lib.OMPItrace_set_options(options::Int32)::Cvoid -SEQtrace_set_options(options::Options) = @ccall lib.SEQtrace_set_options(options::Int32)::Cvoid +function MPItrace_set_options(options::Options) + @ccall lib.MPItrace_set_options(options::Int32)::Cvoid +end +function OMPtrace_set_options(options::Options) + @ccall lib.OMPtrace_set_options(options::Int32)::Cvoid +end +function OMPItrace_set_options(options::Options) + @ccall lib.OMPItrace_set_options(options::Int32)::Cvoid +end +function SEQtrace_set_options(options::Options) + @ccall lib.SEQtrace_set_options(options::Int32)::Cvoid +end Extrae_network_counters() = @ccall lib.Extrae_network_counters()::Cvoid OMPItrace_network_counters() = @ccall lib.OMPItrace_network_counters()::Cvoid @@ -165,47 +239,121 @@ MPItrace_network_counters() = @ccall lib.MPItrace_network_counters()::Cvoid OMPtrace_network_counters() = @ccall lib.OMPtrace_network_counters()::Cvoid SEQtrace_network_counters() = @ccall lib.SEQtrace_network_counters()::Cvoid -Extrae_network_routes(mpi_rank::Int32) = @ccall lib.Extrae_network_routes(mpi_rank::Int32)::Cvoid -OMPItrace_network_routes(mpi_rank::Int32) = @ccall lib.OMPItrace_network_routes(mpi_rank::Int32)::Cvoid -MPItrace_network_routes(mpi_rank::Int32) = @ccall lib.MPItrace_network_routes(mpi_rank::Int32)::Cvoid -OMPtrace_network_routes(mpi_rank::Int32) = @ccall lib.OMPtrace_network_routes(mpi_rank::Int32)::Cvoid -SEQtrace_network_routes(mpi_rank::Int32) = @ccall lib.SEQtrace_network_routes(mpi_rank::Int32)::Cvoid - -Extrae_init_UserCommunication(ptr::Ref{UserCommunication}) = @ccall lib.Extrae_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid -OMPItrace_init_UserCommunication(ptr::Ref{UserCommunication}) = @ccall lib.OMPItrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid -MPItrace_init_UserCommunication(ptr::Ref{UserCommunication}) = @ccall lib.MPItrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid -OMPtrace_init_UserCommunication(ptr::Ref{UserCommunication}) = @ccall lib.OMPtrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid -SEQtrace_init_UserCommunication(ptr::Ref{UserCommunication}) = @ccall lib.SEQtrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid - -Extrae_init_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.Extrae_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -OMPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.OMPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -MPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.MPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -OMPtrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.OMPtrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -SEQtrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.SEQtrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid - -Extrae_emit_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.Extrae_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -OMPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.OMPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -MPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.MPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -OMPtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.OMPtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid -SEQtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) = @ccall lib.SEQtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid - -Extrae_resume_virtual_thread(vthread::UInt32) = @ccall lib.Extrae_resume_virtual_thread(vthread::UInt32)::Cvoid +function Extrae_network_routes(mpi_rank::Int32) + @ccall lib.Extrae_network_routes(mpi_rank::Int32)::Cvoid +end +function OMPItrace_network_routes(mpi_rank::Int32) + @ccall lib.OMPItrace_network_routes(mpi_rank::Int32)::Cvoid +end +function MPItrace_network_routes(mpi_rank::Int32) + @ccall lib.MPItrace_network_routes(mpi_rank::Int32)::Cvoid +end +function OMPtrace_network_routes(mpi_rank::Int32) + @ccall lib.OMPtrace_network_routes(mpi_rank::Int32)::Cvoid +end +function SEQtrace_network_routes(mpi_rank::Int32) + @ccall lib.SEQtrace_network_routes(mpi_rank::Int32)::Cvoid +end + +function Extrae_init_UserCommunication(ptr::Ref{UserCommunication}) + @ccall lib.Extrae_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid +end +function OMPItrace_init_UserCommunication(ptr::Ref{UserCommunication}) + @ccall lib.OMPItrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid +end +function MPItrace_init_UserCommunication(ptr::Ref{UserCommunication}) + @ccall lib.MPItrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid +end +function OMPtrace_init_UserCommunication(ptr::Ref{UserCommunication}) + @ccall lib.OMPtrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid +end +function SEQtrace_init_UserCommunication(ptr::Ref{UserCommunication}) + @ccall lib.SEQtrace_init_UserCommunication(ptr::Ref{UserCommunication})::Cvoid +end + +function Extrae_init_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.Extrae_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function OMPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.OMPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function MPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.MPItrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function OMPtrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.OMPtrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function SEQtrace_init_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.SEQtrace_init_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end + +function Extrae_emit_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.Extrae_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function OMPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.OMPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function MPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.MPItrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function OMPtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.OMPtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end +function SEQtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents}) + @ccall lib.SEQtrace_emit_CombinedEvents(ptr::Ref{CombinedEvents})::Cvoid +end + +function Extrae_resume_virtual_thread(vthread::UInt32) + @ccall lib.Extrae_resume_virtual_thread(vthread::UInt32)::Cvoid +end Extrae_suspend_virtual_thread() = @ccall lib.Extrae_suspend_virtual_thread()::Cvoid -Extrae_register_stacked_type(type::Type) = @ccall lib.Extrae_register_stacked_type(type::Type)::Cvoid +function Extrae_register_stacked_type(type::Type) + @ccall lib.Extrae_register_stacked_type(type::Type)::Cvoid +end -Extrae_get_version(major::Ref{UInt32}, minor::Ref{UInt32}, revision::Ref{UInt32}) = @ccall lib.Extrae_get_version(major::Ref{UInt32}, minor::Ref{UInt32}, revision::Ref{UInt32})::Cvoid -Extrae_register_codelocation_type(t1::Type, t2::Type, s1::Cstring, s2::Cstring) = @ccall lib.Extrae_register_codelocation_type(t1::Type, t2::Type, s1::Cstring, s2::Cstring)::Cvoid -Extrae_register_function_address(ptr::Ref{Cvoid}, funcname::Cstring, modname::Cstring, line::UInt32) = @ccall lib.Extrae_register_function_address(ptr::Ref{Cvoid}, funcname::Cstring, modname::Cstring, line::UInt32)::Cvoid +function Extrae_get_version(major::Ref{UInt32}, minor::Ref{UInt32}, revision::Ref{UInt32}) + @ccall lib.Extrae_get_version( + major::Ref{UInt32}, minor::Ref{UInt32}, revision::Ref{UInt32} + )::Cvoid +end +function Extrae_register_codelocation_type(t1::Type, t2::Type, s1::Cstring, s2::Cstring) + @ccall lib.Extrae_register_codelocation_type( + t1::Type, t2::Type, s1::Cstring, s2::Cstring + )::Cvoid +end +function Extrae_register_function_address( + ptr::Ref{Cvoid}, funcname::Cstring, modname::Cstring, line::UInt32 +) + @ccall lib.Extrae_register_function_address( + ptr::Ref{Cvoid}, funcname::Cstring, modname::Cstring, line::UInt32 + )::Cvoid +end # extrae_internals.h -Extrae_set_threadid_function(f::Function) = @ccall lib.Extrae_set_threadid_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid -Extrae_set_numthreads_function(f::Function) = @ccall lib.Extrae_set_numthreads_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +function Extrae_set_threadid_function(f::Function) + @ccall lib.Extrae_set_threadid_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +end +function Extrae_set_numthreads_function(f::Function) + @ccall lib.Extrae_set_numthreads_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +end -Extrae_set_taskid_function(f::Function) = @ccall lib.Extrae_set_taskid_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid -Extrae_set_numtasks_function(f::Function) = @ccall lib.Extrae_set_numtasks_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid -Extrae_set_barrier_tasks_function(f::Function) = @ccall lib.Extrae_set_barrier_tasks_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +function Extrae_set_taskid_function(f::Function) + @ccall lib.Extrae_set_taskid_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +end +function Extrae_set_numtasks_function(f::Function) + @ccall lib.Extrae_set_numtasks_function(@cfunction($f, Cuint, ())::Ptr{Cvoid})::Cvoid +end +function Extrae_set_barrier_tasks_function(f::Function) + @ccall lib.Extrae_set_barrier_tasks_function( + @cfunction($f, Cuint, ())::Ptr{Cvoid} + )::Cvoid +end -Extrae_set_thread_name(thread::Unsigned, name::String) = @ccall lib.Extrae_set_thread_name(thread::Cuint, name::Cstring)::Cvoid -Extrae_function_from_address(type::Type, address) = @ccall lib.Extrae_function_from_address(type::Cuint, address::Ref{Cvoid})::Cvoid +function Extrae_set_thread_name(thread::Unsigned, name::String) + @ccall lib.Extrae_set_thread_name(thread::Cuint, name::Cstring)::Cvoid +end +function Extrae_function_from_address(type::Type, address) + @ccall lib.Extrae_function_from_address(type::Cuint, address::Ref{Cvoid})::Cvoid +end -end \ No newline at end of file +end