Reorganize thread trace codeobj headers (#1001)
* include/rocprofiler-sdk/cxx/codeobj
- Relocated from include/rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj
* Update include/rocprofiler-sdk/cxx
- cmake updates
- correct namespace rocprofiler::codeobj rocprofiler::sdk::codeobj
* Update codeobj tests and samples
[ROCm/rocprofiler-sdk commit: 20e07caad4]
Tá an tiomantas seo le fáil i:
tiomanta ag
GitHub
tuismitheoir
03ff04bbe3
tiomantas
6c6adddb5c
@@ -10,5 +10,3 @@ install(
|
||||
FILES ${ROCPROFILER_AMD_DETAIL_HEADER_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/amd_detail/
|
||||
COMPONENT development)
|
||||
|
||||
add_subdirectory(rocprofiler-sdk-codeobj)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# ##############################################################################
|
||||
# # Copyright (c) 2024 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.
|
||||
# ##############################################################################
|
||||
|
||||
set(CODEOBJ_PARSER_HEADERS code_printing.hpp disassembly.hpp segment.hpp)
|
||||
|
||||
install(
|
||||
FILES ${CODEOBJ_PARSER_HEADERS}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj
|
||||
COMPONENT development)
|
||||
@@ -11,4 +11,5 @@ install(
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/cxx
|
||||
COMPONENT development)
|
||||
|
||||
add_subdirectory(codeobj)
|
||||
add_subdirectory(details)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
set(ROCPROFILER_CXX_CODEOBJ_HEADERS code_printing.hpp disassembly.hpp segment.hpp)
|
||||
|
||||
install(
|
||||
FILES ${ROCPROFILER_CXX_CODEOBJ_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/cxx/codeobj
|
||||
COMPONENT development)
|
||||
@@ -40,6 +40,8 @@
|
||||
|
||||
namespace rocprofiler
|
||||
{
|
||||
namespace sdk
|
||||
{
|
||||
namespace codeobj
|
||||
{
|
||||
namespace disassembly
|
||||
@@ -423,4 +425,5 @@ private:
|
||||
|
||||
} // namespace disassembly
|
||||
} // namespace codeobj
|
||||
} // namespace sdk
|
||||
} // namespace rocprofiler
|
||||
@@ -70,6 +70,8 @@
|
||||
|
||||
namespace rocprofiler
|
||||
{
|
||||
namespace sdk
|
||||
{
|
||||
namespace codeobj
|
||||
{
|
||||
namespace disassembly
|
||||
@@ -333,4 +335,5 @@ public:
|
||||
|
||||
} // namespace disassembly
|
||||
} // namespace codeobj
|
||||
} // namespace sdk
|
||||
} // namespace rocprofiler
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
namespace rocprofiler
|
||||
{
|
||||
namespace sdk
|
||||
{
|
||||
namespace codeobj
|
||||
{
|
||||
namespace segment
|
||||
@@ -89,4 +91,5 @@ private:
|
||||
|
||||
} // namespace segment
|
||||
} // namespace codeobj
|
||||
} // namespace sdk
|
||||
} // namespace rocprofiler
|
||||
+7
-7
@@ -23,7 +23,7 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <fstream>
|
||||
#include <rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj/code_printing.hpp>
|
||||
#include <rocprofiler-sdk/cxx/codeobj/code_printing.hpp>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
@@ -84,7 +84,7 @@ GetCodeobjContents()
|
||||
|
||||
TEST(codeobj_library, segment_test)
|
||||
{
|
||||
using CodeobjTableTranslator = rocprofiler::codeobj::segment::CodeobjTableTranslator;
|
||||
using CodeobjTableTranslator = rocprofiler::sdk::codeobj::segment::CodeobjTableTranslator;
|
||||
|
||||
CodeobjTableTranslator table;
|
||||
std::unordered_set<size_t> used_addr{};
|
||||
@@ -122,10 +122,10 @@ TEST(codeobj_library, segment_test)
|
||||
}
|
||||
}
|
||||
|
||||
namespace disassembly = rocprofiler::codeobj::disassembly;
|
||||
namespace disassembly = rocprofiler::sdk::codeobj::disassembly;
|
||||
namespace codeobjhelper = rocprofiler::testing::codeobjhelper;
|
||||
using CodeobjDecoderComponent = rocprofiler::codeobj::disassembly::CodeobjDecoderComponent;
|
||||
using LoadedCodeobjDecoder = rocprofiler::codeobj::disassembly::LoadedCodeobjDecoder;
|
||||
using CodeobjDecoderComponent = rocprofiler::sdk::codeobj::disassembly::CodeobjDecoderComponent;
|
||||
using LoadedCodeobjDecoder = rocprofiler::sdk::codeobj::disassembly::LoadedCodeobjDecoder;
|
||||
|
||||
TEST(codeobj_library, file_opens)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ TEST(codeobj_library, loaded_codeobj_component)
|
||||
|
||||
TEST(codeobj_library, codeobj_map_test)
|
||||
{
|
||||
using marker_id_t = rocprofiler::codeobj::segment::marker_id_t;
|
||||
using marker_id_t = rocprofiler::sdk::codeobj::segment::marker_id_t;
|
||||
|
||||
const std::vector<char>& objdata = rocprofiler::testing::codeobjhelper::GetCodeobjContents();
|
||||
constexpr size_t laddr1 = 0x1000;
|
||||
@@ -221,7 +221,7 @@ TEST(codeobj_library, codeobj_map_test)
|
||||
|
||||
TEST(codeobj_library, codeobj_table_test)
|
||||
{
|
||||
using marker_id_t = rocprofiler::codeobj::segment::marker_id_t;
|
||||
using marker_id_t = rocprofiler::sdk::codeobj::segment::marker_id_t;
|
||||
|
||||
const std::vector<std::string>& hiplines = codeobjhelper::GetHipccOutput();
|
||||
const std::vector<char>& objdata = codeobjhelper::GetCodeobjContents();
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir