Skip to content

Commit

Permalink
Add register method
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Jul 2, 2024
1 parent f680384 commit dca1b2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ Turn on/off the instrumentation.
"""
instrumentation(state::Bool) = state ? restart() : shutdown()

function register(tcode, tdesc)
return FFI.Extrae_define_event_type(tcode, tdesc, 0, Base.C_NULL, Base.C_NULL)
end

function register(tcode, tdesc, vcodes, vdescs)
@assert length(vcodes) == length(vdescs)
return FFI.Extrae_define_event_type(tcode, tdesc, length(vcodes), vcodes, vdescs)
Expand Down

0 comments on commit dca1b2d

Please sign in to comment.