Re-enable clang-tidy for core workflows + clang-tidy fixes (#197)
* Ensure the clang-tidy is updated + clang-tidy fixes * update-ci workflow * Enable clang-tidy checks * Add extra logging to device counter collection samples * Misc clang-tidy fixes * Disable device counter collection samples for ThreadSanitizer * Formatting --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Este cometimento está contido em:
cometido por
GitHub
ascendente
cdf22eba7d
cometimento
070b659a9a
@@ -25,6 +25,12 @@ foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(ROCPROFILER_MEMCHECK STREQUAL "ThreadSanitizer")
|
||||
set(IS_THREAD_SANITIZER ON)
|
||||
else()
|
||||
set(IS_THREAD_SANITIZER OFF)
|
||||
endif()
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
add_library(counter-collection-buffer-client SHARED)
|
||||
@@ -152,9 +158,16 @@ add_test(NAME counter-collection-device-profiling
|
||||
|
||||
set_tests_properties(
|
||||
counter-collection-device-profiling
|
||||
PROPERTIES TIMEOUT 120 LABELS "samples" ENVIRONMENT
|
||||
"${counter-collection-functional-counter-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
PROPERTIES TIMEOUT
|
||||
120
|
||||
LABELS
|
||||
"samples"
|
||||
ENVIRONMENT
|
||||
"${counter-collection-functional-counter-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_THREAD_SANITIZER}")
|
||||
|
||||
add_library(counter-collection-device-profiling-sync-client SHARED)
|
||||
target_sources(counter-collection-device-profiling-sync-client
|
||||
@@ -180,6 +193,13 @@ add_test(NAME counter-collection-device-profiling-sync
|
||||
|
||||
set_tests_properties(
|
||||
counter-collection-device-profiling-sync
|
||||
PROPERTIES TIMEOUT 120 LABELS "samples" ENVIRONMENT
|
||||
"${counter-collection-functional-counter-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
PROPERTIES TIMEOUT
|
||||
120
|
||||
LABELS
|
||||
"samples"
|
||||
ENVIRONMENT
|
||||
"${counter-collection-functional-counter-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_THREAD_SANITIZER}")
|
||||
|
||||
@@ -307,17 +307,20 @@ tool_init(rocprofiler_client_finalize_t, void* user_data)
|
||||
void
|
||||
tool_fini(void* user_data)
|
||||
{
|
||||
std::clog << "In tool fini\n" << std::flush;
|
||||
|
||||
exit_toggle().store(true);
|
||||
while(exit_toggle().load() == true)
|
||||
{};
|
||||
|
||||
std::clog << "In tool fini\n";
|
||||
rocprofiler_stop_context(get_client_ctx());
|
||||
ROCPROFILER_CALL(rocprofiler_flush_buffer(get_buffer()), "buffer flush");
|
||||
|
||||
auto* output_stream = static_cast<std::ostream*>(user_data);
|
||||
*output_stream << std::flush;
|
||||
if(output_stream != &std::cout && output_stream != &std::cerr) delete output_stream;
|
||||
|
||||
std::clog << "Completed tool fini\n" << std::flush;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -424,6 +424,8 @@ tool_init(rocprofiler_client_finalize_t fini_func, void*)
|
||||
void
|
||||
tool_fini(void* user_data)
|
||||
{
|
||||
std::clog << "In tool fini\n" << std::flush;
|
||||
|
||||
client_id = nullptr;
|
||||
|
||||
exit_toggle().store(true);
|
||||
@@ -441,6 +443,8 @@ tool_fini(void* user_data)
|
||||
|
||||
sampler.reset();
|
||||
delete sampler_thread;
|
||||
|
||||
std::clog << "Completed tool fini\n" << std::flush;
|
||||
}
|
||||
|
||||
extern "C" rocprofiler_tool_configure_result_t*
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador