ROCm / roctracer

ROCm Tracer Callback/Activity Library for Performance tracing AMD GPUs
https://rocm.docs.amd.com/projects/roctracer/en/latest/
Other
64 stars 30 forks source link

Calling `roctracer_load()` a seond time aborts #66

Closed bertwesarg closed 2 years ago

bertwesarg commented 2 years ago

If I call roctracer_load() in my own compiler constructor, it aborts the application. Here is the trace with rocprofiler and roctracer linked:

$ ROCP_ONLOAD_TRACE=1 ./MatrixTranspose
PID(137699): PROF_LIB::constructor begin
PID(137699): PROF_LIB::constructor end
PID(137699): TRACER_LIB::constructor begin
PID(137699): TRACER_LIB::roctracer_load begin, loaded(0)
PID(137699): TRACER_LIB::roctracer_load end
PID(137699): TRACER_LIB::constructor end
PID(137699): TRACER_LIB::roctracer_load begin, loaded(1)

Aborted

The second roctracer_load() call is from a compiler constructor in a shared lib. Calling roctracer_load() from main within the application does works though.

bertwesarg commented 2 years ago

Please note, that roctracer_load does not print its TRACER_LIB::roctracer_load end if it is already loaded, because of the early return. Though if I add a debug statement after the roctracer_load() in my compiler constructor, it is also not printed in the terminal. See #67.

bertwesarg commented 2 years ago

invalid, sorry for the noise. fault was on my site.