summaryrefslogtreecommitdiff
path: root/dev-util/rocprofiler/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/rocprofiler/files')
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch13
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch71
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch13
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-4.3.0-nostrip.patch13
-rw-r--r--dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch59
5 files changed, 169 insertions, 0 deletions
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch
new file mode 100644
index 000000000000..0aec99627a4a
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-fix-gcc11.patch
@@ -0,0 +1,13 @@
+Index: rocprofiler-rocm-4.3.0/test/ctrl/test_kernel.h
+===================================================================
+--- rocprofiler-rocm-4.3.0.orig/test/ctrl/test_kernel.h
++++ rocprofiler-rocm-4.3.0/test/ctrl/test_kernel.h
+@@ -23,7 +23,7 @@ THE SOFTWARE.
+ #ifndef TEST_CTRL_TEST_KERNEL_H_
+ #define TEST_CTRL_TEST_KERNEL_H_
+
+-#include <string.h>
++#include <string>
+ #include <stdint.h>
+ #include <map>
+
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch
new file mode 100644
index 000000000000..b6d8454dfedd
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch
@@ -0,0 +1,71 @@
+Index: rocprofiler-rocm-4.3.0/bin/rpl_run.sh
+===================================================================
+--- rocprofiler-rocm-4.3.0.orig/bin/rpl_run.sh
++++ rocprofiler-rocm-4.3.0/bin/rpl_run.sh
+@@ -25,18 +25,18 @@
+ time_stamp=`date +%y%m%d_%H%M%S`
+ BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
+ PKG_DIR=$(dirname $BIN_DIR)
+-ROOT_DIR=$(dirname $PKG_DIR)
+-TT_DIR=$ROOT_DIR/roctracer
++ROOT_DIR=$PKG_DIR
++TT_DIR=$ROOT_DIR
+ RUN_DIR=`pwd`
+ TMP_DIR="/tmp"
+ DATA_DIR="rpl_data_${time_stamp}_$$"
+
+-RPL_PATH=$PKG_DIR/lib
+-TLIB_PATH=$PKG_DIR/tool
+-TTLIB_PATH=$TT_DIR/tool
+-ROCM_LIB_PATH=$ROOT_DIR/lib
++RPL_PATH=$PKG_DIR/@LIB_DIR@
++TLIB_PATH=$PKG_DIR/@LIB_DIR@
++TTLIB_PATH=$TT_DIR/@LIB_DIR@
++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@
+
+-GFX=`/opt/rocm/bin/rocm_agent_enumerator | tail -1`
++GFX=`rocm_agent_enumerator | tail -1`
+
+ SPM_COUNTERS_FILE="spm_counters.txt"
+
+@@ -75,7 +75,7 @@ export ROCP_HSA_INTERCEPT=1
+ # Disabling internal ROC Profiler proxy queue (simple version supported for testing purposes)
+ unset ROCP_PROXY_QUEUE
+ # ROC Profiler metrics definition
+-export ROCP_METRICS=$PKG_DIR/lib/metrics.xml
++export ROCP_METRICS=$PKG_DIR/share/rocprofiler/metrics.xml
+ # Disable AQL-profile read API
+ export AQLPROFILE_READ_API=0
+ # ROC Profiler package path
+@@ -109,7 +109,7 @@ usage() {
+ bin_name=`basename $0`
+ echo "ROCm Profiling Library (RPL) run script, a part of ROCprofiler library package."
+ echo "Full path: $BIN_DIR/$bin_name"
+- echo "Metrics definition: $PKG_DIR/lib/metrics.xml"
++ echo "Metrics definition: $PKG_DIR/share/rocprofiler/metrics.xml"
+ echo ""
+ echo "Usage:"
+ echo " $bin_name [-h] [--list-basic] [--list-derived] [-i <input .txt/.xml file>] [-o <output CSV file>] <app command line>"
+@@ -270,7 +270,7 @@ run() {
+ fi
+ if [ "$KFD_TRACE" = 1 ] ; then
+ API_TRACE=${API_TRACE}":kfd"
+- MY_LD_PRELOAD="$TT_DIR/lib/libkfdwrapper64.so $ROCM_LIB_PATH/libhsakmt.so.1 $MY_LD_PRELOAD"
++ MY_LD_PRELOAD="$TTLIB_PATH/libkfdwrapper64.so $ROCM_LIB_PATH/libhsakmt.so.1 $MY_LD_PRELOAD"
+ fi
+ if [ "$HIP_TRACE" = 1 ] ; then
+ API_TRACE=${API_TRACE}":hip"
+@@ -380,11 +380,11 @@ while [ 1 ] ; do
+ export ROCP_METRICS="$2"
+ elif [ "$1" = "--list-basic" ] ; then
+ export ROCP_INFO=b
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--list-derived" ] ; then
+ export ROCP_INFO=d
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--basenames" ] ; then
+ if [ "$2" = "on" ] ; then
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch
new file mode 100644
index 000000000000..dc097a568ca4
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-ldflag.patch
@@ -0,0 +1,13 @@
+Index: rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
+===================================================================
+--- rocprofiler-rocm-5.0.2.orig/cmake_modules/env.cmake
++++ rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
+@@ -51,7 +51,7 @@ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS
+ #set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=int-in-bool-context" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
+
+-set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bdynamic -Wl,-z,noexecstack" )
++set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bdynamic -Wl,-z,noexecstack" )
+
+ set ( CMAKE_SKIP_BUILD_RPATH TRUE )
+
diff --git a/dev-util/rocprofiler/files/rocprofiler-4.3.0-nostrip.patch b/dev-util/rocprofiler/files/rocprofiler-4.3.0-nostrip.patch
new file mode 100644
index 000000000000..3da3d99357f7
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-4.3.0-nostrip.patch
@@ -0,0 +1,13 @@
+Index: rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
+===================================================================
+--- rocprofiler-rocm-5.0.2.orig/cmake_modules/env.cmake
++++ rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
+@@ -92,8 +92,6 @@ string ( TOLOWER "${CMAKE_BUILD_TYPE}" C
+ if ( "${CMAKE_BUILD_TYPE}" STREQUAL debug )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb" )
+ set ( CMAKE_BUILD_TYPE "debug" )
+-else ()
+- set ( CMAKE_BUILD_TYPE "release" )
+ endif ()
+
+ ## Extend Compiler flags based on Processor architecture
diff --git a/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch
new file mode 100644
index 000000000000..0605675e41c6
--- /dev/null
+++ b/dev-util/rocprofiler/files/rocprofiler-5.0.2-gentoo-location.patch
@@ -0,0 +1,59 @@
+Index: rocprofiler-rocm-5.0.2/bin/rpl_run.sh
+===================================================================
+--- rocprofiler-rocm-5.0.2.orig/bin/rpl_run.sh
++++ rocprofiler-rocm-5.0.2/bin/rpl_run.sh
+@@ -25,16 +25,16 @@
+ time_stamp=`date +%y%m%d_%H%M%S`
+ BIN_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
+ PKG_DIR=$(dirname $BIN_DIR)
+-ROOT_DIR=$(dirname $PKG_DIR)
+-TT_DIR=$ROOT_DIR/roctracer
++ROOT_DIR=$PKG_DIR
++TT_DIR=ROOT_DIR
+ RUN_DIR=`pwd`
+ TMP_DIR="/tmp"
+ DATA_DIR="rpl_data_${time_stamp}_$$"
+
+-RPL_PATH=$PKG_DIR/lib
+-TLIB_PATH=$PKG_DIR/tool
+-TTLIB_PATH=$TT_DIR/tool
+-ROCM_LIB_PATH=$ROOT_DIR/lib
++RPL_PATH=$PKG_DIR/@LIB_DIR@
++TLIB_PATH=$PKG_DIR/@LIB_DIR@
++TTLIB_PATH=$TT_DIR/@LIB_DIR@
++ROCM_LIB_PATH=$ROOT_DIR/@LIB_DIR@
+
+ if [ -z "$ROCP_PYTHON_VERSION" ] ; then
+ ROCP_PYTHON_VERSION=python3
+@@ -70,7 +70,7 @@ export ROCP_HSA_INTERCEPT=1
+ # Disabling internal ROC Profiler proxy queue (simple version supported for testing purposes)
+ unset ROCP_PROXY_QUEUE
+ # ROC Profiler metrics definition
+-export ROCP_METRICS=$PKG_DIR/lib/metrics.xml
++export ROCP_METRICS=$PKG_DIR/share/rocprofiler/metrics.xml
+ # Disable AQL-profile read API
+ export AQLPROFILE_READ_API=0
+ # ROC Profiler package path
+@@ -104,7 +104,7 @@ usage() {
+ bin_name=`basename $0`
+ echo "ROCm Profiling Library (RPL) run script, a part of ROCprofiler library package."
+ echo "Full path: $BIN_DIR/$bin_name"
+- echo "Metrics definition: $PKG_DIR/lib/metrics.xml"
++ echo "Metrics definition: $PKG_DIR/share/rocprofiler/metrics.xml"
+ echo ""
+ echo "Usage:"
+ echo " $bin_name [-h] [--list-basic] [--list-derived] [-i <input .txt/.xml file>] [-o <output CSV file>] <app command line>"
+@@ -374,11 +374,11 @@ while [ 1 ] ; do
+ export ROCP_METRICS="$2"
+ elif [ "$1" = "--list-basic" ] ; then
+ export ROCP_INFO=b
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--list-derived" ] ; then
+ export ROCP_INFO=d
+- HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/tool/ctrl"
++ HSA_TOOLS_LIB="$MY_HSA_TOOLS_LIB" eval "$PKG_DIR/bin/ctrl"
+ exit 1
+ elif [ "$1" = "--basenames" ] ; then
+ if [ "$2" = "on" ] ; then