mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
capture: add simple mark support
The goal here is to have an API that allows us to record things like frame timing data. We might iterate on this API a bit, but this gets us started. A SpCaptureMark with a zero duration should be treated like an epoch mark once a visualizer is created. SpCaptureMark with a non-zero duration should be treated like a begin/end of operation. This may be useful in generating something like a flame graph.
This commit is contained in:
@ -115,6 +115,20 @@ main (gint argc,
|
||||
break;
|
||||
}
|
||||
|
||||
case SP_CAPTURE_FRAME_MARK:
|
||||
{
|
||||
const SpCaptureMark *mark = sp_capture_reader_read_mark (reader);
|
||||
|
||||
g_print ("MARK: pid=%d time=%"G_GINT64_FORMAT"\n"
|
||||
" name = %s\n"
|
||||
" duration = %"G_GUINT64_FORMAT"\n"
|
||||
" message = %s\n",
|
||||
mark->frame.pid, mark->frame.time,
|
||||
mark->name, mark->duration, mark->message);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SP_CAPTURE_FRAME_PROCESS:
|
||||
{
|
||||
const SpCaptureProcess *pr = sp_capture_reader_read_process (reader);
|
||||
|
||||
Reference in New Issue
Block a user