diff --git a/src/core/hip_act_cb_tracker.h b/src/core/hip_act_cb_tracker.h deleted file mode 100644 index a3ed2c6f13..0000000000 --- a/src/core/hip_act_cb_tracker.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2018-2022 Advanced Micro Devices, Inc. - - 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. */ - -#ifndef CORE_HIP_ACT_CB_TRACKER_H_ -#define CORE_HIP_ACT_CB_TRACKER_H_ - -#include - -namespace roctracer { -enum { API_CB_MASK = 0x1, ACT_CB_MASK = 0x2 }; - -class hip_act_cb_tracker_t { - private: - std::map data; - - public: - uint32_t enable_check(uint32_t op, uint32_t mask) { return data[op] |= mask; } - - uint32_t disable_check(uint32_t op, uint32_t mask) { return data[op] &= ~mask; } -}; // hip_act_cb_tracker_t -}; // namespace roctracer - -#endif // CORE_HIP_ACT_CB_TRACKER_H_ diff --git a/src/core/roctracer.cpp b/src/core/roctracer.cpp index 92bcf7631c..c9e4103a67 100644 --- a/src/core/roctracer.cpp +++ b/src/core/roctracer.cpp @@ -35,8 +35,8 @@ #include #include #include +#include -#include "core/hip_act_cb_tracker.h" #include "core/journal.h" #include "core/loader.h" #include "core/memory_pool.h" @@ -222,6 +222,17 @@ bool act_en_functor_t::operator()(activity_domain_t domain, uint32_t op, Data&& return true; } +enum { API_CB_MASK = 0x1, ACT_CB_MASK = 0x2 }; + +class hip_act_cb_tracker_t { + public: + uint32_t enable_check(uint32_t op, uint32_t mask) { return data_[op] |= mask; } + uint32_t disable_check(uint32_t op, uint32_t mask) { return data_[op] &= ~mask; } + + private: + std::unordered_map data_; +}; + void hsa_async_copy_handler(::proxy::Tracker::entry_t* entry); void hsa_kernel_handler(::proxy::Tracker::entry_t* entry); constexpr TraceBuffer::flush_prm_t trace_buffer_prm[] = {