From 47a29c748ab3573e1737eafe3bfee8a3ea3e48ef Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Fri, 30 Sep 2022 13:44:15 -0700 Subject: [PATCH] SWDEV-359838 - Add a phase data pointer to the hip_api_data_t To avoid using the thread local std::stack to remember the phase enter timestamp, the tracer tool uses the phase data to store the timestamp. Change-Id: I9e95637b41d6f0b2bd61016062ca07d6ba897652 --- hipamd/include/hip/amd_detail/hip_prof_str.h | 1 + hipamd/src/hip_prof_gen.py | 1 + 2 files changed, 2 insertions(+) diff --git a/hipamd/include/hip/amd_detail/hip_prof_str.h b/hipamd/include/hip/amd_detail/hip_prof_str.h index 9e1aaae028..7f31f04dc5 100644 --- a/hipamd/include/hip/amd_detail/hip_prof_str.h +++ b/hipamd/include/hip/amd_detail/hip_prof_str.h @@ -3123,6 +3123,7 @@ typedef struct hip_api_data_s { hipStream_t stream; } hipWaitExternalSemaphoresAsync; } args; + uint64_t *phase_data; } hip_api_data_t; // HIP API callbacks args data filling macros diff --git a/hipamd/src/hip_prof_gen.py b/hipamd/src/hip_prof_gen.py index aec10394a4..04934cf3d6 100755 --- a/hipamd/src/hip_prof_gen.py +++ b/hipamd/src/hip_prof_gen.py @@ -474,6 +474,7 @@ def generate_prof_header(f, api_map, callback_ids, opts_map): f.write(' } ' + name + ';\n') f.write( ' } args;\n' + + ' uint64_t *phase_data;\n' + '} hip_api_data_t;\n' )