Skip to content

Commit 2a91cef

Browse files
committed
Update source code for RMV v1.6 release
1 parent f5180e2 commit 2a91cef

File tree

316 files changed

+4439
-1232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+4439
-1232
lines changed

CMakeLists.txt

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
cmake_minimum_required(VERSION 3.11)
22

3+
set(SYSTEM_INFO_BUILD_RDF_INTERFACES ON)
4+
35
## Specify the top level name of the project - this will define the solution name for Visual Studio
46
project(RMV)
57

68
# Define version information
79
set(RMV_MAJOR_VERSION 1)
8-
set(RMV_MINOR_VERSION 5)
10+
set(RMV_MINOR_VERSION 6)
911
if (NOT RMV_BUGFIX_NUMBER)
1012
set(RMV_BUGFIX_NUMBER 0)
1113
endif ()
@@ -19,6 +21,9 @@ string(TIMESTAMP YEAR_STRING "\"%Y\"")
1921
configure_file("${CMAKE_SOURCE_DIR}/Buildinfo.properties.in" "${CMAKE_SOURCE_DIR}/Buildinfo.properties")
2022
configure_file("${CMAKE_SOURCE_DIR}/source/frontend/util/version.h.in" "${CMAKE_SOURCE_DIR}/source/frontend/util/version.h")
2123

24+
option(RDF_ENABLE_CXX_BINDINGS "Allow usage of C++ interface for RDF library" ON)
25+
option(RDF_STATIC "Build RDF as a static library" ON)
26+
2227
## For RMV we only care about the Debug and Release configuration types
2328
set(CMAKE_CONFIGURATION_TYPES Debug Release)
2429

@@ -30,35 +35,36 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
3035
ENDIF()
3136

3237
# As default for RMV, include the debug & internal status in filename - but not the platform bitness
33-
set (CMAKE_DEBUG_POSTFIX -d${ADT_INTERNAL_POSTFIX})
34-
set (CMAKE_RELEASE_POSTFIX ${ADT_INTERNAL_POSTFIX})
38+
set (CMAKE_DEBUG_POSTFIX -d)
39+
set (CMAKE_RELEASE_POSTFIX)
3540

3641
IF(WIN32)
37-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release${ADT_INTERNAL_POSTFIX_LOWER})
38-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug${ADT_INTERNAL_POSTFIX_LOWER})
42+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release)
43+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug)
3944
ELSE(WIN32)
40-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../release${ADT_INTERNAL_POSTFIX_LOWER})
41-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug${ADT_INTERNAL_POSTFIX_LOWER})
45+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../release)
46+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug)
4247
ENDIF(WIN32)
4348

4449
# Add for CentOS compiler warning
4550
add_definitions(-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
4651

4752
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
4853
include_directories("${PROJECT_SOURCE_DIR}/external/")
54+
include_directories("${PROJECT_SOURCE_DIR}/external/third_party/")
4955

5056
# Global compiler options
5157
IF(WIN32)
5258
add_compile_options(/MP)
5359
# bump the stack size
5460
add_link_options(/STACK:16777216)
5561
ELSEIF(UNIX)
56-
# Use -Wno-missing-field-initializers for CentOS compiler warning
57-
add_compile_options(-D_LINUX -Wall -Wextra -Wno-missing-field-initializers)
62+
add_compile_options(-D_LINUX -mno-avx2)
5863
# Allow executable to be double clicked.
5964
add_link_options(-no-pie)
6065
# Use _DEBUG on Unix for Debug Builds (defined automatically on Windows)
6166
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
67+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
6268
ENDIF(WIN32)
6369

6470
IF(WIN32)
@@ -87,8 +93,14 @@ MACRO(SOURCE_GROUP_BY_FOLDER target)
8793
ENDIF (files)
8894
ENDMACRO(SOURCE_GROUP_BY_FOLDER)
8995

96+
# Define C++ standard for RMV
97+
set(CMAKE_CXX_STANDARD 17)
98+
9099
add_subdirectory(external/qt_common/custom_widgets QtCommon/custom_widgets)
91100
add_subdirectory(external/qt_common/utils QtCommon/utils)
101+
add_subdirectory(external/rdf/imported/zstd)
102+
add_subdirectory(external/rdf/rdf)
103+
add_subdirectory(external/system_info_utils)
92104
add_subdirectory(source/parser parser)
93105
add_subdirectory(source/backend backend)
94106
add_subdirectory(source/frontend frontend)
@@ -185,5 +197,5 @@ add_custom_command(TARGET Documentation POST_BUILD
185197
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR}/.
186198
COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
187199
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/samples
188-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/sampleTrace.rmv ${DOCS_OUTPUT_DIR}/samples/sample_trace.rmv
200+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/sample_trace.rmv ${DOCS_OUTPUT_DIR}/samples/.
189201
)

