diff --git a/projects/rocprofiler/CHANGELOG.md b/projects/rocprofiler/CHANGELOG.md index 35132d9011..1b290b30bc 100644 --- a/projects/rocprofiler/CHANGELOG.md +++ b/projects/rocprofiler/CHANGELOG.md @@ -220,3 +220,4 @@ The resulting `a.out` will depend on - rocprof clobbers LD_PRELOAD. - Samples are fixed to show the new usage of phases. - Plugin option validates the plugin names. +- Fixing rocsys, for rocsys options, rocsys -h can be called diff --git a/projects/rocprofiler/bin/rocprofv2 b/projects/rocprofiler/bin/rocprofv2 index a5b677589a..6d870af6de 100755 --- a/projects/rocprofiler/bin/rocprofv2 +++ b/projects/rocprofiler/bin/rocprofv2 @@ -192,7 +192,7 @@ while [ 1 ] ; do export ROCPROFILER_ROCTX_TRACE=1 export ROCPROFILER_KERNEL_TRACE=1 shift - elif [ "$1" = "--amd-sys" ] ; then + elif [ "$1" = "--roc-sys" ] ; then export ROCPROFILER_ENABLE_AMDSYS=$2 shift shift diff --git a/projects/rocprofiler/src/tools/amdsys/amdsys.cpp b/projects/rocprofiler/src/tools/amdsys/amdsys.cpp index 3a9333f940..2e1895069f 100644 --- a/projects/rocprofiler/src/tools/amdsys/amdsys.cpp +++ b/projects/rocprofiler/src/tools/amdsys/amdsys.cpp @@ -84,13 +84,13 @@ int main(int argc, char* argv[]) { if (argc < 4) { perror( - "amdsys: start must be preceeded by --session \n\t" - "amdsys --session start \n" - "amdsys: stop must be preceeded by --session \n \t" - "amdsys --session stop \n" - "amdsys: launch must be preceeded by --session-new \n \t" - "e.g. mpiexec -np 16 amdsys --session-new launch py app.py\n" - "where all mpiexec options must come before amdsys"); + "rocsys: start must be preceeded by --session \n\t" + "rocsys --session start \n" + "rocsys: stop must be preceeded by --session \n \t" + "rocsys --session stop \n" + "rocsys: launch must be preceeded by --session-new \n \t" + "e.g. mpiexec -np 16 rocsys --session-new launch py app.py\n" + "where all mpiexec options must come before rocsys"); exit(1); } @@ -112,7 +112,7 @@ int main(int argc, char* argv[]) { int sys_type = 0; - while (std::string(argv[i]).find("amdsys") != std::string::npos) { + while (std::string(argv[i]).find("rocsys") != std::string::npos) { i++; break; } @@ -152,14 +152,14 @@ int main(int argc, char* argv[]) { break; } else { report( - "amdsys: start must be preceeded by --session \n\t" - "amdsys --session start \n" - "amdsys: stop must be preceeded by --session \n \t" - "amdsys --session stop \n" - "amdsys: launch must be preceeded by --session \n \t" - "e.g. amdsys --session launch rocprofv2 " + "rocsys: start must be preceeded by --session \n\t" + "rocsys --session start \n" + "rocsys: stop must be preceeded by --session \n \t" + "rocsys --session stop \n" + "rocsys: launch must be preceeded by --session \n \t" + "e.g. rocsys --session launch rocprofv2 " " \n" - "where all mpiexec options must come before amdsys\n", + "where all mpiexec options must come before rocsys\n", 1); } } @@ -181,13 +181,13 @@ int main(int argc, char* argv[]) { if (status < 0) std::cerr << "Invalid Command!" << std::endl; session_id_shm = reinterpret_cast(mmap(0, SIZE, PROT_WRITE, MAP_SHARED, shm_fd, 0)); *session_id_shm = session_id; - printf("AMDSYS:: Session ID: %d\n", session_id); + printf("ROCSYS:: Session ID: %d\n", session_id); int argindex = i; std::vector env_vars; env_vars.emplace_back(""); if (strncmp(argv[i], "rocprofv2", 8) == 0) { - env_vars.emplace_back("--amd-sys"); + env_vars.emplace_back("--roc-sys"); env_vars.emplace_back(std::to_string(session_id)); } for (argindex++; argindex < argc; argindex++) { @@ -195,7 +195,7 @@ int main(int argc, char* argv[]) { fs::path command = bin_path; command.append("rocprofv2"); env_vars.emplace_back(command.c_str()); - env_vars.emplace_back("--amd-sys"); + env_vars.emplace_back("--roc-sys"); env_vars.emplace_back(std::to_string(session_id)); } else { env_vars.emplace_back(argv[argindex]); @@ -231,7 +231,7 @@ int main(int argc, char* argv[]) { break; } default: { - report("AMDSYS:: Error: Not possible to reach here, please report(invalid sys_type)!\n", 1); + report("ROCSYS:: Error: Not possible to reach here, please report(invalid sys_type)!\n", 1); } } return 1;