Rename Omnitrace to ROCm Systems Profiler (#4)

The Omnitrace program is being renamed. 

Full name: "ROCm Systems Profiler"
Package name: "rocprofiler-systems"
Binary / Library names: "rocprof-sys-*"

---------
Co-authored-by: Xuan Chen <xuchen@amd.com>
Signed-off-by: David Galiffi <David.Galiffi@amd.com>

[ROCm/rocprofiler-systems commit: d07bf508a9]
This commit is contained in:
David Galiffi
2024-10-15 11:20:40 -04:00
committed by GitHub
parent c444ba6131
commit 489eda995d
420 changed files with 10418 additions and 9914 deletions
@@ -34,46 +34,46 @@ if [ -d "$(realpath /tmp)" ]; then
export TMPDIR
fi
: ${CONFIG_DIR:=$(mktemp -t -d omnitrace-test-install-XXXX)}
: ${CONFIG_DIR:=$(mktemp -t -d rocprof-sys-test-install-XXXX)}
: ${SOURCE_DIR:=$(dirname ${SCRIPT_DIR})}
: ${ENABLE_OMNITRACE_INSTRUMENT:=1}
: ${ENABLE_OMNITRACE_AVAIL:=1}
: ${ENABLE_OMNITRACE_SAMPLE:=1}
: ${ENABLE_OMNITRACE_PYTHON:=0}
: ${ENABLE_OMNITRACE_REWRITE:=1}
: ${ENABLE_OMNITRACE_RUNTIME:=1}
: ${ENABLE_ROCPROFSYS_INSTRUMENT:=1}
: ${ENABLE_ROCPROFSYS_AVAIL:=1}
: ${ENABLE_ROCPROFSYS_SAMPLE:=1}
: ${ENABLE_ROCPROFSYS_PYTHON:=0}
: ${ENABLE_ROCPROFSYS_REWRITE:=1}
: ${ENABLE_ROCPROFSYS_RUNTIME:=1}
usage()
{
print_option() { printf " --%-10s %-24s %s (default: %s)\n" "${1}" "${2}" "${3}" "${4}"; }
print_option() { printf " --%-10s %-30s %s (default: %s)\n" "${1}" "${2}" "${3}" "${4}"; }
echo "Options:"
print_option source-dir "<PATH>" "Location of source directory" "${SOURCE_DIR}"
print_option test-omnitrace-instrument "0|1" "Enable testing omnitrace-instrument exe" "${ENABLE_OMNITRACE_INSTRUMENT}"
print_option test-omnitrace-avail "0|1" "Enable testing omnitrace-avail" "${ENABLE_OMNITRACE_AVAIL}"
print_option test-omnitrace-sample "0|1" "Enable testing omnitrace-sample" "${ENABLE_OMNITRACE_SAMPLE}"
print_option test-omnitrace-python "0|1" "Enable testing omnitrace-python" "${ENABLE_OMNITRACE_PYTHON}"
print_option test-omnitrace-rewrite "0|1" "Enable testing omnitrace-instrument binary rewrite" "${ENABLE_OMNITRACE_REWRITE}"
print_option test-omnitrace-runtime "0|1" "Enable testing omnitrace-instrument runtime instrumentation" "${ENABLE_OMNITRACE_RUNTIME}"
print_option test-rocprof-sys-instrument "0|1" "Enable testing rocprof-sys-instrument" "${ENABLE_ROCPROFSYS_INSTRUMENT}"
print_option test-rocprof-sys-avail "0|1" "Enable testing rocprof-sys-avail" "${ENABLE_ROCPROFSYS_AVAIL}"
print_option test-rocprof-sys-sample "0|1" "Enable testing rocprof-sys-sample" "${ENABLE_ROCPROFSYS_SAMPLE}"
print_option test-rocprof-sys-python "0|1" "Enable testing rocprof-sys-python" "${ENABLE_ROCPROFSYS_PYTHON}"
print_option test-rocprof-sys-rewrite "0|1" "Enable testing rocprof-sys-instrument binary rewrite" "${ENABLE_ROCPROFSYS_REWRITE}"
print_option test-rocprof-sys-runtime "0|1" "Enable testing rocprof-sys-instrument runtime instrumentation" "${ENABLE_ROCPROFSYS_RUNTIME}"
}
cat << EOF > ${CONFIG_DIR}/omnitrace.cfg
OMNITRACE_VERBOSE = 2
OMNITRACE_PROFILE = ON
OMNITRACE_TRACE = ON
OMNITRACE_USE_SAMPLING = ON
OMNITRACE_USE_PROCESS_SAMPLING = ON
OMNITRACE_OUTPUT_PATH = %env{CONFIG_DIR}%/omnitrace-tests-output
OMNITRACE_OUTPUT_PREFIX = %tag%/
OMNITRACE_SAMPLING_FREQ = 100
OMNITRACE_SAMPLING_DELAY = 0.05
OMNITRACE_COUT_OUTPUT = ON
OMNITRACE_TIME_OUTPUT = OFF
OMNITRACE_USE_PID = OFF
cat << EOF > ${CONFIG_DIR}/rocprof-sys.cfg
ROCPROFSYS_VERBOSE = 2
ROCPROFSYS_PROFILE = ON
ROCPROFSYS_TRACE = ON
ROCPROFSYS_USE_SAMPLING = ON
ROCPROFSYS_USE_PROCESS_SAMPLING = ON
ROCPROFSYS_OUTPUT_PATH = %env{CONFIG_DIR}%/rocprof-sys-tests-output
ROCPROFSYS_OUTPUT_PREFIX = %tag%/
ROCPROFSYS_SAMPLING_FREQ = 100
ROCPROFSYS_SAMPLING_DELAY = 0.05
ROCPROFSYS_COUT_OUTPUT = ON
ROCPROFSYS_TIME_OUTPUT = OFF
ROCPROFSYS_USE_PID = OFF
EOF
export CONFIG_DIR
export OMNITRACE_CONFIG_FILE=${CONFIG_DIR}/omnitrace.cfg
verbose-run cat ${OMNITRACE_CONFIG_FILE}
export ROCPROFSYS_CONFIG_FILE=${CONFIG_DIR}/rocprof-sys.cfg
verbose-run cat ${ROCPROFSYS_CONFIG_FILE}
while [[ $# -gt 0 ]]
do
@@ -100,28 +100,28 @@ do
fi
case "${ARG}" in
--test-omnitrace-instrument)
ENABLE_OMNITRACE_INSTRUMENT=${VAL}
--test-rocprof-sys-instrument)
ENABLE_ROCPROFSYS_INSTRUMENT=${VAL}
continue
;;
--test-omnitrace-avail)
ENABLE_OMNITRACE_AVAIL=${VAL}
--test-rocprof-sys-avail)
ENABLE_ROCPROFSYS_AVAIL=${VAL}
continue
;;
--test-omnitrace-sample)
ENABLE_OMNITRACE_SAMPLE=${VAL}
--test-rocprof-sys-sample)
ENABLE_ROCPROFSYS_SAMPLE=${VAL}
continue
;;
--test-omnitrace-python)
ENABLE_OMNITRACE_PYTHON=${VAL}
--test-rocprof-sys-python)
ENABLE_ROCPROFSYS_PYTHON=${VAL}
continue
;;
--test-omnitrace-rewrite)
ENABLE_OMNITRACE_REWRITE=${VAL}
--test-rocprof-sys-rewrite)
ENABLE_ROCPROFSYS_REWRITE=${VAL}
continue
;;
--test-omnitrace-runtime)
ENABLE_OMNITRACE_RUNTIME=${VAL}
--test-rocprof-sys-runtime)
ENABLE_ROCPROFSYS_RUNTIME=${VAL}
continue
;;
--source-dir)
@@ -136,40 +136,40 @@ do
esac
done
test-omnitrace()
test-rocprof-sys-instrument()
{
verbose-run which omnitrace
verbose-run ldd $(which omnitrace)
verbose-run omnitrace-instrument --help
verbose-run which rocprof-sys-instrument
verbose-run ldd $(which rocprof-sys-instrument)
verbose-run rocprof-sys-instrument --help
}
test-omnitrace-avail()
test-rocprof-sys-avail()
{
verbose-run which omnitrace-avail
verbose-run ldd $(which omnitrace-avail)
verbose-run omnitrace-avail --help
verbose-run omnitrace-avail -a
verbose-run which rocprof-sys-avail
verbose-run ldd $(which rocprof-sys-avail)
verbose-run rocprof-sys-avail --help
verbose-run rocprof-sys-avail -a
}
test-omnitrace-sample()
test-rocprof-sys-sample()
{
verbose-run which omnitrace-sample
verbose-run ldd $(which omnitrace-sample)
verbose-run omnitrace-sample --help
verbose-run omnitrace-sample --cputime 100 --realtime 50 --hsa-interrupt 0 -TPH -- python3 ${SOURCE_DIR}/examples/python/external.py -n 5 -v 20
verbose-run which rocprof-sys-sample
verbose-run ldd $(which rocprof-sys-sample)
verbose-run rocprof-sys-sample --help
verbose-run rocprof-sys-sample --cputime 100 --realtime 50 --hsa-interrupt 0 -TPH -- python3 ${SOURCE_DIR}/examples/python/external.py -n 5 -v 20
}
test-omnitrace-python()
test-rocprof-sys-python()
{
verbose-run which omnitrace-python
verbose-run omnitrace-python --help
verbose-run omnitrace-python -b -- ${SOURCE_DIR}/examples/python/builtin.py -n 5 -v 5
verbose-run omnitrace-python -b -- ${SOURCE_DIR}/examples/python/noprofile.py -n 5 -v 5
verbose-run omnitrace-python -- ${SOURCE_DIR}/examples/python/external.py -n 5 -v 5
verbose-run which rocprof-sys-python
verbose-run rocprof-sys-python --help
verbose-run rocprof-sys-python -b -- ${SOURCE_DIR}/examples/python/builtin.py -n 5 -v 5
verbose-run rocprof-sys-python -b -- ${SOURCE_DIR}/examples/python/noprofile.py -n 5 -v 5
verbose-run rocprof-sys-python -- ${SOURCE_DIR}/examples/python/external.py -n 5 -v 5
verbose-run python3 ${SOURCE_DIR}/examples/python/source.py -n 5 -v 5
}
test-omnitrace-rewrite()
test-rocprof-sys-rewrite()
{
if [ -f /usr/bin/coreutils ]; then
local LS_NAME=coreutils
@@ -178,13 +178,13 @@ test-omnitrace-rewrite()
local LS_NAME=ls
local LS_ARGS=""
fi
verbose-run omnitrace-instrument -e -v 1 -o ${CONFIG_DIR}/ls.inst --simulate -- ${LS_NAME}
for i in $(find ${CONFIG_DIR}/omnitrace-tests-output/ls.inst -type f); do verbose-run ls ${i}; done
verbose-run omnitrace-instrument -e -v 1 -o ${CONFIG_DIR}/ls.inst -- ${LS_NAME}
verbose-run omnitrace-run -- ${CONFIG_DIR}/ls.inst ${LS_ARGS}
verbose-run rocprof-sys-instrument -e -v 1 -o ${CONFIG_DIR}/ls.inst --simulate -- ${LS_NAME}
for i in $(find ${CONFIG_DIR}/rocprof-sys-tests-output/ls.inst -type f); do verbose-run ls ${i}; done
verbose-run rocprof-sys-instrument -e -v 1 -o ${CONFIG_DIR}/ls.inst -- ${LS_NAME}
verbose-run rocprof-sys-run -- ${CONFIG_DIR}/ls.inst ${LS_ARGS}
}
test-omnitrace-runtime()
test-rocprof-sys-runtime()
{
if [ -f /usr/bin/coreutils ]; then
local LS_NAME=coreutils
@@ -193,14 +193,14 @@ test-omnitrace-runtime()
local LS_NAME=ls
local LS_ARGS=""
fi
verbose-run omnitrace-instrument -e -v 1 --simulate -- ${LS_NAME} ${LS_ARGS}
for i in $(find ${CONFIG_DIR}/omnitrace-tests-output/$(basename ${LS_NAME}) -type f); do verbose-run ls ${i}; done
verbose-run omnitrace-instrument -e -v 1 -- ${LS_NAME} ${LS_ARGS}
verbose-run rocprof-sys-instrument -e -v 1 --simulate -- ${LS_NAME} ${LS_ARGS}
for i in $(find ${CONFIG_DIR}/rocprof-sys-tests-output/$(basename ${LS_NAME}) -type f); do verbose-run ls ${i}; done
verbose-run rocprof-sys-instrument -e -v 1 -- ${LS_NAME} ${LS_ARGS}
}
if [ "${ENABLE_OMNITRACE_INSTRUMENT}" -ne 0 ]; then verbose-run test-omnitrace; fi
if [ "${ENABLE_OMNITRACE_AVAIL}" -ne 0 ]; then verbose-run test-omnitrace-avail; fi
if [ "${ENABLE_OMNITRACE_SAMPLE}" -ne 0 ]; then verbose-run test-omnitrace-sample; fi
if [ "${ENABLE_OMNITRACE_PYTHON}" -ne 0 ]; then verbose-run test-omnitrace-python; fi
if [ "${ENABLE_OMNITRACE_REWRITE}" -ne 0 ]; then verbose-run test-omnitrace-rewrite; fi
if [ "${ENABLE_OMNITRACE_RUNTIME}" -ne 0 ]; then verbose-run test-omnitrace-runtime; fi
if [ "${ENABLE_ROCPROFSYS_INSTRUMENT}" -ne 0 ]; then verbose-run test-rocprof-sys-instrument; fi
if [ "${ENABLE_ROCPROFSYS_AVAIL}" -ne 0 ]; then verbose-run test-rocprof-sys-avail; fi
if [ "${ENABLE_ROCPROFSYS_SAMPLE}" -ne 0 ]; then verbose-run test-rocprof-sys-sample; fi
if [ "${ENABLE_ROCPROFSYS_PYTHON}" -ne 0 ]; then verbose-run test-rocprof-sys-python; fi
if [ "${ENABLE_ROCPROFSYS_REWRITE}" -ne 0 ]; then verbose-run test-rocprof-sys-rewrite; fi
if [ "${ENABLE_ROCPROFSYS_RUNTIME}" -ne 0 ]; then verbose-run test-rocprof-sys-runtime; fi