mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Cut off first 8 bytes of initial counter id
This ensures that the id won't be screwed by the 32 → 24 bit conversion that happens implicitly when using SysprofCaptureCounter & family of structs. These structs are tightly packed and declare the id field as a 24-bit unsigned, which doesn't necessarily match the counting that is done via SysprofCollector. This is by no means a definitive solution, but this gets things in a more usable state until a better solution is implemented.
This commit is contained in:
@ -424,7 +424,7 @@ sysprof_collector_get (void)
|
||||
#else
|
||||
self->tid = self->pid;
|
||||
#endif
|
||||
self->next_counter_id = ((unsigned)self->pid << 16);
|
||||
self->next_counter_id = (((unsigned)self->pid << 16) >> 8);
|
||||
|
||||
pthread_mutex_lock (&control_fd_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user