capture: use gint32 instead of GPid

GPid just isn't portable as a data type for on-disk storage, so
be more explicit and use gint32 directly.
This commit is contained in:
Christian Hergert
2019-05-06 20:03:33 -07:00
parent 191754e505
commit 607ef387e7
4 changed files with 29 additions and 29 deletions

View File

@ -106,7 +106,7 @@ static inline void
sp_capture_writer_frame_init (SpCaptureFrame *frame_,
gint len,
gint cpu,
GPid pid,
gint32 pid,
gint64 time_,
SpCaptureFrameType type)
{
@ -256,7 +256,7 @@ sp_capture_writer_flush_jitmap (SpCaptureWriter *self)
sp_capture_writer_frame_init (&jitmap.frame,
len,
-1,
getpid (),
_sp_getpid (),
SP_CAPTURE_CURRENT_TIME,
SP_CAPTURE_FRAME_JITMAP);
jitmap.n_jitmaps = self->addr_hash_size;
@ -497,7 +497,7 @@ gboolean
sp_capture_writer_add_map (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
guint64 start,
guint64 end,
guint64 offset,
@ -542,7 +542,7 @@ gboolean
sp_capture_writer_add_mark (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
guint64 duration,
const gchar *group,
const gchar *name,
@ -604,7 +604,7 @@ gboolean
sp_capture_writer_add_process (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
const gchar *cmdline)
{
SpCaptureProcess *ev;
@ -641,7 +641,7 @@ gboolean
sp_capture_writer_add_sample (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
const SpCaptureAddress *addrs,
guint n_addrs)
{
@ -675,8 +675,8 @@ gboolean
sp_capture_writer_add_fork (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
GPid child_pid)
gint32 pid,
gint32 child_pid)
{
SpCaptureFork *ev;
gsize len = sizeof *ev;
@ -704,7 +704,7 @@ gboolean
sp_capture_writer_add_exit (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid)
gint32 pid)
{
SpCaptureExit *ev;
gsize len = sizeof *ev;
@ -731,7 +731,7 @@ gboolean
sp_capture_writer_add_timestamp (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid)
gint32 pid)
{
SpCaptureTimestamp *ev;
gsize len = sizeof *ev;
@ -1051,7 +1051,7 @@ gboolean
sp_capture_writer_define_counters (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
const SpCaptureCounter *counters,
guint n_counters)
{
@ -1101,7 +1101,7 @@ gboolean
sp_capture_writer_set_counters (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
gint32 pid,
const guint *counters_ids,
const SpCaptureCounterValue *values,
guint n_counters)