Skip to content

Commit

Permalink
Fix formating.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuchen-amd committed Oct 2, 2024
1 parent ed50f46 commit a107c9a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
9 changes: 5 additions & 4 deletions source/lib/core/config.cpp
Original file line number Diff line number Diff line change
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 @@ -1594,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 @@ -1915,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 rocprof-sys 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
13 changes: 7 additions & 6 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, "[rocprof-sys][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, "[rocprof-sys][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 @@ -258,7 +258,8 @@ struct OMNITRACE_INTERNAL_API indirect
if(_omnitrace_dl_verbose >= 2)
{
OMNITRACE_COMMON_LIBRARY_LOG_START
fprintf(stderr, "[rocprof-sys][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 Down Expand Up @@ -584,7 +585,7 @@ bool _omnitrace_dl_fini = (std::atexit([]() {
{ \
fflush(stderr); \
OMNITRACE_COMMON_LIBRARY_LOG_START \
fprintf(stderr, "[rocprof-sys][" 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 @@ -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", "rocprof-sys_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
3 changes: 2 additions & 1 deletion source/lib/omnitrace/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ 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 rocprof-sys was initialized. state = %s. Mode-based settings "
"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(),
Expand Down
3 changes: 2 additions & 1 deletion source/lib/omnitrace/library/kokkosp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ extern "C"
tim::consume_parameters(devInfoCount, deviceInfo);

OMNITRACE_BASIC_VERBOSE_F(
0, "Initializing rocprof-sys kokkos connector (sequence %d, version: %llu)... ",
0,
"Initializing rocprof-sys kokkos connector (sequence %d, version: %llu)... ",
loadSeq, (unsigned long long) interfaceVer);

if(_standalone_initialized || (!omnitrace::config::settings_are_configured() &&
Expand Down
4 changes: 3 additions & 1 deletion source/python/gui/source/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ def main():
my_parser.add_argument(
"--version",
action="version",
version="ROCm Systems Profiler 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(
Expand Down

0 comments on commit a107c9a

Please sign in to comment.