[AFAR VII] rocprofiler_sample_device_counting_service return data as part of API call (#57)

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Benjamin Welton <ben@amd.com>

[ROCm/rocprofiler-sdk commit: 253c9adfc1]
This commit is contained in:
Welton, Benjamin
2024-12-06 22:37:45 -08:00
committed by GitHub
orang tua 22b4e6739d
melakukan 1850de7ee1
8 mengubah file dengan 140 tambahan dan 54 penghapusan
@@ -358,7 +358,7 @@ tool_init(rocprofiler_client_finalize_t, void* user_data)
// below to select the profile config to use when a kernel dispatch is
// recieved.
get_profile_cache().emplace(
agent.id.handle, build_profile_for_agent(agent.id, std::set<std::string>{"SQ_WAVES"}));
agent.id.handle, build_profile_for_agent(agent.id, std::set<std::string>{"TCC_HIT"}));
}
auto client_thread = rocprofiler_callback_thread_t{};
@@ -289,8 +289,11 @@ tool_init(rocprofiler_client_finalize_t, void* user_data)
rocprofiler_start_context(get_client_ctx());
while(exit_toggle().load() == false)
{
rocprofiler_sample_device_counting_service(
get_client_ctx(), {.value = count}, ROCPROFILER_COUNTER_FLAG_NONE);
rocprofiler_sample_device_counting_service(get_client_ctx(),
{.value = count},
ROCPROFILER_COUNTER_FLAG_NONE,
nullptr,
nullptr);
count++;
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}