summaryrefslogtreecommitdiff
path: root/dev-util/rocprofiler/files/rocprofiler-4.3.0-gentoo-location.patch
blob: b6d8454dfedd179c3f0b5aab5056e46aa8cf3fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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