Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs branch from latest amd-mainline #10

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
shell: bash
run: |
echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV
- name: Configure, Build, and Test
timeout-minutes: 30
shell: bash
Expand Down Expand Up @@ -150,12 +150,12 @@ jobs:
if: ${{ contains(matrix.runner, env.CORE_EXT_RUNNER) }}
uses: actions/upload-artifact@v4
with:
name: installers
name: installers-deb
path: |
${{github.workspace}}/build/*.deb
${{github.workspace}}/build/*.rpm
${{github.workspace}}/build/*.tgz
core-rpm:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
Expand All @@ -180,7 +180,7 @@ jobs:
timeout-minutes: 10
shell: bash
run: |
python3 -m pip install -r requirements.txt
sudo python3 -m pip install -r requirements.txt
- name: List Files
shell: bash
Expand All @@ -190,7 +190,7 @@ jobs:
which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; }
for i in python3 git cmake ctest gcc g++ gcov; do which-realpath $i; done
ls -la
- name: Exclude PC Sampling Tests
if: ${{ !contains(matrix.runner, 'mi200') && !contains(matrix.runner, 'mi300') }}
shell: bash
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
if: ${{ contains(matrix.runner, env.CORE_EXT_RUNNER) }}
uses: actions/upload-artifact@v4
with:
name: installers
name: installers-rpm
path: |
${{github.workspace}}/build/*.deb
${{github.workspace}}/build/*.rpm
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,22 @@ Full documentation for ROCprofiler-SDK is available at [Click Here](source/docs/
## Changes

- rocprofv3 tool now needs `--` in front of application. For detailed uses, please [Click Here](source/docs/rocprofv3.md)

## ROCprofiler-SDK for AFAR VI

## Additions

- OTF2 Tool Support
- Kernel and Range Filtering
- Counter Collection Definitions in YAML
- Documentation updates (SQ Block, Counter Collection, Tracing, Tool Usage)
- Added rocprofv3 option --kernel-rename
- Added rocprofv3 options for perfetto settings (buffer size, etc.)
- Added CSV columns for kernel trace
- Thread_Id
- Dispatch_Id
- Added CSV column for counter_collection

## Fixes

- Miscellaneous bug fixes
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.5.0
8 changes: 8 additions & 0 deletions cmake/rocprofiler_config_interfaces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,11 @@ target_link_libraries(rocprofiler-drm INTERFACE ${drm_LIBRARY} ${drm_amdgpu_LIBR
# get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
# target_include_directories(rocprofiler-elfio SYSTEM INTERFACE ${ELFIO_INCLUDE_DIR})
target_link_libraries(rocprofiler-elfio INTERFACE elfio::elfio)

# ----------------------------------------------------------------------------------------#
#
# OTF2
#
# ----------------------------------------------------------------------------------------#

target_link_libraries(rocprofiler-otf2 INTERFACE otf2::otf2)
1 change: 1 addition & 0 deletions cmake/rocprofiler_interfaces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ rocprofiler_add_interface_library(rocprofiler-threading "Enables multithreading
INTERNAL)
rocprofiler_add_interface_library(rocprofiler-perfetto "Enables Perfetto support"
INTERNAL)
rocprofiler_add_interface_library(rocprofiler-otf2 "Enables OTF2 support" INTERNAL)
rocprofiler_add_interface_library(rocprofiler-cereal "Enables Cereal support" INTERNAL)
rocprofiler_add_interface_library(rocprofiler-compile-definitions "Compile definitions"
INTERNAL)
Expand Down
3 changes: 3 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,6 @@ if(TARGET rocprofiler-elfio)
get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
target_include_directories(rocprofiler-elfio SYSTEM INTERFACE ${ELFIO_INCLUDE_DIR})
endif()

# OTF2
add_subdirectory(otf2)
72 changes: 72 additions & 0 deletions external/otf2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# ======================================================================================
# Builds OTF2
# ======================================================================================

set(ROCPROFILER_BINARY_DIR ${PROJECT_BINARY_DIR})
set(OTF2_VERSION
"3.0.3"
CACHE STRING "OTF2 version")
set(OTF2_URL_HASH
"SHA256=18a3905f7917340387e3edc8e5766f31ab1af41f4ecc5665da6c769ca21c4ee8"
CACHE STRING "OTF2 URL download hash")

project(
OTF2
LANGUAGES C
VERSION ${OTF2_VERSION}
DESCRIPTION "Open Trace Format v2"
HOMEPAGE_URL "https://perftools.pages.jsc.fz-juelich.de/cicd/otf2")

include(FetchContent)
include(ExternalProject)
include(ProcessorCount)

if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
cmake_policy(SET CMP0135 NEW)
endif()

set(FETCHCONTENT_BASE_DIR ${ROCPROFILER_BINARY_DIR}/external/packages)

fetchcontent_declare(
otf2-source
URL https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-${OTF2_VERSION}/otf2-${OTF2_VERSION}.tar.gz
URL_HASH ${OTF2_URL_HASH})

fetchcontent_getproperties(ot2f-source)

if(NOT ot2f-source_POPULATED)
message(STATUS "Downloading OTF2...")
fetchcontent_populate(otf2-source)
endif()

set(_otf2_root ${ROCPROFILER_BINARY_DIR}/external/otf2)
set(_otf2_inc_dirs $<BUILD_INTERFACE:${_otf2_root}/include>)
set(_otf2_lib_dirs $<BUILD_INTERFACE:${_otf2_root}/lib>)
set(_otf2_libs $<BUILD_INTERFACE:${_otf2_root}/lib/libotf2${CMAKE_STATIC_LIBRARY_SUFFIX}>)
set(_otf2_build_byproducts "${_otf2_root}/lib/libotf2${CMAKE_STATIC_LIBRARY_SUFFIX}")

find_program(
MAKE_COMMAND
NAMES make gmake
PATH_SUFFIXES bin REQUIRED)

externalproject_add(
otf2-build
PREFIX ${_otf2_root}
SOURCE_DIR ${otf2-source_SOURCE_DIR}
BUILD_IN_SOURCE 1
DOWNLOAD_COMMAND ""
PATCH_COMMAND
${CMAKE_COMMAND} -E env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
<SOURCE_DIR>/configure -q --prefix=${_otf2_root} CFLAGS=-fPIC\ -O3\ -g
CXXFLAGS=-fPIC\ -O3\ -g PYTHON=: SPHINX=:
CONFIGURE_COMMAND ${MAKE_COMMAND} install -s
BUILD_COMMAND ""
BUILD_BYPRODUCTS "${_otf2_build_byproducts}"
INSTALL_COMMAND "")

add_library(otf2 INTERFACE)
add_library(otf2::otf2 ALIAS otf2)
target_include_directories(otf2 SYSTEM INTERFACE ${_otf2_inc_dirs})
target_link_directories(otf2 INTERFACE ${_otf2_lib_dirs})
target_link_libraries(otf2 INTERFACE ${_otf2_libs})
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cmake>=3.21.0
cmake-format
dataclasses
numpy
otf2
pandas
perfetto
pycobertura
Expand Down
8 changes: 4 additions & 4 deletions samples/advanced_thread_trace/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <rocprofiler-sdk/fwd.h>
#include <rocprofiler-sdk/registration.h>
#include <rocprofiler-sdk/rocprofiler.h>
#include <rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj/code_printing.hpp>
#include <rocprofiler-sdk/cxx/codeobj/code_printing.hpp>
#include <shared_mutex>

#include "common/defines.hpp"
Expand Down Expand Up @@ -106,9 +106,9 @@ namespace client
using code_obj_load_data_t = rocprofiler_callback_tracing_code_object_load_data_t;
using kernel_symbol_data_t = rocprofiler_callback_tracing_code_object_kernel_symbol_register_data_t;

using Instruction = rocprofiler::codeobj::disassembly::Instruction;
using CodeobjAddressTranslate = rocprofiler::codeobj::disassembly::CodeobjAddressTranslate;
using SymbolInfo = rocprofiler::codeobj::disassembly::SymbolInfo;
using Instruction = rocprofiler::sdk::codeobj::disassembly::Instruction;
using CodeobjAddressTranslate = rocprofiler::sdk::codeobj::disassembly::CodeobjAddressTranslate;
using SymbolInfo = rocprofiler::sdk::codeobj::disassembly::SymbolInfo;

rocprofiler_client_id_t* client_id = nullptr;
rocprofiler_context_id_t client_ctx = {};
Expand Down
6 changes: 3 additions & 3 deletions samples/code_object_isa_decode/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <rocprofiler-sdk/fwd.h>
#include <rocprofiler-sdk/registration.h>
#include <rocprofiler-sdk/rocprofiler.h>
#include <rocprofiler-sdk/amd_detail/rocprofiler-sdk-codeobj/code_printing.hpp>
#include <rocprofiler-sdk/cxx/codeobj/code_printing.hpp>

#include "common/defines.hpp"
#include "common/filesystem.hpp"
Expand Down Expand Up @@ -90,8 +90,8 @@ using code_obj_load_data_t = rocprofiler_callback_tracing_code_object_load_data_
using kernel_symbol_data_t = rocprofiler_callback_tracing_code_object_kernel_symbol_register_data_t;
using kernel_symbol_map_t = std::unordered_map<std::string, std::pair<uint64_t, size_t>>;

using Instruction = rocprofiler::codeobj::disassembly::Instruction;
using CodeobjAddressTranslate = rocprofiler::codeobj::disassembly::CodeobjAddressTranslate;
using Instruction = rocprofiler::sdk::codeobj::disassembly::Instruction;
using CodeobjAddressTranslate = rocprofiler::sdk::codeobj::disassembly::CodeobjAddressTranslate;

rocprofiler_client_id_t* client_id = nullptr;
rocprofiler_client_finalize_t client_fini_func = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions source/bin/rocprofv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ def add_parser_bool_argument(*args, **kwargs):
)
parser.add_argument(
"--output-format",
help="For adding output format (supported formats: csv, json, pftrace)",
help="For adding output format (supported formats: csv, json, pftrace, otf2)",
nargs="+",
default=None,
choices=("csv", "json", "pftrace"),
choices=("csv", "json", "pftrace", "otf2"),
type=str.lower,
)
parser.add_argument(
Expand Down
17 changes: 9 additions & 8 deletions source/docs/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ defaults:

root: index
subtrees:
- entries:
- file: what-is-rocprof-sdk
- file: buffered_services.md
- file: callback_services.md
- file: counter_collection_services.md
- file: intercept_table.md
- file: pc_sampling.md
- file: tool_library_overview.md
- caption: Install
entries:
- file: install/installation
Expand All @@ -23,8 +15,17 @@ subtrees:
- file: how-to/samples
- caption: API reference
entries:
- file: api-reference/buffered_services
- file: api-reference/callback_services
- file: api-reference/counter_collection_services
- file: api-reference/intercept_table
- file: api-reference/pc_sampling
- file: api-reference/tool_library
- file: _doxygen/html/index
title: API library
- caption: Conceptual
entries:
- file: conceptual/comparing-with-legacy-tools
- caption: License
entries:
- file: license
Loading
Loading