Files
rocm-systems/source/lib/rocprofiler-sdk/counters/CMakeLists.txt
T
Welton, Benjamin c574881cdb Add support for device counter collection ioctl (#46)
Add support for device counter colleciton ioctl

Adds support for the device counter collection IOCTL. This IOCTL
allows for device wide counters to be collected even if the queue
is not intercepted by rocprofiler-sdk (required for system profilers).

A test is also included which checks this behavior by creating a queue
that does not have profiling enabled on it and checks to see if SQ
counters can be read from it. Note: this test will be skipped if the KFD
version does not contain this IOCTL.

Right now the check is "soft" in that if the IOCTL is present and there
is an error with permissions, rocprofiler will continue but will print
an error stating that system wide device profiling and collected counter
values may be degraded. This is primarily to avoid breaking existing
users (like PAPI) who may not need the IOCTL's capability and to give
them time to update.

Co-authored-by: Benjamin Welton <ben@amd.com>
2024-12-19 13:27:35 -08:00

33 lines
808 B
CMake

set(ROCPROFILER_LIB_COUNTERS_SOURCES
metrics.cpp
dimensions.cpp
evaluate_ast.cpp
core.cpp
id_decode.cpp
dispatch_handlers.cpp
sample_processing.cpp
controller.cpp
device_counting.cpp
ioctl.cpp)
set(ROCPROFILER_LIB_COUNTERS_HEADERS
metrics.hpp
dimensions.hpp
evaluate_ast.hpp
core.hpp
id_decode.hpp
dispatch_handlers.hpp
sample_processing.hpp
controller.hpp
device_counting.hpp
sample_consumer.hpp
ioctl.hpp)
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_COUNTERS_SOURCES}
${ROCPROFILER_LIB_COUNTERS_HEADERS})
add_subdirectory(xml)
add_subdirectory(parser)
add_subdirectory(yaml)
if(ROCPROFILER_BUILD_TESTS)
add_subdirectory(tests)
endif()