libsysprof-capture: shorten names by removing Frame

This commit is contained in:
Christian Hergert
2019-05-22 16:36:30 -07:00
parent 684aa1aba6
commit 567f8a3a0f
13 changed files with 35 additions and 35 deletions

View File

@ -105,7 +105,7 @@ sysprof_capture_condition_match (const SysprofCaptureCondition *self,
case SYSPROF_CAPTURE_CONDITION_WHERE_COUNTER_IN:
if (frame->type == SYSPROF_CAPTURE_FRAME_CTRSET)
{
const SysprofCaptureFrameCounterSet *set = (SysprofCaptureFrameCounterSet *)frame;
const SysprofCaptureCounterSet *set = (SysprofCaptureCounterSet *)frame;
for (guint i = 0; i < self->u.where_counter_in->len; i++)
{
@ -127,7 +127,7 @@ sysprof_capture_condition_match (const SysprofCaptureCondition *self,
}
else if (frame->type == SYSPROF_CAPTURE_FRAME_CTRDEF)
{
const SysprofCaptureFrameCounterDefine *def = (SysprofCaptureFrameCounterDefine *)frame;
const SysprofCaptureCounterDefine *def = (SysprofCaptureCounterDefine *)frame;
for (guint i = 0; i < self->u.where_counter_in->len; i++)
{

View File

@ -721,10 +721,10 @@ sysprof_capture_reader_read_sample (SysprofCaptureReader *self)
return sample;
}
const SysprofCaptureFrameCounterDefine *
const SysprofCaptureCounterDefine *
sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self)
{
SysprofCaptureFrameCounterDefine *def;
SysprofCaptureCounterDefine *def;
g_assert (self != NULL);
g_assert ((self->pos % SYSPROF_CAPTURE_ALIGN) == 0);
@ -733,7 +733,7 @@ sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self)
if (!sysprof_capture_reader_ensure_space_for (self, sizeof *def))
return NULL;
def = (SysprofCaptureFrameCounterDefine *)(gpointer)&self->buf[self->pos];
def = (SysprofCaptureCounterDefine *)(gpointer)&self->buf[self->pos];
if (def->frame.type != SYSPROF_CAPTURE_FRAME_CTRDEF)
return NULL;
@ -744,13 +744,13 @@ sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self)
if (G_UNLIKELY (self->endian != G_BYTE_ORDER))
def->n_counters = GUINT16_SWAP_LE_BE (def->n_counters);
if (def->frame.len < (sizeof *def + (sizeof (SysprofCaptureFrameCounterDefine) * def->n_counters)))
if (def->frame.len < (sizeof *def + (sizeof (SysprofCaptureCounterDefine) * def->n_counters)))
return NULL;
if (!sysprof_capture_reader_ensure_space_for (self, def->frame.len))
return NULL;
def = (SysprofCaptureFrameCounterDefine *)(gpointer)&self->buf[self->pos];
def = (SysprofCaptureCounterDefine *)(gpointer)&self->buf[self->pos];
if (G_UNLIKELY (self->endian != G_BYTE_ORDER))
{
@ -768,10 +768,10 @@ sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self)
return def;
}
const SysprofCaptureFrameCounterSet *
const SysprofCaptureCounterSet *
sysprof_capture_reader_read_counter_set (SysprofCaptureReader *self)
{
SysprofCaptureFrameCounterSet *set;
SysprofCaptureCounterSet *set;
g_assert (self != NULL);
g_assert ((self->pos % SYSPROF_CAPTURE_ALIGN) == 0);
@ -780,7 +780,7 @@ sysprof_capture_reader_read_counter_set (SysprofCaptureReader *self)
if (!sysprof_capture_reader_ensure_space_for (self, sizeof *set))
return NULL;
set = (SysprofCaptureFrameCounterSet *)(gpointer)&self->buf[self->pos];
set = (SysprofCaptureCounterSet *)(gpointer)&self->buf[self->pos];
if (set->frame.type != SYSPROF_CAPTURE_FRAME_CTRSET)
return NULL;
@ -797,7 +797,7 @@ sysprof_capture_reader_read_counter_set (SysprofCaptureReader *self)
if (!sysprof_capture_reader_ensure_space_for (self, set->frame.len))
return NULL;
set = (SysprofCaptureFrameCounterSet *)(gpointer)&self->buf[self->pos];
set = (SysprofCaptureCounterSet *)(gpointer)&self->buf[self->pos];
if (G_UNLIKELY (self->endian != G_BYTE_ORDER))
{

View File

@ -74,9 +74,9 @@ const SysprofCaptureSample *sysprof_capture_reader_read_sample
SYSPROF_AVAILABLE_IN_ALL
GHashTable *sysprof_capture_reader_read_jitmap (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL
const SysprofCaptureFrameCounterDefine *sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self);
const SysprofCaptureCounterDefine *sysprof_capture_reader_read_counter_define (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL
const SysprofCaptureFrameCounterSet *sysprof_capture_reader_read_counter_set (SysprofCaptureReader *self);
const SysprofCaptureCounterSet *sysprof_capture_reader_read_counter_set (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL
gboolean sysprof_capture_reader_reset (SysprofCaptureReader *self);
SYSPROF_AVAILABLE_IN_ALL

View File

@ -202,7 +202,7 @@ typedef struct
guint32 padding1 : 16;
guint32 padding2;
SysprofCaptureCounter counters[0];
} SysprofCaptureFrameCounterDefine
} SysprofCaptureCounterDefine
SYSPROF_ALIGNED_END(1);
SYSPROF_ALIGNED_BEGIN(1)
@ -226,7 +226,7 @@ typedef struct
guint32 padding1 : 16;
guint32 padding2;
SysprofCaptureCounterValues values[0];
} SysprofCaptureFrameCounterSet
} SysprofCaptureCounterSet
SYSPROF_ALIGNED_END(1);
SYSPROF_ALIGNED_BEGIN(1)
@ -260,8 +260,8 @@ G_STATIC_ASSERT (sizeof (SysprofCaptureExit) == 24);
G_STATIC_ASSERT (sizeof (SysprofCaptureTimestamp) == 24);
G_STATIC_ASSERT (sizeof (SysprofCaptureCounter) == 128);
G_STATIC_ASSERT (sizeof (SysprofCaptureCounterValues) == 96);
G_STATIC_ASSERT (sizeof (SysprofCaptureFrameCounterDefine) == 32);
G_STATIC_ASSERT (sizeof (SysprofCaptureFrameCounterSet) == 32);
G_STATIC_ASSERT (sizeof (SysprofCaptureCounterDefine) == 32);
G_STATIC_ASSERT (sizeof (SysprofCaptureCounterSet) == 32);
G_STATIC_ASSERT (sizeof (SysprofCaptureMark) == 96);
G_STATIC_ASSERT (sizeof (SysprofCaptureMetadata) == 64);

View File

@ -308,7 +308,7 @@ sysprof_capture_writer_cat (SysprofCaptureWriter *self,
case SYSPROF_CAPTURE_FRAME_CTRDEF:
{
const SysprofCaptureFrameCounterDefine *frame;
const SysprofCaptureCounterDefine *frame;
if (!(frame = sysprof_capture_reader_read_counter_define (reader)))
goto panic;
@ -344,7 +344,7 @@ sysprof_capture_writer_cat (SysprofCaptureWriter *self,
case SYSPROF_CAPTURE_FRAME_CTRSET:
{
const SysprofCaptureFrameCounterSet *frame;
const SysprofCaptureCounterSet *frame;
if (!(frame = sysprof_capture_reader_read_counter_set (reader)))
goto panic;

View File

@ -1111,7 +1111,7 @@ sysprof_capture_writer_define_counters (SysprofCaptureWriter *self,
const SysprofCaptureCounter *counters,
guint n_counters)
{
SysprofCaptureFrameCounterDefine *def;
SysprofCaptureCounterDefine *def;
gsize len;
guint i;
@ -1123,7 +1123,7 @@ sysprof_capture_writer_define_counters (SysprofCaptureWriter *self,
len = sizeof *def + (sizeof *counters * n_counters);
def = (SysprofCaptureFrameCounterDefine *)sysprof_capture_writer_allocate (self, &len);
def = (SysprofCaptureCounterDefine *)sysprof_capture_writer_allocate (self, &len);
if (!def)
return FALSE;
@ -1162,7 +1162,7 @@ sysprof_capture_writer_set_counters (SysprofCaptureWriter *self,
const SysprofCaptureCounterValue *values,
guint n_counters)
{
SysprofCaptureFrameCounterSet *set;
SysprofCaptureCounterSet *set;
gsize len;
guint n_groups;
guint group;
@ -1183,7 +1183,7 @@ sysprof_capture_writer_set_counters (SysprofCaptureWriter *self,
len = sizeof *set + (n_groups * sizeof (SysprofCaptureCounterValues));
set = (SysprofCaptureFrameCounterSet *)sysprof_capture_writer_allocate (self, &len);
set = (SysprofCaptureCounterSet *)sysprof_capture_writer_allocate (self, &len);
if (!set)
return FALSE;