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

Save mangled kernel names and demangle only on demand #69

Open
lfmeadow opened this issue Jan 20, 2022 · 0 comments
Open

Save mangled kernel names and demangle only on demand #69

lfmeadow opened this issue Jan 20, 2022 · 0 comments

Comments

@lfmeadow
Copy link

lfmeadow commented Jan 20, 2022

It is very useful to have the mangled names when performing tasks like searching binaries for kernel assembly code. It may be possible to do this with c++filt on the assembly code, but it is much easier to user the mangled name.

I use the following patch:

diff --git a/test/tool/tracer_tool.cpp b/test/tool/tracer_tool.cpp
index d111d60..478e6b0 100644
--- a/test/tool/tracer_tool.cpp
+++ b/test/tool/tracer_tool.cpp
@@ -522,8 +522,8 @@ void hip_api_flush_cb(hip_api_trace_entry_t* entry) {
       const char* str = hipApiString((hip_api_id_t)cid, data);
       rec_ss << " " << str;
       if (is_hip_kernel_launch_api(cid) && entry->name) {
-        const char* kernel_name = cxx_demangle(entry->name);
-        rec_ss << " kernel=" << kernel_name;
+        //const char* kernel_name = cxx_demangle(entry->name);
+        rec_ss << " kernel=" << entry->name;
       }
       rec_ss<< " :" << correlation_id;
       fprintf(hip_api_file_handle, "%s\n", rec_ss.str().c_str());

I did not attempt to add code to the various csv writers to demangle; it should be easy.
It is possilble that a similar patch is needed to rocprof, I haven't gotten that far.

Thanks for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant