mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
writer: clear values before setting counters
We have an annoying issue where we look at all fiends of a counter values chunk in the counter set frame. So we need those values set to zero. If we are passed fewer counter values than can fit in the frame, we leave some of that data uninitialized. This ensures that it is cleared.
This commit is contained in:
@ -1120,6 +1120,8 @@ sp_capture_writer_set_counters (SpCaptureWriter *self,
|
||||
if (!set)
|
||||
return FALSE;
|
||||
|
||||
memset (set, 0, len);
|
||||
|
||||
sp_capture_writer_frame_init (&set->frame,
|
||||
len,
|
||||
cpu,
|
||||
|
||||
Reference in New Issue
Block a user