[1/N] Agent Counter Collection Implementation (#832)

Added public API call to setup agent counter collection on a context.

Refactored the return types internally for dispatch counter collection
to use rocprofiler_status_t (allow for more verbose failures to be
surfaced via the API)

Subsequent commits will fill out the sampling functionality for agent
counter collection.

Co-authored-by: Benjamin Welton <ben@amd.com>
Этот коммит содержится в:
Benjamin Welton
2024-05-01 13:34:54 -07:00
коммит произвёл GitHub
родитель e21609c80e
Коммит cb3fc070c7
14 изменённых файлов: 192 добавлений и 53 удалений
+6
Просмотреть файл
@@ -89,6 +89,12 @@ ROCPROFILER_STATUS_STRING(
"AQL Profiler was not able to find event coordinates for defined counters")
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_KERNEL,
"A service depends on a newer version of KFD (amdgpu kernel driver)")
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_PROFILE_NOT_FOUND,
"Could not find counter profile")
ROCPROFILER_STATUS_STRING(ROCPROFILER_STATUS_ERROR_AGENT_DISPATCH_CONFLICT,
"Cannot have both an agent counter collection and a dispatch counter "
"in the same context")
template <size_t Idx, size_t... Tail>
const char*
get_status_name(rocprofiler_status_t status, std::index_sequence<Idx, Tail...>)