libsysprof-capture: add log frame type

This is useful to interleave logs with the capture so that we can have
correlation without interjecting them into mark fields.
This commit is contained in:
Christian Hergert
2019-05-25 19:03:48 -07:00
parent d77c305779
commit cc415c9140
9 changed files with 213 additions and 0 deletions

View File

@ -108,6 +108,21 @@ main (gint argc,
break;
}
case SYSPROF_CAPTURE_FRAME_LOG:
{
const SysprofCaptureLog *log = sysprof_capture_reader_read_log (reader);
gdouble ptime = (log->frame.time - begin_time) / (gdouble)NSEC_PER_SEC;
g_print ("LOG: pid=%d time=%"G_GINT64_FORMAT" (%lf)\n"
" severity = %d\n"
" domain = %s\n"
" message = %s\n",
log->frame.pid, log->frame.time, ptime,
log->severity, log->domain, log->message);
break;
}
case SYSPROF_CAPTURE_FRAME_MAP:
{
const SysprofCaptureMap *map = sysprof_capture_reader_read_map (reader);