build/dependency_map.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! python3
2-
# Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
2+
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
33

44
import sys
55

@@ -10,11 +10,14 @@
1010

1111
# To allow for future updates where we may have cloned the project somewhere other than gerrit, store the root of
1212
# the repo in a variable. In future, we can automatically calculate this based on the git config
13-
git_root = "https://github.com/GPUOpen-Tools/"
13+
github_tools = "https://github.com/GPUOpen-Tools/"
14+
github_root = "https://github.com/"
1415

1516
# Define a set of dependencies that exist as separate git projects.
1617
# each git dependency has a desired directory where it will be cloned - along with a commit to checkout
1718
git_mapping = {
18-
git_root + "QtCommon" : ["../external/qt_common", "v3.8.0"],
19-
git_root + "UpdateCheckAPI" : ["../external/update_check_api", "v2.0.1"],
19+
github_tools + "QtCommon" : ["../external/qt_common", "v3.8.0"],
20+
github_tools + "UpdateCheckApi" : ["../external/update_check_api", "v2.0.1"],
21+
github_tools + "system_info_utils" : ["../external/system_info_utils", "88a338a01949f8d8bad60a30b78b65300fd13a9f"],
22+
github_root + "GPUOpen-Drivers/libamdrdf" : ["../external/rdf", "v1.1.2"],
2023
}

build/fetch_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! python3
2-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
2+
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
33
#
44
# Script to fetch all external git and/or downloadable dependencies needed to build the project
55
#

build/pre_build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! python3
2-
# Copyright (c) 2020-2022 Advanced Micro Devices, Inc. All rights reserved.
2+
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
33
#
44
# Script to perform all necessary pre build steps. This includes:
55
#
@@ -49,8 +49,8 @@
4949
# parse the command line arguments
5050
parser = argparse.ArgumentParser(description="A script that generates all the necessary build dependencies for a project")
5151
if sys.platform == "win32":
52-
parser.add_argument("--vs", default="2019", choices=["2017", "2019", "2022"], help="specify the version of Visual Studio to be used with this script (default: 2019)")
53-
parser.add_argument("--toolchain", default="2019", choices=["2017", "2019", "2022"], help="specify the compiler toolchain to be used with this script (default: 2019)")
52+
parser.add_argument("--vs", default="2022", choices=["2017", "2019", "2022"], help="specify the version of Visual Studio to be used with this script (default: 2022)")
53+
parser.add_argument("--toolchain", default="2022", choices=["2017", "2019", "2022"], help="specify the compiler toolchain to be used with this script (default: 2022)")
5454
parser.add_argument("--qt-root", default="C:\\Qt", help="specify the root directory for locating QT on this system (default: C:\\Qt\\)")
5555
parser.add_argument("--qt-libver", default="2019", choices=["2017", "2019"], help="specify the Qt lib version to be used with this script (default: 2019)")
5656
elif sys.platform == "darwin":
File renamed without changes.

source/backend/CMakeLists.txt

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ cmake_minimum_required(VERSION 3.10)
22
project(RmvBackend)
33

44
set(CMAKE_INCLUDE_CURRENT_DIR ON)
5-
include_directories(AFTER ../backend ../parser)
5+
include_directories(AFTER ../backend ../parser ../../external/rdf/rdf/inc)
66

