From f5e8628978a61176cf05423e57b369dacfd71e88 Mon Sep 17 00:00:00 2001 From: gobhardw Date: Tue, 25 Jul 2023 23:50:48 +0530 Subject: [PATCH] Add usage for all the options in rocprofv2 Change-Id: Ic95c83b6aa8cd90e0550be989cddb28edb1ee73c --- bin/rocprofv2 | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/bin/rocprofv2 b/bin/rocprofv2 index f97ebffbcb..33627f6961 100755 --- a/bin/rocprofv2 +++ b/bin/rocprofv2 @@ -14,11 +14,11 @@ export LD_LIBRARY_PATH=$ROCM_DIR/lib:$LD_LIBRARY_PATH usage() { echo -e "ROCProfilerV2 Run Script Usage:" - echo -e "-h | --help For showing this message" - echo -e "--list-counters For showing all available counters for the current GPUs" + echo -e "-h | --help For showing this message" + echo -e "--list-counters For showing all available counters for the current GPUs" if [ $RUN_FROM_BUILD == 1 ]; then - echo -e "-t | --test For Running the tests" - echo -e "-mt | --mem-test For Running the Memory Leak tests. This run requires building using -acb | --asan-clean-build option" + echo -e "-t | --test For Running the tests" + echo -e "-mt | --mem-test For Running the Memory Leak tests. This run requires building using -acb | --asan-clean-build option" fi echo -e "--hip-api For Collecting HIP API Traces" echo -e "--hip-activity | --hip-trace For Collecting HIP API Activities Traces" @@ -26,15 +26,24 @@ usage() { echo -e "--hsa-activity | --hsa-trace For Collecting HSA API Activities Traces" echo -e "--roctx-trace For Collecting ROCTx Traces" echo -e "--kernel-trace For Collecting Kernel dispatch Traces" - echo -e "--sys-trace For Collecting HIP and HSA APIs and their Activities Traces along ROCTX and Kernel Dispatch traces" + echo -e "--sys-trace For Collecting HIP and HSA APIs and their Activities Traces along ROCTX and Kernel Dispatch traces\n" + echo -e "\t# usage e.g: rocprofv2 --[hip-trace|hsa-trace|roctx-trace|kernel-trace|sys-trace] \n" + echo -e "--plugin PLUGIN_NAME For enabling a plugin (file/perfetto/att/ctf)" - echo -e "\t# ATT plugin usage: rocprofv2 --plugin att " - echo -e "\t# Use \"rocprofv2 --plugin att --help\" for ATT-specific parameters help." + echo -e "\t# usage(file/perfetto/ctf) e.g: rocprofv2 -i pmc.txt --plugin [file/perfetto/ctf] -d out_dir " + echo -e "\t# usage(att): rocprofv2 --plugin att " + echo -e "\t# use \"rocprofv2 --plugin att --help\" for ATT-specific parameters help.\n" echo -e "-i | --input For adding counters file path (every line in the text file represents a counter)" + echo -e "\t# usage: rocprofv2 -i pmc.txt -d \n" echo -e "-o | --output-file For the output file name" + echo -e "\t# usage e.g:(with current dir): rocprofv2 --hip-trace -o " + echo -e "\t# usage e.g:(with custom dir): rocprofv2 --hip-trace -d -o \n" echo -e "-d | --output-directory For adding output path where the output files will be saved" + echo -e "\t# usage e.g:(with custom dir): rocprofv2 --hip-trace -d \n" echo -e "-fi | --flush-interval For adding a flush interval in milliseconds, every \"flush interval\" the buffers will be flushed" - echo -e "-tp | --trace-period Specifies a trace period in milliseconds, with format \"-tp ::\"." + echo -e "\t# usage e.g: rocprofv2 --hip-trace -fi 1000 \n" + echo -e "-tp | --trace-period Specifies a trace period in milliseconds, with format \"-tp ::\"." + echo -e "\t# usage e.g: rocprofv2 --hip-trace -tp 1000:2000:4000 \n" exit 1 }