I'm analyzing a multithreaded application with VTune 2017 Beta, and would find it much easier if the threads displayed with the names assigned to them rather than thread ID's. What's the best way to make this work?
There seem to be two paths to this. The first is to remove the sepdk kernel modules and fallback on 'perf' for collection. This almost works, but produces two occurrences for each thread, one with the correct name and one with the numeric ID, with the the "work" seemingly assigned randomly to one or the other. For example, the thread "gb 003 io 8" (shard 3, io thread number 8) will appear correctly paired with an empty "gb (TID 17844)", but its counterpart "gb 003 io 9" with appear empty with the samples attributed to "gb (TID 17845)". Perf itself shows this correctly, so I think this is just a bug. Is this known? Is there a workaround?
The second approach seems to be to use the Intel Thread Naming API described here: https://software.intel.com/en-us/node/544205. I can get this to compile, and to appear to run, but I haven't been able to see any results from it. Is there a way to confirm that I'm using the API correctly?
Or if I'm reading Peter correctly in this thread https://software.intel.com/en-us/forums/intel-vtune-amplifier-xe/topic/611456, maybe the problem is that the thread name needs to be set after VTune is "listening"? This is a problem, as I'm profiling a long running full-server application that uses thread pools created at startup, and I'm only profiling individual requests. But maybe Vladimir's answer after Peter's is intended explicitly as a workaround to this? https://software.intel.com/en-us/node/544198. But I've tried this, and the names still don't show up.