Skip to content

Commit a331b44

Browse files
committed
Add source code for RMV 1.1 release.
1 parent 1d09dec commit a331b44

File tree

343 files changed

+61012
-11
lines changed

Some content is hidden

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

343 files changed

+61012
-11
lines changed

.clang-format

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
UseTab: Never
4+
ColumnLimit: 160
5+
Language: Cpp
6+
AccessModifierOffset: -4
7+
BreakBeforeBraces: Custom
8+
BraceWrapping:
9+
10+
AfterCaseLabel: true
11+
AfterClass: true
12+
AfterControlStatement: true
13+
AfterEnum: true
14+
AfterFunction: true
15+
AfterNamespace: true
16+
AfterObjCDeclaration: true
17+
AfterStruct: true
18+
AfterUnion: true
19+
AfterExternBlock: false
20+
BeforeCatch: true
21+
BeforeElse: true
22+
IndentBraces: false
23+
SplitEmptyFunction: true
24+
SplitEmptyRecord: true
25+
SplitEmptyNamespace: true
26+
ConstructorInitializerAllOnOneLineOrOnePerLine : false
27+
BreakConstructorInitializers: BeforeComma
28+
DerivePointerAlignment: false
29+
IndentCaseLabels: false
30+
NamespaceIndentation: All
31+
AlignConsecutiveAssignments: true
32+
AlignConsecutiveDeclarations: true
33+
AlignEscapedNewlines: Left
34+
AlignTrailingComments: true
35+
AlignOperands: true
36+
AllowShortFunctionsOnASingleLine: false
37+
AllowShortIfStatementsOnASingleLine: false
38+
AllowShortLoopsOnASingleLine: false
39+
AllowShortBlocksOnASingleLine: false
40+
ReflowComments: false
41+
SortIncludes: false
42+
SortUsingDeclarations: false
43+
BinPackArguments: false
44+
BinPackParameters: false
45+
ExperimentalAutoDetectBinPacking: false
46+
AllowAllParametersOfDeclarationOnNextLine: false

.clang-tidy

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Checks: bugprone-*,clang-analyzer-*,clang-diagnostic-*,google-*,misc-*,modernize-*,-modernize-use-trailing-return-type,-modernize-concat-nested-namespaces,performance-*,readability-*,-modernize-use-auto
2+
WarningsAsErrors: bugprone-*,clang-analyzer-*,clang-diagnostic-*,google-*,misc-*,modernize-*,performance-*,readability-*
3+
FormatStyle: file
4+
CheckOptions:
5+
- key: readability-identifier-naming.ClassCase
6+
value: CamelCase
7+
- key: readability-identifier-naming.ClassConstantCase
8+
value: CamelCase
9+
- key: readability-identifier-naming.ClassConstantPrefix
10+
value: k
11+
- key: readability-identifier-naming.EnumCase
12+
value: CamelCase
13+
- key: readability-identifier-naming.EnumConstantCase
14+
value: CamelCase
15+
- key: readability-identifier-naming.EnumConstantPrefix
16+
value: k
17+
- key: readability-identifier-naming.FunctionCase
18+
value: CamelCase
19+
- key: readability-identifier-naming.GlobalConstantCase
20+
value: CamelCase
21+
- key: readability-identifier-naming.GlobalConstantPrefix
22+
value: k
23+
- key: readability-identifier-naming.GlobalConstantPointerCase
24+
value: CamelCase
25+
- key: readability-identifier-naming.GlobalConstantPointerPrefix
26+
value: k
27+
- key: readability-identifier-naming.MethodCase
28+
value: CamelCase
29+
- key: readability-identifier-naming.NamespaceCase
30+
value: lower_case
31+
- key: readability-identifier-naming.ParameterCase
32+
value: lower_case
33+
- key: readability-identifier-naming.PrivateMemberCase
34+
value: lower_case
35+
- key: readability-identifier-naming.PrivateMemberSuffix
36+
value: _
37+
- key: readability-identifier-naming.PublicMemberCase
38+
value: lower_case
39+
- key: readability-identifier-naming.StaticConstantCase
40+
value: CamelCase
41+
- key: readability-identifier-naming.StaticConstantPrefix
42+
value: k
43+
- key: readability-identifier-naming.TemplateParameterCase
44+
value: CamelCase
45+
- key: readability-identifier-naming.TypeAliasCase
46+
value: CamelCase
47+
- key: readability-identifier-naming.TypedefCase
48+
value: CamelCase
49+
- key: readability-identifier-naming.UnionCase
50+
value: CamelCase
51+
- key: readability-identifier-naming.VariableCase
52+
value: lower_case

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*~
2+
*.pyc
3+
*.orig
4+
__pycache__/
5+
build/linux
6+
build/mac
7+
build/win
8+
documentation/build
9+
documentation/source/_build
10+
external
11+
.vscode
12+
*.aps

