Fix hardware counter summary files not being generated after profiling (#124)

- Register a cleanup function in tim::manager instance to write out data in
counter storages

- The counter_storage::write() calls in tool_fini happen after the storage is destroyed
which is too late for the write to happen.

- Adjust traits for counter_data_tracker

- Add MIN, MAX, VAR, STDDEV columns
- Remove DEPTH, UNITS, %SELF columns

- Update "add_validation_test" to test for the existence of output file(s).
- Added step to test perfetto output for `transpose-rocprofiler-sampling`
and `transpose-rocprofiler-binary-rewrite`

---------

Co-authored-by: David Galiffi <David.Galiffi@amd.com>
This commit is contained in:
Sohaib Nadeem
2025-03-05 16:05:18 -05:00
committed by GitHub
parent c3138e1962
commit 42922ec851
6 changed files with 46 additions and 24 deletions
+9 -1
View File
@@ -929,7 +929,7 @@ function(ROCPROFILER_SYSTEMS_ADD_VALIDATION_TEST)
TEST
""
"NAME;TIMEOUT;TIMEMORY_METRIC;TIMEMORY_FILE;PERFETTO_METRIC;PERFETTO_FILE"
"ENVIRONMENT;LABELS;PROPERTIES;PASS_REGEX;FAIL_REGEX;SKIP_REGEX;DEPENDS;ARGS"
"ENVIRONMENT;LABELS;PROPERTIES;PASS_REGEX;FAIL_REGEX;SKIP_REGEX;DEPENDS;EXIST_FILES;ARGS"
${ARGN})
if(NOT TEST "${TEST_NAME}")
@@ -963,6 +963,14 @@ function(ROCPROFILER_SYSTEMS_ADD_VALIDATION_TEST)
)
endif()
foreach(_FILE ${TEST_EXIST_FILES})
add_test(
NAME validate-${TEST_NAME}-${_FILE}-exists
COMMAND test -e
${PROJECT_BINARY_DIR}/rocprof-sys-tests-output/${TEST_NAME}/${_FILE}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
endforeach()
if(TEST_TIMEMORY_FILE)
add_test(
NAME validate-${TEST_NAME}-timemory