Thread Names in the UI
When set, thread names are displayed in both the Process Window and the Root Window.
 
Thread names in the Process Window
This program sets these thread names:
pthread_mutex_lock(&name_mutex);
int rc;
if (!first_in)
{
first_in = true;
rc = pthread_setname_np(thread, "Primary");
}
else
rc = pthread_setname_np(thread, "Secondary");
The first thread to enter a function is named “Primary”, and all subsequent threads are called “Secondary.”
Note that the thread names are displayed in:
1. The Thread status bar at the top, which also displays the utid / ktid (“thread user ID” / “thread kernel ID”)
2. The Stack Frame view, if relevant
3. The Threads View tab, again also displaying the utid / ktid.
 
Thread names in the Root Window