Fix rocprof and rocprofiler-sdk-tool (#304)
* Fix rocprof and rocprofiler-sdk-tool
- removed redundant options for rocprofv3
- fixed extension of CSV files
- fixed memory error (segfault) when tracing kernels
- fixed constructor of output_file
- using string after move
- output_file writes csv header
- implemented tool_fini
- flush buffer and stop context
* Minor updates to rocprofv3
* Update source/bin/CMakeLists.txt
- fix rocprof configure output location
[ROCm/rocprofiler-sdk commit: 7d117870d8]
This commit is contained in:
committed by
GitHub
parent
b50cf816a1
commit
633a80ec1b
@@ -14,10 +14,9 @@ GREY='\033[0;90m'
|
||||
RESET='\033[0m'
|
||||
|
||||
usage() {
|
||||
echo -e "${RESET}ROCProfilerV2 Run Script Usage:"
|
||||
echo -e "${RESET}ROCProfilerV3 Run Script Usage:"
|
||||
echo -e "${GREEN}-h | --help ${RESET} For showing this message"
|
||||
echo -e "${GREEN}--hsa-api ${RESET} For Collecting HSA API Traces"
|
||||
echo -e "${GREEN}--hsa-activity | --hsa-trace ${RESET} For Collecting HSA API Activities Traces"
|
||||
echo -e "${GREEN}--hsa-trace ${RESET} For Collecting HSA API Traces"
|
||||
echo -e "${GREEN}--kernel-trace ${RESET} For Collecting Kernel Dispatch Traces"
|
||||
echo -e "${GREEN}-o | --output-file ${RESET} For the output file name"
|
||||
echo -e "\t#${GREY} usage e.g:(with current dir): rocprofv3 --hip-trace -o <file_name> <executable>"
|
||||
@@ -56,13 +55,9 @@ while [ 1 ]; do
|
||||
fi
|
||||
shift
|
||||
shift
|
||||
elif [ "$1" == "--hsa-api" ]; then
|
||||
elif [ "$1" == "--hsa-trace" ]; then
|
||||
export ROCPROFILER_HSA_API_TRACE=1
|
||||
shift
|
||||
elif [[ "$1" == "--hsa-activity" || "$1" == "--hsa-trace" ]]; then
|
||||
export ROCPROFILER_HSA_API_TRACE=1
|
||||
export ROCPROFILER_HSA_ACTIVITY_TRACE=1
|
||||
shift
|
||||
elif [ "$1" == "--kernel-trace" ]; then
|
||||
export ROCPROFILER_KERNEL_TRACE=1
|
||||
shift
|
||||
@@ -80,4 +75,4 @@ done
|
||||
|
||||
export ROCPROFILER_OUTPUT_PATH
|
||||
|
||||
ROCP_TOOL_LIBRARIES=${ROCM_DIR}/lib/rocprofiler-sdk/librocprofiler-sdk-tool.so $*
|
||||
ROCP_TOOL_LIBRARIES=${ROCM_DIR}/lib/rocprofiler-sdk/librocprofiler-sdk-tool.so "${@}"
|
||||
|
||||
Reference in New Issue
Block a user