mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add bit for context switch symbols
This commit is contained in:
@ -178,6 +178,8 @@ sysprof_document_symbols_worker (GTask *task,
|
||||
{
|
||||
g_autoptr(SysprofSymbol) symbol = _sysprof_symbol_new (g_ref_string_new_intern (context_switches[cs].name), NULL, NULL, 0, 0);
|
||||
|
||||
symbol->is_context_switch = TRUE;
|
||||
|
||||
/* TODO: It would be nice if we had enough insight from the capture header
|
||||
* as to the host system, so we can show "vmlinuz" and "Linux" respectively
|
||||
* for binary-path and binary-nick when the capture came from Linux.
|
||||
|
||||
@ -37,6 +37,8 @@ struct _SysprofSymbol
|
||||
|
||||
SysprofAddress begin_address;
|
||||
SysprofAddress end_address;
|
||||
|
||||
guint is_context_switch : 1;
|
||||
};
|
||||
|
||||
SysprofSymbol *_sysprof_symbol_new (GRefString *name,
|
||||
@ -58,4 +60,10 @@ _sysprof_symbol_equal (const SysprofSymbol *a,
|
||||
return strcmp (a->name, b->name) == 0;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
_sysprof_symbol_is_context_switch (SysprofSymbol *symbol)
|
||||
{
|
||||
return symbol->is_context_switch;
|
||||
}
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user