Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebranding of omnitrace-dl, console log. #390

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/lib/core/argparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
"active "
"threads would equate to ~1 second of realtime. If this proves to be "
"difficult to handle in practice, please file a feature request for "
"omnitrace to auto-scale based on the number of threads.")
"rocprof-sys to auto-scale based on the number of threads.")
.count(1)
.dtype("clock-id")
.action([&](parser_t& p) {
Expand Down Expand Up @@ -1191,14 +1191,14 @@ add_core_arguments(parser_t& _parser, parser_data& _data)

add_group_arguments(_parser, "sampling", _data);

_parser.start_group("HARDWARE COUNTER OPTIONS", "See also: omnitrace-avail -H");
_parser.start_group("HARDWARE COUNTER OPTIONS", "See also: rocprof-sys-avail -H");

if(_data.environ_filter("cpu_events", _data))
{
_parser
.add_argument({ "-C", "--cpu-events" },
"Set the CPU hardware counter events to record (ref: "
"`omnitrace-avail -H -c CPU`)")
"`rocprof-sys-avail -H -c CPU`)")
.min_count(1)
.dtype("[EVENT ...]")
.action([&](parser_t& p) {
Expand All @@ -1216,7 +1216,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
_parser
.add_argument({ "-G", "--gpu-events" },
"Set the GPU hardware counter events to record (ref: "
"`omnitrace-avail -H -c GPU`)")
"`rocprof-sys-avail -H -c GPU`)")
.min_count(1)
.dtype("[EVENT ...]")
.action([&](parser_t& p) {
Expand Down Expand Up @@ -1353,7 +1353,7 @@ add_group_arguments(parser_t& _parser, const std::string& _group_name, parser_da
}),
_choices.end());
_choices.emplace_back(
"... run `omnitrace-avail -H -c CPU` for full list ...");
"... run `rocprof-sys-avail -H -c CPU` for full list ...");
itr.second->set_choices(_choices);
}
}
Expand Down Expand Up @@ -1414,7 +1414,7 @@ add_extended_arguments(parser_t& _parser, parser_data& _data)
}),
_choices.end());
_choices.emplace_back(
"... run `omnitrace-avail -H -c CPU` for full list ...");
"... run `rocprof-sys-avail -H -c CPU` for full list ...");
itr.second->set_choices(_choices);
}

