Skip to content

Commit

Permalink
Cleanup before transition to Tracepoints.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Oct 22, 2023
1 parent 5df0395 commit 43445b7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 222 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ jobs:
fail-fast: false
matrix:
version:
- '1.8'
- '1.9'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
# - aarch64
# - ppc64le
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
Expand Down
9 changes: 2 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name = "Extrae"
uuid = "8a0c07fa-ade5-4b2a-b81a-b192b2bedf88"
authors = ["Sergio Sánchez Ramírez <[email protected]> and contributors"]
authors = ["Sergio Sánchez Ramírez <[email protected]>"]

Check warning on line 3 in Project.toml

View workflow job for this annotation

GitHub Actions / register

Package not registered

Version 0.1.0 already exists
version = "0.1.0"

[deps]
Extrae_jll = "2b2c4be0-e38c-5918-b8b4-9a308845a1e9"

[weakdeps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[extensions]
ExtraeDistributedExt = "Distributed"
Tracepoints = "7b3c9f6b-6d9c-4ea7-b055-3d1c3a6586ed"

[compat]
Extrae_jll = "4.0.3"
Expand Down
134 changes: 0 additions & 134 deletions ext/ExtraeDistributedExt.jl

This file was deleted.

56 changes: 2 additions & 54 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,16 @@ This routine is called automatically in different circumstances, which include:
No major problems should occur if the library is initialized twice, only a warning appears in the terminal output noticing the intent of double initialization.
"""
function init()

## TODO: This setup should depend on isntrumentation options.
## For example, if isntrumenting Distributed, here we setup the
## Distributed functions to identify resources
FFI.Extrae_set_numtasks_function(dist_numtasks)
FFI.Extrae_set_taskid_function(dist_taskid)
# FFI.Extrae_set_numtasks_function(dist_numtasks)
# FFI.Extrae_set_taskid_function(dist_taskid)

## Setup traceid for not intereference
ENV["EXTRAE_PROGRAM_NAME"] = "JULIATRACE$(Distributed.myid())"

FFI.Extrae_init()
Libc.flush_cstdio()

register([DistributedUsefulWork, DistributedNotUsefulWork])
register([
DistributedEnd,
DistributedAddProcs,
DistributedRmProcs,
DistributedInitWorker,
DistributedStartWorker,
DistributedRemoteCall,
DistributedRemoteCallFetch,
DistributedRemoteCallWait,
DistributedProcessMessages,
DistributedInterrupt
])
register([
DistributedHandleEnd,
DistributedHandleCall,
DistributedHandleCallFetch,
DistributedHandleCallWait,
DistributedHandleRemoteDo,
DistributedHandleResult,
DistributedHandleIdentifySocket,
DistributedHandleIdentifySocketAck,
DistributedHandleJoinPGRP,
DistributedHandleJoinComplete,
])

@debug "Extrae initialized in worker $(myid())"

end


Expand Down Expand Up @@ -122,7 +91,6 @@ description(::E) where {E<:Event} = description(E)
Add a single timestampted event into the tracefile.
"""
function emit(::Event{T,V}; counters::Bool=false) where {T,V}
@debug "Event emit: $(T): $(V)"
if counters
FFI.Extrae_eventandcounters(FFI.Type(T), FFI.Value(V))
else
Expand All @@ -132,26 +100,6 @@ end

emit(events::Vector{Event}; counters::Bool=false) = foreach(e -> event(e; counters=counters), events)

"""
register(event)
register(event, description)
register(events, description)
Document to the Paraver Configuration File human readable information regarding type type and its values values.
"""
register(::E) where {E<:Event} = register(E)
register(::Type{E}) where {E<:Event} = register(E, description(E))
register(events::Vector{<:Event{T,V} where {V}}) where {T} = register(events, description(Event{T}))
register(::E, desc::String) where {E<:Event} = register(E, desc)
register(::Type{<:Event{T}}, desc::String) where {T} = FFI.Extrae_define_event_type(T, Base.cconvert(Cstring, desc), 0, Nothing, Nothing)
function register(events::Vector{<:Event{T,V} where {V}}, desc::String) where {T}
nvalues = length(events)
values = valuecode.(events)
descs = Base.cconvert.((Cstring,), description.(events))
@debug "Registering event [$(T)] $(desc) with values [$(values)] $(descs)"
FFI.Extrae_define_event_type(T, Base.cconvert(Cstring, desc), nvalues, values, descs)
end

"""
previous_hwc_set()
Expand Down
2 changes: 0 additions & 2 deletions src/Extrae.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ include("API.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

include("Instrumentation/Threads.jl")

end
22 changes: 0 additions & 22 deletions src/Instrumentation/Threads.jl

This file was deleted.

0 comments on commit 43445b7

Please sign in to comment.