capture: add frame type for defining and setting counters

We might want to add a CTRADD type later on, for relative values rather
than absolute. But this should get us started.

Simply define counters upfront, and then set them during the capture
process.

Obviously, we need to come up with a good way to visualize this
information in the UI.
This commit is contained in:
Christian Hergert
2016-04-14 18:29:39 -07:00
parent 9ba08c8d93
commit c87a90cd9a
6 changed files with 392 additions and 26 deletions

View File

@ -81,6 +81,19 @@ gboolean sp_capture_writer_add_timestamp (SpCaptureWriter *
gint64 time,
gint cpu,
GPid pid);
gboolean sp_capture_writer_define_counters (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
const SpCaptureCounter *counters,
guint n_counters);
gboolean sp_capture_writer_set_counters (SpCaptureWriter *self,
gint64 time,
gint cpu,
GPid pid,
const guint *counters_ids,
const gint64 *values,
guint n_counters);
gboolean sp_capture_writer_flush (SpCaptureWriter *self);
gboolean sp_capture_writer_save_as (SpCaptureWriter *self,
const gchar *filename,