Move AQLPacket::~AQLPacket to aql_packet.cpp (#137)
- this was defined in queue.cpp
[ROCm/rocprofiler-sdk commit: dcc82f97ac]
This commit is contained in:
committato da
GitHub
parent
925d1ba1b5
commit
0426c45886
@@ -1,4 +1,5 @@
|
||||
set(ROCPROFILER_LIB_HSA_SOURCES hsa.cpp queue.cpp queue_controller.cpp agent_cache.cpp)
|
||||
set(ROCPROFILER_LIB_HSA_SOURCES hsa.cpp queue.cpp queue_controller.cpp agent_cache.cpp
|
||||
aql_packet.cpp)
|
||||
set(ROCPROFILER_LIB_HSA_HEADERS hsa.hpp defines.hpp types.hpp utils.hpp queue.hpp
|
||||
queue_controller.hpp agent_cache.hpp aql_packet.hpp)
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_HSA_SOURCES}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// Copyright (c) 2018-2023 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.
|
||||
|
||||
#include "lib/rocprofiler/hsa/aql_packet.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
namespace rocprofiler
|
||||
{
|
||||
namespace hsa
|
||||
{
|
||||
AQLPacket::~AQLPacket()
|
||||
{
|
||||
if(!command_buf_mallocd)
|
||||
{
|
||||
free_func(profile.command_buffer.ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
::free(profile.command_buffer.ptr);
|
||||
}
|
||||
|
||||
if(!output_buffer_malloced)
|
||||
{
|
||||
free_func(profile.output_buffer.ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
::free(profile.output_buffer.ptr);
|
||||
}
|
||||
}
|
||||
} // namespace hsa
|
||||
} // namespace rocprofiler
|
||||
@@ -245,27 +245,6 @@ WriteInterceptor(const void* packets,
|
||||
}
|
||||
} // namespace
|
||||
|
||||
AQLPacket::~AQLPacket()
|
||||
{
|
||||
if(!command_buf_mallocd)
|
||||
{
|
||||
free_func(profile.command_buffer.ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
free(profile.command_buffer.ptr);
|
||||
}
|
||||
|
||||
if(!output_buffer_malloced)
|
||||
{
|
||||
free_func(profile.output_buffer.ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
free(profile.output_buffer.ptr);
|
||||
}
|
||||
}
|
||||
|
||||
Queue::~Queue()
|
||||
{
|
||||
// Potentially replace with condition variable at some point
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user