mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 07:00:53 +00:00
libsysprof-analyze: add helper to get clock start time
This commit is contained in:
@ -1286,3 +1286,19 @@ _sysprof_document_kernel_symbol (SysprofDocument *self)
|
|||||||
|
|
||||||
return self->symbols->context_switches[SYSPROF_ADDRESS_CONTEXT_KERNEL];
|
return self->symbols->context_switches[SYSPROF_ADDRESS_CONTEXT_KERNEL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sysprof_document_get_clock_at_start:
|
||||||
|
* @self: a #SysprofDocument
|
||||||
|
*
|
||||||
|
* Gets the clock time when the recording started.
|
||||||
|
*
|
||||||
|
* Returns: the clock time, generally of `CLOCK_MONOTONIC`
|
||||||
|
*/
|
||||||
|
gint64
|
||||||
|
sysprof_document_get_clock_at_start (SysprofDocument *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), 0);
|
||||||
|
|
||||||
|
return self->header.time;
|
||||||
|
}
|
||||||
|
|||||||
@ -36,6 +36,8 @@ G_BEGIN_DECLS
|
|||||||
SYSPROF_AVAILABLE_IN_ALL
|
SYSPROF_AVAILABLE_IN_ALL
|
||||||
G_DECLARE_FINAL_TYPE (SysprofDocument, sysprof_document, SYSPROF, DOCUMENT, GObject)
|
G_DECLARE_FINAL_TYPE (SysprofDocument, sysprof_document, SYSPROF, DOCUMENT, GObject)
|
||||||
|
|
||||||
|
SYSPROF_AVAILABLE_IN_ALL
|
||||||
|
gint64 sysprof_document_get_clock_at_start (SysprofDocument *self);
|
||||||
SYSPROF_AVAILABLE_IN_ALL
|
SYSPROF_AVAILABLE_IN_ALL
|
||||||
SysprofDocumentFile *sysprof_document_lookup_file (SysprofDocument *self,
|
SysprofDocumentFile *sysprof_document_lookup_file (SysprofDocument *self,
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|||||||
Reference in New Issue
Block a user