From 9675b1bd25e566fc5b96d0552f24da43abb0ad09 Mon Sep 17 00:00:00 2001 From: xuchen-amd Date: Tue, 24 Sep 2024 15:51:02 -0400 Subject: [PATCH 01/14] Rebranding of omnitrace-dl, console log. --- source/lib/omnitrace-dl/dl.cpp | 44 +++++++++++++++++----------------- source/lib/omnitrace-dl/main.c | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source/lib/omnitrace-dl/dl.cpp b/source/lib/omnitrace-dl/dl.cpp index 0181df2d6..937d479c5 100644 --- a/source/lib/omnitrace-dl/dl.cpp +++ b/source/lib/omnitrace-dl/dl.cpp @@ -1336,19 +1336,19 @@ verify_instrumented_preloaded() | |__| |____) | |____ \____/|_____/|______| - ____ __ __ _ _ _____ _______ _____ _____ ______ _____ _ _ _ _ - / __ \| \/ | \ | |_ _|__ __| __ \ /\ / ____| ____| | __ \| | | | \ | | - | | | | \ / | \| | | | | | | |__) | / \ | | | |__ ______| |__) | | | | \| | - | | | | |\/| | . ` | | | | | | _ / / /\ \| | | __|______| _ /| | | | . ` | - | |__| | | | | |\ |_| |_ | | | | \ \ / ____ \ |____| |____ | | \ \| |__| | |\ | - \____/|_| |_|_| \_|_____| |_| |_| \_\/_/ \_\_____|______| |_| \_\\____/|_| \_| + __ + _ __ ___ ___ _ __ _ __ ___ / _| ___ _ _ ___ _ __ _ _ _ __ + | '__/ _ \ / __| '_ \| '__/ _ \| |_ _____/ __| | | / __|_____| '__| | | | '_ \ + | | | (_) | (__| |_) | | | (_) | _|_____\__ \ |_| \__ \_____| | | |_| | | | | + |_| \___/ \___| .__/|_| \___/|_| |___/\__, |___/ |_| \__,_|_| |_| + |_| |___/ - Due to a variety of edge cases we've encountered, OmniTrace now requires that binary rewritten executables and libraries be launched - with the 'omnitrace-run' executable. + Due to a variety of edge cases we've encountered, rocprof-sys now requires that binary rewritten executables and libraries be launched + with the 'rocprof-sys-run' executable. - In order to launch the executable with 'omnitrace-run', prefix the current command with 'omnitrace-run' and a standalone double hyphen ('--'). - For MPI applications, place 'omnitrace-run --' after the MPI command. + In order to launch the executable with 'rocprof-sys-run', prefix the current command with 'rocprof-sys-run' and a standalone double hyphen ('--'). + For MPI applications, place 'rocprof-sys-run --' after the MPI command. E.g.: @@ -1356,23 +1356,23 @@ verify_instrumented_preloaded() should be: - omnitrace-run -- - mpirun -n 2 omnitrace-run -- + rocprof-sys-run -- + mpirun -n 2 rocprof-sys-run -- - Note: the command-line arguments passed to 'omnitrace-run' (which are specified before the double hyphen) will override configuration variables - and/or any configuration values specified to 'omnitrace-instrument' via the '--config' or '--env' options. + Note: the command-line arguments passed to 'rocprof-sys-run' (which are specified before the double hyphen) will override configuration variables + and/or any configuration values specified to 'rocprof-sys-instrument' via the '--config' or '--env' options. E.g.: - $ omnitrace-instrument -o ./sleep.inst --env OMNITRACE_SAMPLING_DELAY=5.0 -- sleep - $ echo "OMNITRACE_SAMPLING_FREQ = 500" > omnitrace.cfg - $ export OMNITRACE_CONFIG_FILE=omnitrace.cfg - $ omnitrace-run --sampling-freq=100 --sampling-delay=1.0 -- ./sleep.inst 10 + $ rocprof-sys-instrument -o ./sleep.inst --env ROCPROFSYS_SAMPLING_DELAY=5.0 -- sleep + $ echo "ROCPROFSYS_SAMPLING_FREQ = 500" > rocprof-sys.cfg + $ export ROCPROFSYS_CONFIG_FILE=rocprof-sys.cfg + $ rocprof-sys-run --sampling-freq=100 --sampling-delay=1.0 -- ./sleep.inst 10 In the first command, a default sampling delay of 5 seconds in embedded into the instrumented 'sleep.inst'. - In the second command, the sampling frequency will be set to 500 interrupts per second when OmniTrace reads the config file + In the second command, the sampling frequency will be set to 500 interrupts per second when rocprof-sys reads the config file In the fourth command, the sampling frequency and sampling delay are overridden to 100 interrupts per second and 1 second, respectively, when sleep.inst runs - Thanks for using OmniTrace and happy optimizing! + Thanks for using rocprof-sys and happy optimizing! )notice"; // emit notice @@ -1409,7 +1409,7 @@ extern "C" _reentry = 1; if(!::omnitrace::dl::main_real) - throw std::runtime_error("[omnitrace][dl] Unsuccessful wrapping of main: " + throw std::runtime_error("[rocprof-sys][dl] Unsuccessful wrapping of main: " "nullptr to real main function"); if(envp) @@ -1426,7 +1426,7 @@ extern "C" { auto _var = std::string{ _env_v }.substr(0, _pos); auto _val = std::string{ _env_v }.substr(_pos + 1); - OMNITRACE_DL_LOG(1, "%s(%s, %s)\n", "omnitrace_set_env", _var.c_str(), + OMNITRACE_DL_LOG(1, "%s(%s, %s)\n", "rocprof-sys_set_env", _var.c_str(), _val.c_str()); setenv(_var.c_str(), _val.c_str(), 0); } diff --git a/source/lib/omnitrace-dl/main.c b/source/lib/omnitrace-dl/main.c index c83325c69..db3146a0d 100644 --- a/source/lib/omnitrace-dl/main.c +++ b/source/lib/omnitrace-dl/main.c @@ -122,7 +122,7 @@ omnitrace_libc_start_main(int (*_main)(int, char**, char**), int _argc, char** _ } else { - fputs("Error! omnitrace could not find __libc_start_main!", stderr); + fputs("Error! rocprof-sys could not find __libc_start_main!", stderr); return -1; } } From f2f4ef60a997494feb5f7f95bc663b23c636a4dc Mon Sep 17 00:00:00 2001 From: xuchen-amd Date: Fri, 27 Sep 2024 10:25:14 -0400 Subject: [PATCH 02/14] Rebranding of omnitrace-user, console log. --- source/lib/omnitrace-user/user.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/omnitrace-user/user.cpp b/source/lib/omnitrace-user/user.cpp index 72fa03fe8..13a865c38 100644 --- a/source/lib/omnitrace-user/user.cpp +++ b/source/lib/omnitrace-user/user.cpp @@ -184,7 +184,7 @@ extern "C" case OMNITRACE_USER_ERROR_INVALID_CATEGORY: return "Invalid user binding category"; case OMNITRACE_USER_ERROR_INTERNAL: - return "An unknown error occurred within omnitrace library"; + return "An unknown error occurred within rocprof-sys library"; default: break; } return "No error"; From 75e7e6b13f366836a67174a4845dd60d37eadf5d Mon Sep 17 00:00:00 2001 From: xuchen-amd Date: Fri, 27 Sep 2024 10:27:45 -0400 Subject: [PATCH 03/14] Rebranding of python gui, console log. --- source/python/gui/source/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/python/gui/source/__main__.py b/source/python/gui/source/__main__.py index fa17d6e51..24aa5868d 100644 --- a/source/python/gui/source/__main__.py +++ b/source/python/gui/source/__main__.py @@ -143,18 +143,18 @@ def main(): settings[key] = value my_parser = argparse.ArgumentParser( - description="AMD's OmniTrace Causal Profiling GUI", + description="AMD's ROCm Systems Profiler Causal Profiling GUI", prog="tool", allow_abbrev=False, formatter_class=lambda prog: argparse.RawTextHelpFormatter( prog, max_help_position=40 ), usage=""" - omnitrace-causal-plot [ARGS...] + rocprof-sys-causal-plot [ARGS...] ------------------------------------------------------------------------------- Examples: - \tomnitrace-causal-plot --path workloads/toy -n 0 + \trocprof-sys-causal-plot --path workloads/toy -n 0 ------------------------------------------------------------------------------- """, ) @@ -162,7 +162,7 @@ def main(): my_parser.add_argument( "--version", action="version", - version="OmniTrace Causal Viewer v{}\n".format(f"{__version__}".strip("\n")), + version="ROCm Systems Profiler Causal Viewer v{}\n".format(f"{__version__}".strip("\n")), ) my_parser.add_argument( From 1986b8f05b7069e5e540d60d6f76ace05b5d5f3f Mon Sep 17 00:00:00 2001 From: xuchen-amd Date: Fri, 27 Sep 2024 10:29:35 -0400 Subject: [PATCH 04/14] Rebranding of python omnitrace, console log. --- source/python/omnitrace/__main__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/python/omnitrace/__main__.py b/source/python/omnitrace/__main__.py index a4f43ec4e..8d63be976 100644 --- a/source/python/omnitrace/__main__.py +++ b/source/python/omnitrace/__main__.py @@ -102,9 +102,9 @@ def str2bool(v): _default_label.append("line") parser = argparse.ArgumentParser( - "omnitrace", + "rocprof-sys", add_help=True, - epilog="usage: {} -m omnitrace --