mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add helper for native byte order
This commit is contained in:
@ -24,7 +24,8 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
char *_sysprof_document_ref_string (SysprofDocument *self,
|
||||
const char *name);
|
||||
gboolean _sysprof_document_is_native (SysprofDocument *self);
|
||||
char *_sysprof_document_ref_string (SysprofDocument *self,
|
||||
const char *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@ -122,8 +122,8 @@ sysprof_document_init (SysprofDocument *self)
|
||||
|
||||
static gboolean
|
||||
sysprof_document_load (SysprofDocument *self,
|
||||
int capture_fd,
|
||||
GError **error)
|
||||
int capture_fd,
|
||||
GError **error)
|
||||
{
|
||||
goffset pos;
|
||||
gsize len;
|
||||
@ -326,3 +326,11 @@ sysprof_document_symbolize_finish (SysprofDocument *self,
|
||||
|
||||
return g_task_propagate_pointer (G_TASK (result), error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_sysprof_document_is_native (SysprofDocument *self)
|
||||
{
|
||||
g_return_val_if_fail (SYSPROF_IS_DOCUMENT (self), FALSE);
|
||||
|
||||
return self->needs_swap == FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user