diff --git a/projects/rocprofiler-sdk/cmake/rocprofiler_utilities.cmake b/projects/rocprofiler-sdk/cmake/rocprofiler_utilities.cmake index 5887dfe0d2..344c5b61c4 100644 --- a/projects/rocprofiler-sdk/cmake/rocprofiler_utilities.cmake +++ b/projects/rocprofiler-sdk/cmake/rocprofiler_utilities.cmake @@ -108,12 +108,12 @@ function(ROCPROFILER_CAPITALIZE str var) endfunction() # ------------------------------------------------------------------------------# -# function rocprofiler_strip_target( [FORCE] [EXPLICIT]) +# function rocprofiler_strip_target( [FORCE]) # # Creates a post-build command which strips a binary. FORCE flag will override # function(ROCPROFILER_STRIP_TARGET) - cmake_parse_arguments(STRIP "FORCE;EXPLICIT" "" "ARGS" ${ARGN}) + cmake_parse_arguments(STRIP "FORCE" "" "ARGS" ${ARGN}) list(LENGTH STRIP_UNPARSED_ARGUMENTS NUM_UNPARSED) @@ -131,36 +131,12 @@ function(ROCPROFILER_STRIP_TARGET) endif() if(CMAKE_STRIP AND (STRIP_FORCE OR ROCPROFILER_STRIP_LIBRARIES)) - if(STRIP_EXPLICIT) - add_custom_command( - TARGET ${_TARGET} - POST_BUILD - COMMAND ${CMAKE_STRIP} ${STRIP_ARGS} $ - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Stripping ${_TARGET}...") - else() - add_custom_command( - TARGET ${_TARGET} - POST_BUILD - COMMAND - ${CMAKE_STRIP} -w --keep-symbol="rocprofiler_init" - --keep-symbol="rocprofiler_finalize" - --keep-symbol="rocprofiler_push_trace" - --keep-symbol="rocprofiler_pop_trace" - --keep-symbol="rocprofiler_push_region" - --keep-symbol="rocprofiler_pop_region" - --keep-symbol="rocprofiler_set_env" - --keep-symbol="rocprofiler_set_mpi" - --keep-symbol="rocprofiler_reset_preload" - --keep-symbol="rocprofiler_set_instrumented" - --keep-symbol="rocprofiler_user_*" --keep-symbol="ompt_start_tool" - --keep-symbol="kokkosp_*" --keep-symbol="OnLoad" - --keep-symbol="OnUnload" --keep-symbol="OnLoadToolProp" - --keep-symbol="OnUnloadTool" --keep-symbol="__libc_start_main" - ${STRIP_ARGS} $ - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Stripping ${_TARGET}...") - endif() + add_custom_command( + TARGET ${_TARGET} + POST_BUILD + COMMAND ${CMAKE_STRIP} ${STRIP_ARGS} $ + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Stripping ${_TARGET}...") endif() endfunction() diff --git a/projects/rocprofiler-sdk/samples/common/filesystem.hpp b/projects/rocprofiler-sdk/samples/common/filesystem.hpp index 4d6048dea5..aaeb14a9b4 100644 --- a/projects/rocprofiler-sdk/samples/common/filesystem.hpp +++ b/projects/rocprofiler-sdk/samples/common/filesystem.hpp @@ -67,11 +67,11 @@ namespace common { #if defined(ROCPROFILER_SAMPLES_HAS_GHC_LIB_FILESYSTEM) && \ ROCPROFILER_SAMPLES_HAS_GHC_LIB_FILESYSTEM > 0 -namespace fs = ::ghc::filesystem; // NOLINT +namespace fs = ::ghc::filesystem; // NOLINT(misc-unused-alias-decls) #elif defined(ROCPROFILER_SAMPLES_HAS_CPP_LIB_FILESYSTEM) && \ ROCPROFILER_SAMPLES_HAS_CPP_LIB_FILESYSTEM > 0 -namespace fs = ::std::filesystem; // NOLINT +namespace fs = ::std::filesystem; // NOLINT(misc-unused-alias-decls) #else -namespace fs = ::std::experimental::filesystem; // NOLINT +namespace fs = ::std::experimental::filesystem; // NOLINT(misc-unused-alias-decls) #endif } // namespace common diff --git a/projects/rocprofiler-sdk/source/lib/common/filesystem.hpp b/projects/rocprofiler-sdk/source/lib/common/filesystem.hpp index d33d3da261..8498743f3d 100644 --- a/projects/rocprofiler-sdk/source/lib/common/filesystem.hpp +++ b/projects/rocprofiler-sdk/source/lib/common/filesystem.hpp @@ -67,11 +67,11 @@ namespace rocprofiler namespace common { #if defined(ROCPROFILER_HAS_GHC_LIB_FILESYSTEM) && ROCPROFILER_HAS_GHC_LIB_FILESYSTEM > 0 -namespace filesystem = ::ghc::filesystem; // NOLINT +namespace filesystem = ::ghc::filesystem; // NOLINT(misc-unused-alias-decls) #elif defined(ROCPROFILER_HAS_CPP_LIB_FILESYSTEM) && ROCPROFILER_HAS_CPP_LIB_FILESYSTEM > 0 -namespace filesystem = ::std::filesystem; // NOLINT +namespace filesystem = ::std::filesystem; // NOLINT(misc-unused-alias-decls) #else -namespace filesystem = ::std::experimental::filesystem; // NOLINT +namespace filesystem = ::std::experimental::filesystem; // NOLINT(misc-unused-alias-decls) #endif } // namespace common } // namespace rocprofiler diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/CMakeLists.txt b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/CMakeLists.txt index e140edd539..d43e9f988c 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/CMakeLists.txt +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/CMakeLists.txt @@ -3,11 +3,10 @@ # rocprofiler_activate_clang_tidy() -set(ROCPROFILER_LIB_HEADERS agent.hpp allocator.hpp buffer.hpp external_correlation.hpp +set(ROCPROFILER_LIB_HEADERS agent.hpp buffer.hpp external_correlation.hpp intercept_table.hpp internal_threading.hpp registration.hpp) set(ROCPROFILER_LIB_SOURCES agent.cpp - allocator.cpp buffer.cpp buffer_tracing.cpp agent_profile.cpp diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.cpp deleted file mode 100644 index 137b5e8304..0000000000 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// MIT License -// -// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#include "lib/rocprofiler-sdk/allocator.hpp" -#include "lib/rocprofiler-sdk/registration.hpp" - -#include - -namespace rocprofiler -{ -namespace common -{ -namespace memory -{ -void -deleter::operator()() const -{ - // if fully initialized and not yet finalized - if(registration::get_init_status() > 0 && registration ::get_fini_status() == 0) - { - static auto _once = std::atomic_flag{}; - if(!_once.test_and_set()) registration::finalize(); - // above returns false for only first invocation - } -} -} // namespace memory -} // namespace common -} // namespace rocprofiler diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.hpp deleted file mode 100644 index f728d0e7ca..0000000000 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/allocator.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// MIT License -// -// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include "lib/common/defines.hpp" -#include "lib/common/memory/deleter.hpp" -#include "lib/common/memory/stateless_allocator.hpp" - -namespace rocprofiler -{ -namespace allocator -{ -// declare this trivial type for common::memory::deleter specialization -struct static_data; -} // namespace allocator - -namespace common -{ -namespace memory -{ -template <> -struct deleter -{ - // specialize the deleter call operator to invoke registration::finalize - void operator()() const; -}; -} // namespace memory -} // namespace common - -namespace allocator -{ -// use this allocator for static data which only gets deleted at the end of the application -template -using static_data_allocator = - common::memory::stateless_allocator>; - -// use this for unique_ptr -template -struct static_data_deleter -{ - void operator()(Tp* ptr) const - { - common::memory::deleter{}(); - delete ptr; - } -}; - -template -using unique_static_ptr_t = std::unique_ptr>; - -template -decltype(auto) -make_unique_static(Args&&... args) -{ - return unique_static_ptr_t{new Tp{std::forward(args)...}}; -} -} // namespace allocator -} // namespace rocprofiler diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/CMakeLists.txt b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/CMakeLists.txt index e86253653e..c397903440 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/CMakeLists.txt +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/CMakeLists.txt @@ -2,8 +2,7 @@ # context # set(ROCPROFILER_LIB_CONFIG_SOURCES context.cpp correlation_id.cpp domain.cpp) -set(ROCPROFILER_LIB_CONFIG_HEADERS context.hpp correlation_id.hpp domain.hpp - allocator.hpp) +set(ROCPROFILER_LIB_CONFIG_HEADERS context.hpp correlation_id.hpp domain.hpp) target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_CONFIG_SOURCES} ${ROCPROFILER_LIB_CONFIG_HEADERS}) diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/allocator.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/allocator.hpp deleted file mode 100644 index abdf4def3d..0000000000 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/context/allocator.hpp +++ /dev/null @@ -1,109 +0,0 @@ -// MIT License -// -// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include -#include -#include - -namespace rocprofiler -{ -namespace context -{ -template -struct locality_allocator -{ - void construct(Tp* const _p, const Tp& _v) const { ::new((void*) _p) Tp{_v}; } - void construct(Tp* const _p, Tp&& _v) const { ::new((void*) _p) Tp{std::move(_v)}; } - - void destroy(Tp* const _p) const { _p->~Tp(); } - - static constexpr auto size = sizeof(Tp); - using buffer_value_t = char[size]; - - struct buffer_entry - { - std::atomic_flag flag = ATOMIC_FLAG_INIT; - buffer_value_t value = {}; - - void* get() - { - if(flag.test_and_set()) - { - return &value[0]; - } - return nullptr; - } - - bool reset(void* p) - { - if(static_cast(&value[0]) == p) - { - flag.clear(); - return true; - } - return false; - } - }; - - static auto& get_buffer() - { - static auto _v = std::array{}; - return _v; - } - - Tp* allocate(const size_t n) const - { - if(n == 0) return nullptr; - - if(n == 1) - { - // try an find in buffer for data locality - for(auto& itr : get_buffer()) - { - auto* _p = itr.get(); - if(_p) return static_cast(_p); - } - } - - auto* _p = new char[n * size]; - return reinterpret_cast(_p); - } - - void deallocate(Tp* const ptr, const size_t /*unused*/) const - { - for(auto& itr : get_buffer()) - { - if(itr.reset(ptr)) return; - } - - delete ptr; - } - - Tp* allocate(const size_t n, const void* const /* hint */) const { return allocate(n); } - - void reserve(const size_t) {} -}; -} // namespace context -} // namespace rocprofiler diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hsa/aql_packet.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hsa/aql_packet.cpp index 410db946b1..72fec5c53b 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hsa/aql_packet.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/hsa/aql_packet.cpp @@ -143,7 +143,7 @@ TraceMemoryPool::Alloc(void** ptr, size_t size, desc_t flags, void* data) { // Return page aligned data to avoid cache flush overlap status = pool.allocate_fn(pool.gpu_pool_, size + 0x2000, 0, ptr); - *ptr = (void*) ((uintptr_t(*ptr) + 0xFFF) & ~0xFFFul); // NOLINT + *ptr = (void*) ((uintptr_t(*ptr) + 0xFFF) & ~0xFFFul); // NOLINT(performance-no-int-to-ptr) } return status; } diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.cpp index ee9a58fb16..470a1985df 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.cpp @@ -27,7 +27,6 @@ #include "lib/common/container/stable_vector.hpp" #include "lib/common/static_object.hpp" #include "lib/common/utility.hpp" -#include "lib/rocprofiler-sdk/allocator.hpp" #include "lib/rocprofiler-sdk/buffer.hpp" #include "lib/rocprofiler-sdk/context/context.hpp" #include "lib/rocprofiler-sdk/internal_threading.hpp" diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.hpp index c447538294..fda45368dc 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.hpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/internal_threading.hpp @@ -27,7 +27,6 @@ #include "lib/common/container/stable_vector.hpp" #include "lib/common/defines.hpp" #include "lib/common/utility.hpp" -#include "lib/rocprofiler-sdk/allocator.hpp" #include #include diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.cpp index 3b03ec4f00..0fdec5f8cc 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.cpp @@ -860,34 +860,4 @@ rocprofiler_set_api_table(const char* name, return 0; } - -// #if 0 -bool -OnLoad(HsaApiTable* table, - uint64_t runtime_version, - uint64_t failed_tool_count, - const char* const* failed_tool_names) -{ - rocprofiler::registration::init_logging(); - - (void) runtime_version; - (void) failed_tool_count; - (void) failed_tool_names; - - fprintf(stderr, "[%s:%i] %s\n", __FILE__, __LINE__, __FUNCTION__); - - void* table_v = static_cast(table); - rocprofiler_set_api_table("hsa", runtime_version, 0, &table_v, 1); - - return true; -} - -void -OnUnload() -{ - ROCP_INFO << "Unloading hsa-runtime..."; - ::rocprofiler::registration::finalize(); - ROCP_INFO << "Finalization complete."; -} -// #endif } diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.hpp index f339ab2899..c355cb132b 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.hpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/registration.hpp @@ -30,19 +30,6 @@ #include extern "C" { -struct HsaApiTable; - -using on_load_t = bool (*)(HsaApiTable*, uint64_t, uint64_t, const char* const*); - -bool -OnLoad(HsaApiTable* table, - uint64_t runtime_version, - uint64_t failed_tool_count, - const char* const* failed_tool_names) ROCPROFILER_PUBLIC_API; - -void -OnUnload() ROCPROFILER_PUBLIC_API; - // this is the "hidden" function that rocprofiler-register invokes to pass // the API tables to rocprofiler int diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/shared_library.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/shared_library.cpp index 9883a99bd6..25100c5b8c 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/shared_library.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/shared_library.cpp @@ -23,7 +23,6 @@ #include "lib/common/environment.hpp" #include "lib/common/logging.hpp" #include "lib/common/static_object.hpp" -#include "lib/rocprofiler-sdk/allocator.hpp" #include "lib/rocprofiler-sdk/registration.hpp" #include diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp index 730df2f302..b92d24ee02 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp @@ -112,7 +112,7 @@ public: get_ext().hsa_amd_signal_create_fn(0, 0, nullptr, 0, &signal); packet->completion_signal = signal; get_core().hsa_signal_store_screlease_fn(signal, 1); - }; + } ~Signal() { WaitOn(); @@ -126,8 +126,8 @@ public: void WaitOn() const { auto* wait_fn = get_core().hsa_signal_wait_scacquire_fn; - while(wait_fn(signal, HSA_SIGNAL_CONDITION_EQ, 0, UINT64_MAX, HSA_WAIT_STATE_BLOCKED)) - ; + while(wait_fn(signal, HSA_SIGNAL_CONDITION_EQ, 0, UINT64_MAX, HSA_WAIT_STATE_BLOCKED) != 0) + {} } hsa_signal_t signal; @@ -140,8 +140,9 @@ ThreadTracerQueue::Submit(hsa_ext_amd_aql_pm4_packet_t* packet, bool bWait) std::unique_ptr signal{}; const uint64_t write_idx = add_write_index_relaxed_fn(queue, 1); - size_t index = (write_idx % queue->size) * sizeof(hsa_ext_amd_aql_pm4_packet_t); - auto* queue_slot = reinterpret_cast(size_t(queue->base_address) + index); // NOLINT + size_t index = (write_idx % queue->size) * sizeof(hsa_ext_amd_aql_pm4_packet_t); + // NOLINTNEXTLINE(performance-no-int-to-ptr) + auto* queue_slot = reinterpret_cast(size_t(queue->base_address) + index); const auto* slot_data = reinterpret_cast(packet); @@ -440,7 +441,7 @@ DispatchThreadTracer::start_context() } void -DispatchThreadTracer::stop_context() // NOLINT +DispatchThreadTracer::stop_context() // NOLINT(readability-convert-member-functions-to-static) { client.wlock([&](auto& client_id) { if(!client_id) return; @@ -526,10 +527,8 @@ AgentThreadTracer::stop_context() auto packet = tracer->get_control(false); packet->populate_after(); - std::optional write_index{}; - auto signal = tracer->SubmitAndSignalLast(packet->after_krn_pkt); - if(signal) - wait_list.push_back({tracer.get(), packet->GetHandle(), std::move(signal)}); // NOLINT + auto signal = tracer->SubmitAndSignalLast(packet->after_krn_pkt); + if(signal) wait_list.emplace_back(tracer.get(), packet->GetHandle(), std::move(signal)); } for(auto& [tracer, handle, signal] : wait_list) diff --git a/projects/rocprofiler-sdk/tests/bin/page-migration/page-migration.cpp b/projects/rocprofiler-sdk/tests/bin/page-migration/page-migration.cpp index f422a388aa..5cb3859cb3 100644 --- a/projects/rocprofiler-sdk/tests/bin/page-migration/page-migration.cpp +++ b/projects/rocprofiler-sdk/tests/bin/page-migration/page-migration.cpp @@ -80,7 +80,7 @@ struct mmap_allocator MAP_ANONYMOUS | MAP_PRIVATE, // flags: No file handle -1, // no fd, use memory "MAP_ANONYMOUS" 0); // offset into fd - if(ret == ((void*) -1)) // NOLINT performance-no-int-to-ptr + if(ret == ((void*) -1)) // NOLINT(performance-no-int-to-ptr) { auto ecode = errno; fprintf(stderr, "mmap error %d: %s", ecode, strerror(ecode)); diff --git a/projects/rocprofiler-sdk/tests/common/filesystem.hpp b/projects/rocprofiler-sdk/tests/common/filesystem.hpp index 8cc6af3ebe..178dce7f9e 100644 --- a/projects/rocprofiler-sdk/tests/common/filesystem.hpp +++ b/projects/rocprofiler-sdk/tests/common/filesystem.hpp @@ -67,11 +67,11 @@ namespace common { #if defined(ROCPROFILER_TESTS_HAS_GHC_LIB_FILESYSTEM) && \ ROCPROFILER_TESTS_HAS_GHC_LIB_FILESYSTEM > 0 -namespace fs = ::ghc::filesystem; // NOLINT +namespace fs = ::ghc::filesystem; // NOLINT(misc-unused-alias-decls) #elif defined(ROCPROFILER_TESTS_HAS_CPP_LIB_FILESYSTEM) && \ ROCPROFILER_TESTS_HAS_CPP_LIB_FILESYSTEM > 0 -namespace fs = ::std::filesystem; // NOLINT +namespace fs = ::std::filesystem; // NOLINT(misc-unused-alias-decls) #else -namespace fs = ::std::experimental::filesystem; // NOLINT +namespace fs = ::std::experimental::filesystem; // NOLINT(misc-unused-alias-decls) #endif } // namespace common diff --git a/projects/rocprofiler-sdk/tests/pc_sampling/CMakeLists.txt b/projects/rocprofiler-sdk/tests/pc_sampling/CMakeLists.txt index a9096b2cac..d1466591cb 100644 --- a/projects/rocprofiler-sdk/tests/pc_sampling/CMakeLists.txt +++ b/projects/rocprofiler-sdk/tests/pc_sampling/CMakeLists.txt @@ -127,16 +127,14 @@ add_test(NAME pc-sampling-integration-test set_tests_properties( pc-sampling-integration-test - PROPERTIES - TIMEOUT - 45 - LABELS - "integration-tests;pc-sampling" - # ENVIRONMENT - # "${ROCPROFILER_MEMCHECK_PRELOAD_ENV};HSA_TOOLS_LIB=$" - SKIP_REGULAR_EXPRESSION - "PC sampling unavailable" - ENVIRONMENT - "${pc-sampling-integration-test-env}" - FAIL_REGULAR_EXPRESSION - "${ROCPROFILER_DEFAULT_FAIL_REGEX}") + PROPERTIES TIMEOUT + 45 + LABELS + "integration-tests;pc-sampling" + # ENVIRONMENT "${ROCPROFILER_MEMCHECK_PRELOAD_ENV}" + SKIP_REGULAR_EXPRESSION + "PC sampling unavailable" + ENVIRONMENT + "${pc-sampling-integration-test-env}" + FAIL_REGULAR_EXPRESSION + "${ROCPROFILER_DEFAULT_FAIL_REGEX}")