mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-04-23 14:01:26 +00:00
capture: add task-id (thread-id) to samples
This could let us do some amount of filtering by threads going forward if we have that data available to us.
This commit is contained in:
@ -141,7 +141,7 @@ typedef struct
|
||||
SpCaptureFrame frame;
|
||||
guint32 n_addrs : 16;
|
||||
guint32 padding1 : 16;
|
||||
guint32 padding2;
|
||||
gint32 tid;
|
||||
SpCaptureAddress addrs[0];
|
||||
} SpCaptureSample
|
||||
SP_ALIGNED_END(1);
|
||||
|
||||
@ -648,6 +648,7 @@ sp_capture_writer_add_sample (SpCaptureWriter *self,
|
||||
gint64 time,
|
||||
gint cpu,
|
||||
gint32 pid,
|
||||
gint32 tid,
|
||||
const SpCaptureAddress *addrs,
|
||||
guint n_addrs)
|
||||
{
|
||||
@ -669,6 +670,7 @@ sp_capture_writer_add_sample (SpCaptureWriter *self,
|
||||
time,
|
||||
SP_CAPTURE_FRAME_SAMPLE);
|
||||
ev->n_addrs = n_addrs;
|
||||
ev->tid = tid;
|
||||
|
||||
memcpy (ev->addrs, addrs, (n_addrs * sizeof (SpCaptureAddress)));
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ gboolean sp_capture_writer_add_sample (SpCaptureWriter *
|
||||
gint64 time,
|
||||
gint cpu,
|
||||
gint32 pid,
|
||||
gint32 tid,
|
||||
const SpCaptureAddress *addrs,
|
||||
guint n_addrs);
|
||||
gboolean sp_capture_writer_add_fork (SpCaptureWriter *self,
|
||||
|
||||
Reference in New Issue
Block a user