7-
IF(UNIX)
7+
add_definitions(-DSYSTEM_INFO_ENABLE_RDF)
8+
add_definitions(-DRDF_CXX_BINDINGS)
9+
IF(WIN32)
10+
# Warnings as errors for Windows
11+
add_compile_options(/W4 /WX)
12+
ELSEIF(UNIX)
813
# Remove warnings for Linux in backend
9-
add_compile_options(-std=c++11 -D_LINUX -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-sign-compare -Wno-uninitialized)
10-
ENDIF(UNIX)
14+
add_compile_options(-D_LINUX -Wall -Wextra -Werror)
15+
ENDIF(WIN32)
1116

1217
# List of all source files. It may be possible to have the build process call cmake to update the makefiles
1318
# only when this file has changed (ie source files have been added or removed)
14-
1519
set( SOURCES
1620
"rmt_adapter_info.cpp"
1721
"rmt_adapter_info.h"
@@ -30,6 +34,8 @@ set( SOURCES
3034
"rmt_job_system.h"
3135
"rmt_linear_buffer.cpp"
3236
"rmt_linear_buffer.h"
37+
"rmt_legacy_snapshot_writer.cpp"
38+
"rmt_legacy_snapshot_writer.h"
3339
"rmt_mutex.cpp"
3440
"rmt_mutex.h"
3541
"rmt_page_table.cpp"
@@ -41,15 +47,24 @@ set( SOURCES
4147
"rmt_process_map.cpp"
4248
"rmt_process_map.h"
4349
"rmt_process_start_info.h"
50+
"rmt_rdf_file_parser.h"
51+
"rmt_rdf_file_parser.cpp"
52+
"rmt_rdf_snapshot_writer.cpp"
53+
"rmt_rdf_snapshot_writer.h"
54+
"rmt_rdf_system_info.h"
4455
"rmt_resource_history.cpp"
4556
"rmt_resource_history.h"
4657
"rmt_resource_list.cpp"
4758
"rmt_resource_list.h"
4859
"rmt_segment_info.h"
60+
"rmt_snapshot_writer.cpp"
61+
"rmt_snapshot_writer.h"
4962
"rmt_thread.cpp"
5063
"rmt_thread.h"
5164
"rmt_thread_event.cpp"
5265
"rmt_thread_event.h"
66+
"rmt_trace_loader.cpp"
67+
"rmt_trace_loader.h"
5368
"rmt_virtual_allocation_list.cpp"
5469
"rmt_virtual_allocation_list.h"
5570
"rmt_warnings.cpp"

source/backend/rmt_adapter_info.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
//=============================================================================
2-
// Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
5-
/// @brief The adapter information captured for the target process.
5+
/// @brief Helper function for legacy adapter information captured for the target process.
66
//=============================================================================
77

88
#include "rmt_adapter_info.h"
99
#include "rmt_assert.h"
1010

11-
const char* RmtAdapterInfoGetVideoMemoryType(const RmtAdapterInfo* adapter_info)
11+
const char* RmtAdapterInfoGetVideoMemoryType(const RmtAdapterInfoMemoryType memory_type)
1212
{
13-
RMT_ASSERT(adapter_info);
14-
15-
switch (adapter_info->memory_type)
13+
switch (memory_type)
1614
{
1715
case kRmtAdapterInfoMemoryTypeUnknown:
1816
return "Unknown";

source/backend/rmt_adapter_info.h

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//=============================================================================
2-
// Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
5-
/// @brief The adapter information captured for the target process.
5+
/// @brief Helper function for legacy adapter information captured for the target process.
66
//=============================================================================
77

88
#ifndef RMV_BACKEND_RMT_ADAPTER_INFO_H_
@@ -20,44 +20,27 @@ extern "C" {
2020
/// @brief An enumeration of memory types that can be used with an adapter.
2121
typedef enum RmtAdapterInfoMemoryType
2222
{
23-
kRmtAdapterInfoMemoryTypeUnknown = 0, ///< Memory is unknown.
24-
kRmtAdapterInfoMemoryTypeDdr2 = 1, ///< System DDR2.
25-
kRmtAdapterInfoMemoryTypeDdr3 = 2, ///< System DDR3.
26-
kRmtAdapterInfoMemoryTypeDdr4 = 3, ///< System DDR4.
27-
kRmtAdapterInfoMemoryTypeGddr5 = 4, ///< Graphics DDR 5.
28-
kRmtAdapterInfoMemoryTypeGddr6 = 5, ///< Graphics DDR 6.
29-
kRmtAdapterInfoMemoryTypeHbm = 6, ///< First version of High-Bandwidth Memory.
30-
kRmtAdapterInfoMemoryTypeHbm2 = 7, ///< Second version of High-Bandwidth Memory.
31-
kRmtAdapterInfoMemoryTypeHbm3 = 8, ///< Third version of High-Bandwidth Memory.
32-
kRmtAdapterInfoMemoryTypeLpddr4 = 9, ///< Low power DDR4.
33-
kRmtAdapterInfoMemoryTypeLpddr5 = 10, ///< Low power DDR5.
34-
kRmtAdapterInfoMemoryTypeDdr5 = 11 ///< System DDR5.
23+
kRmtAdapterInfoMemoryTypeUnknown = 0, ///< Memory is unknown.
24+
kRmtAdapterInfoMemoryTypeDdr2 = 1, ///< System DDR2.
25+
kRmtAdapterInfoMemoryTypeDdr3 = 2, ///< System DDR3.
26+
kRmtAdapterInfoMemoryTypeDdr4 = 3, ///< System DDR4.
27+
kRmtAdapterInfoMemoryTypeGddr5 = 4, ///< Graphics DDR 5.
28+
kRmtAdapterInfoMemoryTypeGddr6 = 5, ///< Graphics DDR 6.
29+
kRmtAdapterInfoMemoryTypeHbm = 6, ///< First version of High-Bandwidth Memory.
30+
kRmtAdapterInfoMemoryTypeHbm2 = 7, ///< Second version of High-Bandwidth Memory.
31+
kRmtAdapterInfoMemoryTypeHbm3 = 8, ///< Third version of High-Bandwidth Memory.
32+
kRmtAdapterInfoMemoryTypeLpddr4 = 9, ///< Low power DDR4.
33+
kRmtAdapterInfoMemoryTypeLpddr5 = 10, ///< Low power DDR5.
34+
kRmtAdapterInfoMemoryTypeDdr5 = 11 ///< System DDR5.
3535
} RmtAdapterInfoMemoryType;
3636

37-
/// @brief A structure encapsulating the information about the adapter.
38-
typedef struct RmtAdapterInfo
39-
{
40-
char name[RMT_MAX_ADAPTER_NAME_LENGTH]; ///< The name of the adapter as a NULL terminated string.
41-
uint32_t pcie_family_id; ///< The PCIe family ID of the adapater.
42-
uint32_t pcie_revision_id; ///< The PCIe revision ID of the adapter.
43-
uint32_t device_id; ///< The PCIe device ID of the adapter.
44-
uint32_t minimum_engine_clock; ///< The minimum engine clock (in MHz).
45-
uint32_t maximum_engine_clock; ///< The maximum engine clock (in MHz).
46-
RmtAdapterInfoMemoryType memory_type; ///< The memory type.
47-
uint32_t memory_operations_per_clock; ///< The number of memory operations that can be performed per clock.
48-
uint32_t memory_bus_width; ///< The width of the memory bus (in bits).
49-
uint32_t memory_bandwidth; ///< Bandwidth of the memory system (in MB/s).
50-
uint32_t minimum_memory_clock; ///< The minimum memory clock (in MHz).
51-
uint32_t maximum_memory_clock; ///< The maximum memory clock (in MHz).
52-
} RmtAdapterInfo;
53-
5437
/// @brief Get the chip type (in string) of the video memory.
5538
///
56-
/// @param [in] adapter_info A pointer to a <c><i>RmtAdapterInfo</i></c> structure.
39+
/// @param [in] memory_type The memory type enumerator.
5740
///
5841
/// @returns
5942
/// Pointer to the memory chip type string.
60-
const char* RmtAdapterInfoGetVideoMemoryType(const RmtAdapterInfo* adapter_info);
43+
const char* RmtAdapterInfoGetVideoMemoryType(const RmtAdapterInfoMemoryType memory_type);
6144

6245
#ifdef __cplusplus
6346
}

source/backend/rmt_atomic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief Implementation of atomic helper functions.

source/backend/rmt_atomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief Definition of platform-abstracted atomic functions.

0 commit comments

Comments
 (0)