SWDEV-351980 - Don't allocate hip_api_data and record

The HIP runtime is now allocating the hip_api_data and record on its
stack so we don't need the thread local record_data_pair stack anymore.

Refactor the API callback function to handle both the case where
synchronous user callbacks are requested and the case where asynchronous
records are requested (enable_callback & enable_activity respectively).
If the callback argument (memory pool) is not null, then activity
records are requested.

Remove CorrelationIdRegister and CorrelationIdLookup. These were used
by the HIP runtime to associate a HIP record id to a ROCtracer
correlation id. Instead, the HIP runtime is now using the correlation
ID returned in the hip_api_data_t.

Added a test to check enabling/disabling concurrent callbacks and
activities.

Change-Id: I5850cfead9861eb3602a3e8fcb7b22580d5fc979
This commit is contained in:
Laurent Morichetti
2022-08-04 11:38:08 -07:00
bovenliggende ad01ba513a
commit 88c6e0a700
8 gewijzigde bestanden met toevoegingen van 283 en 197 verwijderingen
+3 -1
Bestand weergeven
@@ -176,14 +176,16 @@ export ROCP_TOOL_LIB=./test/libcodeobj_test.so
export HSA_TOOLS_LIB="librocprofiler64.so"
eval_test "tool tracer codeobj" ./test/MatrixTranspose code_obj_trace
unset LD_PRELOAD
#valgrind --leak-check=full $tbin
#valgrind --tool=massif $tbin
#ms_print massif.out.<N>
eval_test "directed TraceBuffer test" ./test/trace_buffer trace_buffer
eval_test "directed MemoryPool test" ./test/memory_pool memory_pool
eval_test "enable/disable callbacks and activities test" ./test/activity_and_callback activity_and_callback_trace
eval_test "backward compatibilty tests" ./test/backward_compat_test backward_compat_test_trace
eval_test "backward compatibility tests" ./test/backward_compat_test backward_compat_test_trace
echo "$test_number tests total / $test_runnum tests run / $test_status tests failed"
if [ $test_status != 0 ] ; then