Skip to content

Commit

Permalink
Rename omnitrace-run binary
Browse files Browse the repository at this point in the history
  • Loading branch information
dgaliffiAMD committed Sep 14, 2024
1 parent 4050dfd commit 13d1a3a
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
rocprof-sys-instrument -e -v 1 -o ls.inst --simulate -- ls
for i in $(find omnitrace-ls.inst-output -type f); do echo -e "\n\n --> ${i} \n\n"; cat ${i}; done
rocprof-sys-instrument -e -v 1 -o ls.inst -- ls
omnitrace-run -- ./ls.inst
rocprof-sys-run -- ./ls.inst
rocprof-sys-instrument -e -v 1 --simulate -- ls
for i in $(find omnitrace-ls-output -type f); do echo -e "\n\n --> ${i} \n\n"; cat ${i}; done
rocprof-sys-instrument -e -v 1 -- ls
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ test-rocprof-sys-rewrite()
verbose-run rocprof-sys-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 rocprof-sys-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-run -- ${CONFIG_DIR}/ls.inst ${LS_ARGS}
}

test-rocprof-sys-runtime()
Expand Down
4 changes: 2 additions & 2 deletions source/bin/omnitrace-exe/omnitrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ main(int argc, char** argv)
gggggg
OmniTrace has renamed the "omnitrace" executable to "rocprof-sys-instrument" to reduce confusion.
ROCm Systems Profiler has renamed the "omnitrace" executable to "rocprof-sys-instrument" to reduce confusion.
This executable only exists to provide this deprecation warning and maintain backwards compatibility for a few releases.
This executable will soon invoke "rocprof-sys-instrument" with the arguments you just provided after we've given you
Expand All @@ -76,7 +76,7 @@ main(int argc, char** argv)
If you are running this job non-interactively, we will resume executing after ~1 minute unless CI or OMNITRACE_CI is defined
in the environment, in which case, we will throw an error.
Thanks for using OmniTrace and happy optimizing!
Thanks for using ROCm Systems Profiler and happy optimizing!
)warning";

auto _completed = std::promise<void>{};
Expand Down
3 changes: 2 additions & 1 deletion source/bin/omnitrace-run/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ target_link_libraries(
omnitrace::omnitrace-sanitizer)
set_target_properties(
omnitrace-run PROPERTIES BUILD_RPATH "\$ORIGIN:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}"
INSTALL_RPATH "${OMNITRACE_EXE_INSTALL_RPATH}")
INSTALL_RPATH "${OMNITRACE_EXE_INSTALL_RPATH}"
OUTPUT_NAME "rocprof-sys-run")

omnitrace_strip_target(omnitrace-run)

Expand Down
6 changes: 3 additions & 3 deletions source/bin/omnitrace-run/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ prepare_command_for_run(char* _exe, parser_data_t& _data)
if(!_injected)
{
throw std::runtime_error(
join("", "omnitrace-run was unable to match \"", _data.launcher,
join("", "rocprof-sys-run was unable to match \"", _data.launcher,
"\" to any arguments on the command line: \"",
join(array_config{ " ", "", "" }, _data.command), "\""));
}
Expand Down Expand Up @@ -292,8 +292,8 @@ parse_args(int argc, char** argv, parser_data_t& _parser_data, bool& _fork_exec)
exit(EXIT_FAILURE);
});

parser.enable_help("", "Usage: omnitrace-run <OPTIONS> -- <COMMAND> <ARGS>");
parser.enable_version("omnitrace-run", OMNITRACE_ARGPARSE_VERSION_INFO);
parser.enable_help("", "Usage: rocprof-sys-run <OPTIONS> -- <COMMAND> <ARGS>");
parser.enable_version("rocprof-sys-run", OMNITRACE_ARGPARSE_VERSION_INFO);

auto _cols = std::get<0>(console::get_columns());
if(_cols > parser.get_help_width() + 8)
Expand Down
10 changes: 5 additions & 5 deletions source/bin/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,11 @@ omnitrace_add_bin_test(
)

omnitrace_add_bin_test(
NAME omnitrace-run-help
NAME rocprof-sys-run-help
TARGET omnitrace-run
ARGS --help
TIMEOUT 45
LABELS "omnitrace-run")
LABELS "rocprof-sys-run")

file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/omnitrace-tests-config")
file(
Expand All @@ -396,7 +396,7 @@ set_target_properties(
${PROJECT_BINARY_DIR}/bin/testing)

omnitrace_add_bin_test(
NAME omnitrace-run-args
NAME rocprof-sys-run-args
TARGET omnitrace-run
ARGS --monochrome
--debug=false
Expand All @@ -406,7 +406,7 @@ omnitrace_add_bin_test(
%env{TWD}%/omnitrace-tests-config/empty.cfg
-o
omnitrace-tests-output
omnitrace-run-args-output/
rocprof-sys-run-args-output/
-TPHD
-S
cputime
Expand Down Expand Up @@ -489,4 +489,4 @@ omnitrace_add_bin_test(
$<TARGET_FILE:sleeper>
5
TIMEOUT 45
LABELS "omnitrace-run")
LABELS "rocprof-sys-run")
22 changes: 12 additions & 10 deletions source/lib/omnitrace-dl/dl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,35 +1345,37 @@ 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, ROCm Systems Profiller 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.:
<EXECUTABLE> <ARGS...>
mpirun -n 2 <EXECUTABLE> <ARGS...>
should be:
omnitrace-run -- <EXECUTABLE> <ARGS...>
mpirun -n 2 omnitrace-run -- <EXECUTABLE> <ARGS...>
rocprof-sys-run -- <EXECUTABLE> <ARGS...>
mpirun -n 2 rocprof-sys-run -- <EXECUTABLE> <ARGS...>
Note: the command-line arguments passed to 'omnitrace-run' (which are specified before the double hyphen) will override configuration variables
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.:
$ rocprof-sys-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-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 ROCm Systems Profiller 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 ROCm Systems Profiler and happy optimizing!
)notice";

// emit notice
Expand Down

0 comments on commit 13d1a3a

Please sign in to comment.