CMakeLists.txt

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
## Specify the top level name of the project - this will define the solution name for Visual Studio
4+
project(RMV)
5+
6+
## For RMV we only care about the Debug and Release configuration types
7+
set(CMAKE_CONFIGURATION_TYPES Debug Release)
8+
9+
## Determine build suffixes based on configuration, bitness and internal status
10+
## These values will be inherited by all child projects
11+
set(ADT_PLATFORM_POSTFIX "-x86")
12+
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
13+
set(ADT_PLATFORM_POSTFIX "-x64")
14+
ENDIF()
15+
16+
# As default for RMV, include the debug & internal status in filename - but not the platform bitness
17+
set (CMAKE_DEBUG_POSTFIX -d${ADT_INTERNAL_POSTFIX})
18+
set (CMAKE_RELEASE_POSTFIX ${ADT_INTERNAL_POSTFIX})
19+
20+
IF(WIN32)
21+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release${ADT_INTERNAL_POSTFIX})
22+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug${ADT_INTERNAL_POSTFIX})
23+
ELSE(WIN32)
24+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../release${ADT_INTERNAL_POSTFIX})
25+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug${ADT_INTERNAL_POSTFIX})
26+
ENDIF(WIN32)
27+
28+
# Add for CentOS compiler warning
29+
add_definitions(-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
30+
31+
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
32+
include_directories("${PROJECT_SOURCE_DIR}/external/")
33+
34+
# Global compiler options
35+
IF(WIN32)
36+
add_compile_options(/W4 /WX /MP)
37+
# disable warning C4201: nonstandard extension used: nameless struct/union
38+
add_compile_options(/wd4201)
39+
# this warning is caused by the QT header files - use pragma to disable at source
40+
# disable warning C4127: conditional expression is constant
41+
add_compile_options(/wd4127)
42+
# bump the stack size
43+
add_link_options(/STACK:16777216)
44+
ELSEIF(UNIX)
45+
# Use -Wno-missing-field-initializers for CentOS compiler warning
46+
add_compile_options(-std=c++11 -D_LINUX -Wall -Wextra -Werror -Wno-missing-field-initializers)
47+
# Use _DEBUG on Unix for Debug Builds (defined automatically on Windows)
48+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
49+
ENDIF(WIN32)
50+
51+
IF(WIN32)
52+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
53+
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
54+
ENDIF(WIN32)
55+
56+
# Macro to build source groups to match directory structure
57+
MACRO(SOURCE_GROUP_BY_FOLDER target)
58+
SET(SOURCE_GROUP_DELIMITER "/")
59+
SET(last_dir "")
60+
SET(files "")
61+
FOREACH(file ${SOURCES})
62+
GET_FILENAME_COMPONENT(dir "${file}" PATH)
63+
IF (NOT "${dir}" STREQUAL "${last_dir}")
64+
IF (files)
65+
SOURCE_GROUP("${last_dir}" FILES ${files})
66+
ENDIF (files)
67+
SET(files "")
68+
ENDIF (NOT "${dir}" STREQUAL "${last_dir}")
69+
SET(files ${files} ${file})
70+
SET(last_dir "${dir}")
71+
ENDFOREACH(file)
72+
IF (files)
73+
SOURCE_GROUP("${last_dir}" FILES ${files})
74+
ENDIF (files)
75+
ENDMACRO(SOURCE_GROUP_BY_FOLDER)
76+
77+
add_subdirectory(external/qt_common/custom_widgets QtCommon/custom_widgets)
78+
add_subdirectory(external/qt_common/utils QtCommon/utils)
79+
add_subdirectory(source/parser parser)
80+
add_subdirectory(source/backend backend)
81+
add_subdirectory(source/frontend frontend)
82+
83+
# Group external dependency targets into folder
84+
IF(WIN32)
85+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
86+
set_target_properties(QtCustomWidgets
87+
QtUtils
88+
PROPERTIES
89+
FOLDER Dependencies
90+
)
91+
ELSEIF(APPLE)
92+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
93+
set_target_properties(QtCustomWidgets
94+
QtUtils
95+
PROPERTIES
96+
FOLDER Dependencies
97+
)
98+
ENDIF()
99+
100+
IF(WIN32)
101+
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT RadeonMemoryVisualizer)
102+
ENDIF(WIN32)
103+
104+
## Copy Documentation and Samples to output directory
105+
add_custom_target(Documentation ALL)
106+
add_custom_command(TARGET Documentation POST_BUILD
107+
COMMAND ${CMAKE_COMMAND} -E echo "copying documentation to output directory"
108+
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/docs
109+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/documentation/License.htm $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/docs/.
110+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/README.md $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/.
111+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/Release_Notes.txt $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/.
112+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/NOTICES.txt $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/.
113+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/License.txt $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/.
114+
COMMAND ${CMAKE_COMMAND} -E echo "copying samples to output directory"
115+
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/samples
116+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/sampleTrace.rmv $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/samples/.
117+
)

Known_Issues.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

License.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017-2020 Advanced Micro Devices, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)