-
Notifications
You must be signed in to change notification settings - Fork 407
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
Left align demangled stacktrace output. #6191
Left align demangled stacktrace output. #6191
Conversation
From the clang-format check on Jenkins CI diff --git a/core/src/impl/Kokkos_Stacktrace.cpp b/core/src/impl/Kokkos_Stacktrace.cpp
index 6ce8d77a4..577e4cfb1 100644
--- a/core/src/impl/Kokkos_Stacktrace.cpp
+++ b/core/src/impl/Kokkos_Stacktrace.cpp
@@ -170,9 +170,10 @@ main_column_info find_main_column(const std::vector<std::string>& traceback) {
return main_column_info{found_main, main_col};
}
-void demangle_and_print_traceback_entry(
- std::ostream& out, const std::string& traceback_entry,
- const bool found_main, const size_t main_col) {
+void demangle_and_print_traceback_entry(std::ostream& out,
+ const std::string& traceback_entry,
+ const bool found_main,
+ const size_t main_col) {
std::vector<std::string> tokens;
size_t cur_col = 0;
for_each_token(traceback_entry, [&](const std::string& s, bool last) { |
can you please post a screenshot of what the output looks like after this PR vs what was before ? |
Before:
After:
|
thanks @vbrunini maybe more people will vote on this today at the meeting |
Regarding the proposal for address alignment: is the address a separate string right now? It looks to me like its just part of the entire name? |
i have not checked that, but seems so. I was just proposing what looked "nice" to my eye... |
We agreed on having the addresses first, then line numbers, and everything left-aligned. |
Now looks like:
|
core/src/impl/Kokkos_Stacktrace.cpp
Outdated
out << s; | ||
} | ||
if (!last) { | ||
out << " "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably simplify even further and not worry about an extra space in the last line:
out << s; | |
} | |
if (!last) { | |
out << " "; | |
out << s << " " << demangle(s); |
This would get rid of bool last
parameter and the second loop.
CI seems unrelated |
Ignored HIP timeouts |
* Left align demangled stacktrace output. Closes kokkos#6190. * Remove now unused parameter to fix CI. * Fix clang-format for CI. * Print the address first * Fix unused parameter Werror. * Remove bool last parameter from for_each_token. * Make clang-format happy
Closes #6190.