I’ve seen slightly different issues with Thread.setNativeName in profiles, but 
thread names in logs + JFR are very helpful and I wouldn’t want to lose those. 
AFAIK, the JDK doesn't currently offer a way to set a java.lang.Thread name 
without updating the platform thread name.

Evan - are you able to use a version of libc with debug symbols, so the 
“Unknown Function” calls in your profile can be resolved? I’m assuming they’re 
the copying + re-encoding steps here[1].

[1]: 
https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/os_linux.cpp#L4823-L4827

We could potentially improve this by interning the current thread name in 
SEPWorker, and only renaming when we need to change. Then we’d have a reference 
comparison instead of a syscall, at least some of the time.

Reply via email to