Expand Down
28 changes: 14 additions & 14 deletions source/lib/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ get_config()
std::string
get_setting_name(std::string _v)
{
static const auto _prefix = tim::string_view_t{ "omnitrace_" };
static const auto _prefix = tim::string_view_t{ "omnitrac=_" };
for(auto& itr : _v)
itr = tolower(itr);
auto _pos = _v.find(_prefix);
Expand Down Expand Up @@ -172,7 +172,7 @@ auto cfg_fini_callbacks = std::vector<std::function<void()>>{};
void
finalize()
{
OMNITRACE_DEBUG("[omnitrace_finalize] Disabling signal handling...\n");
OMNITRACE_DEBUG("[rocprof-sys_finalize] Disabling signal handling...\n");
tim::signals::disable_signal_detection();
_settings_are_configured() = false;
for(const auto& itr : cfg_fini_callbacks)
Expand Down Expand Up @@ -255,7 +255,7 @@ configure_settings(bool _init)

OMNITRACE_CONFIG_EXT_SETTING(int, "OMNITRACE_DL_VERBOSE",
"Verbosity within the omnitrace-dl library", 0,
"debugging", "libomnitrace-dl", "advanced");
"debugging", "librocprof-sys-dl", "advanced");

OMNITRACE_CONFIG_SETTING(
size_t, "OMNITRACE_NUM_THREADS_HINT",
Expand Down Expand Up @@ -1320,7 +1320,8 @@ get_use_sampling_cputime()
return static_cast<tim::tsettings<bool>&>(*_v->second).get();
}

std::set<int> get_sampling_signals(int64_t)
std::set<int>
get_sampling_signals(int64_t)
{
auto _v = std::set<int>{};
if(get_use_causal())
Expand Down Expand Up @@ -1521,17 +1522,16 @@ print_banner(std::ostream& _os)
{
static const char* _banner = R"banner(

______ .___ ___. .__ __. __ .___________..______ ___ ______ _______
/ __ \ | \/ | | \ | | | | | || _ \ / \ / || ____|
| | | | | \ / | | \| | | | `---| |----`| |_) | / ^ \ | ,----'| |__
| | | | | |\/| | | . ` | | | | | | / / /_\ \ | | | __|
| `--' | | | | | | |\ | | | | | | |\ \----./ _____ \ | `----.| |____
\______/ |__| |__| |__| \__| |__| |__| | _| `._____/__/ \__\ \______||_______|
____ ___ ____ __ __ ______ ______ _____ _____ __ __ ____ ____ ____ ___ _____ ___ _ _____ ____
| _ \ / _ \ / ___| \/ | / ___\ \ / / ___|_ _| ____| \/ / ___| | _ \| _ \ / _ \| ___|_ _| | | ____| _ \
| |_) | | | | | | |\/| | \___ \\ V /\___ \ | | | _| | |\/| \___ \ | |_) | |_) | | | | |_ | || | | _| | |_) |
| _ <| |_| | |___| | | | ___) || | ___) || | | |___| | | |___) | | __/| _ <| |_| | _| | || |___| |___| _ <
|_| \_\\___/ \____|_| |_| |____/ |_| |____/ |_| |_____|_| |_|____/ |_| |_| \_\\___/|_| |___|_____|_____|_| \_\

)banner";

std::stringstream _version_info{};
_version_info << "omnitrace v" << OMNITRACE_VERSION_STRING;
_version_info << "rocprof-sys v" << OMNITRACE_VERSION_STRING;

namespace join = ::timemory::join;

Expand Down Expand Up @@ -1595,7 +1595,7 @@ print_settings(
{
size_t _wextra = (_md && i < 2) ? 2 : 0;
_widths.at(i) = std::max<size_t>(_widths.at(i),
_data.back().at(i).length() + _wextra);
_data.back().at(i).length() + _wextra);
}
}
}
Expand Down Expand Up @@ -1916,8 +1916,8 @@ get_use_sampling()
static auto _v = get_config()->find("OMNITRACE_USE_SAMPLING");
return static_cast<tim::tsettings<bool>&>(*_v->second).get();
#else
OMNITRACE_THROW(
"Error! sampling was enabled but omnitrace was not built with libunwind support");
OMNITRACE_THROW("Error! sampling was enabled but rocprof-sys was not built with "
"libunwind support");
static bool _v = false;
return _v;
#endif
Expand Down
67 changes: 34 additions & 33 deletions source/lib/omnitrace-dl/dl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
if(VARNAME == nullptr && _omnitrace_dl_verbose >= _warn_verbose) \
{ \
OMNITRACE_COMMON_LIBRARY_LOG_START \
fprintf(stderr, "[omnitrace][dl][pid=%i]> %s :: %s\n", getpid(), FUNCNAME, \
fprintf(stderr, "[rocprof-sys][dl][pid=%i]> %s :: %s\n", getpid(), FUNCNAME, \
dlerror()); \
OMNITRACE_COMMON_LIBRARY_LOG_END \
} \
else if(_omnitrace_dl_verbose > _info_verbose) \
{ \
OMNITRACE_COMMON_LIBRARY_LOG_START \
fprintf(stderr, "[omnitrace][dl][pid=%i]> %s :: success\n", getpid(), \
fprintf(stderr, "[rocprof-sys][dl][pid=%i]> %s :: success\n", getpid(), \
FUNCNAME); \
OMNITRACE_COMMON_LIBRARY_LOG_END \
} \
Expand Down Expand Up @@ -229,11 +229,11 @@ struct OMNITRACE_INTERNAL_API indirect
if(_omnitrace_dl_verbose >= 1)
{
OMNITRACE_COMMON_LIBRARY_LOG_START
fprintf(stderr, "[omnitrace][dl][pid=%i] %s resolved to '%s'\n", getpid(),
fprintf(stderr, "[rocprof-sys][dl][pid=%i] %s resolved to '%s'\n", getpid(),
::basename(_omnilib.c_str()), m_omnilib.c_str());
fprintf(stderr, "[omnitrace][dl][pid=%i] %s resolved to '%s'\n", getpid(),
fprintf(stderr, "[rocprof-sys][dl][pid=%i] %s resolved to '%s'\n", getpid(),
::basename(_dllib.c_str()), m_dllib.c_str());
fprintf(stderr, "[omnitrace][dl][pid=%i] %s resolved to '%s'\n", getpid(),
fprintf(stderr, "[rocprof-sys][dl][pid=%i] %s resolved to '%s'\n", getpid(),
::basename(_userlib.c_str()), m_userlib.c_str());
OMNITRACE_COMMON_LIBRARY_LOG_END
}
Expand All @@ -258,7 +258,8 @@ struct OMNITRACE_INTERNAL_API indirect
if(_omnitrace_dl_verbose >= 2)
{
OMNITRACE_COMMON_LIBRARY_LOG_START
fprintf(stderr, "[omnitrace][dl][pid=%i] dlopen(\"%s\", %s) :: success\n",
fprintf(stderr,
"[rocprof-sys][dl][pid=%i] dlopen(\"%s\", %s) :: success\n",
getpid(), _lib.c_str(), _omnitrace_dl_dlopen_descr);
OMNITRACE_COMMON_LIBRARY_LOG_END
}
Expand All @@ -269,7 +270,7 @@ struct OMNITRACE_INTERNAL_API indirect
{
perror("dlopen");
OMNITRACE_COMMON_LIBRARY_LOG_START
fprintf(stderr, "[omnitrace][dl][pid=%i] dlopen(\"%s\", %s) :: %s\n",
fprintf(stderr, "[rocprof-sys][dl][pid=%i] dlopen(\"%s\", %s) :: %s\n",
getpid(), _lib.c_str(), _omnitrace_dl_dlopen_descr, dlerror());
OMNITRACE_COMMON_LIBRARY_LOG_END
}
Expand Down Expand Up @@ -584,7 +585,7 @@ bool _omnitrace_dl_fini = (std::atexit([]() {
{ \
fflush(stderr); \
OMNITRACE_COMMON_LIBRARY_LOG_START \
fprintf(stderr, "[omnitrace][" OMNITRACE_COMMON_LIBRARY_NAME "][%i] ", \
fprintf(stderr, "[rocprof-sys][" OMNITRACE_COMMON_LIBRARY_NAME "][%i] ", \
getpid()); \
fprintf(stderr, __VA_ARGS__); \
OMNITRACE_COMMON_LIBRARY_LOG_END \
Expand Down Expand Up @@ -1087,9 +1088,9 @@ extern "C"
void OnLoadToolProp(void* settings)
{
OMNITRACE_DL_LOG(-16,
"invoking %s(rocprofiler_settings_t*) within omnitrace-dl.so "
"invoking %s(rocprofiler_settings_t*) within rocprof-sys-dl.so "
"will cause a silent failure for rocprofiler. ROCP_TOOL_LIB "
"should be set to libomnitrace.so\n",
"should be set to librocprof-sys.so\n",
__FUNCTION__);
abort();
return OMNITRACE_DL_INVOKE(get_indirect().rocp_on_load_tool_prop_f, settings);
Expand Down Expand Up @@ -1336,43 +1337,43 @@ 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.:

<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
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
Expand Down Expand Up @@ -1409,7 +1410,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)
Expand All @@ -1426,8 +1427,8 @@ 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(),
_val.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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/lib/omnitrace-dl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/lib/omnitrace-rt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ add_custom_target(
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}
DEPENDS omnitrace-rt-library
COMMENT
"Creating ${CMAKE_SHARED_LIBRARY_PREFIX}dyninstAPI_RT${CMAKE_SHARED_LIBRARY_SUFFIX} to omnitrace-rt..."
"Creating ${CMAKE_SHARED_LIBRARY_PREFIX}dyninstAPI_RT${CMAKE_SHARED_LIBRARY_SUFFIX} to rocprof-sys-rt..."
)

install(
Expand Down
2 changes: 1 addition & 1 deletion source/lib/omnitrace-user/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
9 changes: 5 additions & 4 deletions source/lib/omnitrace/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ omnitrace_set_env_hidden(const char* env_name, const char* env_val)
{
OMNITRACE_WARNING_F(
0,
"omnitrace_set_env(\"%s\", \"%s\") called after omnitrace was initialized. "
"omnitrace_set_env(\"%s\", \"%s\") called after rocprof-sys was initialized. "
"state = %s. This environment variable will have no effect\n",
env_name, env_val, std::to_string(get_state()).c_str());
}
Expand Down Expand Up @@ -336,7 +336,7 @@ omnitrace_set_mpi_hidden(bool use, bool attached)
{
OMNITRACE_WARNING_F(
0,
"omnitrace_set_mpi(use=%s, attached=%s) called after omnitrace was "
"omnitrace_set_mpi(use=%s, attached=%s) called after rocprof-sys was "
"initialized. state = %s. MPI support may not be properly initialized. Use "
"OMNITRACE_USE_MPIP=ON and OMNITRACE_USE_PID=ON to ensure full support\n",
std::to_string(use).c_str(), std::to_string(attached).c_str(),
Expand Down Expand Up @@ -598,8 +598,9 @@ omnitrace_init_hidden(const char* _mode, bool _is_binary_rewrite, const char* _a
OMNITRACE_WARNING_F(
0,
"omnitrace_init(mode=%s, is_binary_rewrite=%s, argv0=%s) "
"called after omnitrace was initialized. state = %s. Mode-based settings "
"(via -M <MODE> passed to omnitrace exe) may not be properly "
"called after rocprof-sys was initialized. state = %s. Mode-based "
"settings "
"(via -M <MODE> passed to rocprof-sys exe) may not be properly "
"configured.\n",
_mode, std::to_string(_is_binary_rewrite).c_str(), _argv0.c_str(),
std::to_string(get_state()).c_str());
Expand Down
2 changes: 1 addition & 1 deletion source/lib/omnitrace/library/causal/experiment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ experiment::stop()
"Warning! causal experimentation hasn't seen at least 5 progress points "
"in the last %li experiments. Progress points are necessary for measuring "
"the effect of the virtual speed-up. Please visit "
"https://rocm.github.io/omnitrace/ for documentation on progress "
"https://rocm.github.io/rocprofiler-systems/ for documentation on progress "
"points and how to add them\n",
global_scaling_increments);
}
Expand Down
Loading
Loading