Code Coverage (#82)

code coverage:  generate code coverage reports

* Add instrumentation flags to rocshmem target when adding -DBUILD_CODE_COVERAGE cmake flag
* Add helper script to build all subprojects and generate code coverage reports
* Update README with code coverage instructions

[ROCm/rocshmem commit: 474112d03c]
Tá an tiomantas seo le fáil i:
Jobbins
2025-05-16 09:09:17 -06:00
tiomanta ag GitHub
tuismitheoir 6a7644e467
tiomantas 22ea3f0c8b
D'athraigh 7 comhad le 90 breiseanna agus 8 scriosta
+11 -8
Féach ar an gComhad
@@ -42,15 +42,18 @@ target_sources(
ipc_policy.cpp
)
target_compile_options(
${PROJECT_NAME}
PUBLIC
-fgpu-rdc
# xnack allows address translation fault recovery
# required option for managed heap configs
# -mxnack
set(
ROCSHMEM_COMPILE_FLAGS
-fgpu-rdc
# xnack allows address translation fault recovery
# required option for managed heap configs
# -mxnack
)
if (BUILD_CODE_COVERAGE)
set(ROCSHMEM_COMPILE_FLAGS ${ROCSHMEM_COMPILE_FLAGS} -fprofile-instr-generate -fcoverage-mapping)
target_link_options(${PROJECT_NAME} PUBLIC -fprofile-instr-generate)
endif()
target_compile_options(${PROJECT_NAME} PUBLIC ${ROCSHMEM_COMPILE_FLAGS})
#target_link_options(
#${PROJECT_NAME}
#PUBLIC