Hi Sergei,
I do not think we can use mysql_thread_create() to automatically name the thread.
Performance schema might be
1) not compiled in , so we can't know the thread names in mysql_thread_create
2) not enabled at runtime, and this is default behavio, we can't know thread names in mysql_thread_create
3) Even if perfschema is compiled in and enabled, we still need to name threads we're not creating ourselves, this happens e.g with Windows' native threadpool, where we do not have or notification about thread creations.
In all these cases, but especially in 2) we want to have thread names, without perfschema overhead.