2018-06-25 19:22:36 -05:00
|
|
|
/******************************************************************************
|
2018-08-19 04:11:04 -05:00
|
|
|
Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
2018-06-25 19:22:36 -05:00
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
2018-08-19 04:11:04 -05:00
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
|
all copies or substantial portions of the Software.
|
2018-06-25 19:22:36 -05:00
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2018-08-19 04:11:04 -05:00
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2018-06-25 19:22:36 -05:00
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2018-08-19 04:11:04 -05:00
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
THE SOFTWARE.
|
2018-06-25 19:22:36 -05:00
|
|
|
*******************************************************************************/
|
|
|
|
|
|
2017-11-09 17:26:19 -06:00
|
|
|
#include "core/intercept_queue.h"
|
|
|
|
|
|
|
|
|
|
namespace rocprofiler {
|
|
|
|
|
void InterceptQueue::HsaIntercept(HsaApiTable* table) {
|
|
|
|
|
table->core_->hsa_queue_create_fn = rocprofiler::InterceptQueue::QueueCreate;
|
|
|
|
|
table->core_->hsa_queue_destroy_fn = rocprofiler::InterceptQueue::QueueDestroy;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InterceptQueue::mutex_t InterceptQueue::mutex_;
|
2018-02-21 19:59:47 -06:00
|
|
|
rocprofiler_callback_t InterceptQueue::dispatch_callback_ = NULL;
|
|
|
|
|
InterceptQueue::queue_callback_t InterceptQueue::destroy_callback_ = NULL;
|
|
|
|
|
void* InterceptQueue::callback_data_ = NULL;
|
2017-11-09 17:26:19 -06:00
|
|
|
InterceptQueue::obj_map_t* InterceptQueue::obj_map_ = NULL;
|
2018-02-21 10:07:59 -06:00
|
|
|
const char* InterceptQueue::kernel_none_ = "";
|
2018-03-05 20:59:01 -06:00
|
|
|
Tracker* InterceptQueue::tracker_ = NULL;
|
2018-04-04 12:14:29 -05:00
|
|
|
bool InterceptQueue::tracker_on_ = false;
|
2018-07-09 20:33:58 -05:00
|
|
|
bool InterceptQueue::in_constr_call_ = false;
|
|
|
|
|
|
2017-11-29 13:53:12 -06:00
|
|
|
} // namespace rocprofiler
|