libsysprof-capture: Set initial counter id to pid

This avoids collisions when using Sysprof collector in multiprocess
apps that share the same controlfd, such as WebKit.
This commit is contained in:
Georges Basile Stavracas Neto
2024-11-14 10:03:46 +01:00
parent f41263c23a
commit d305812932

View File

@ -424,7 +424,7 @@ sysprof_collector_get (void)
#else
self->tid = self->pid;
#endif
self->next_counter_id = 1;
self->next_counter_id = (self->pid << 16);
pthread_mutex_lock (&control_fd_lock);