mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-analyze: add symbol kind property for symbols
Additionally, add the pid as the binary nick for processes so that we can show them in the callgraph with the process name.
This commit is contained in:
@ -33,17 +33,22 @@ sysprof_process_info_new (SysprofMountNamespace *mount_namespace,
|
||||
int pid)
|
||||
{
|
||||
SysprofProcessInfo *self;
|
||||
char pidstr[32];
|
||||
char symname[32];
|
||||
|
||||
g_snprintf (symname, sizeof symname, "[Process %d]", pid);
|
||||
g_snprintf (symname, sizeof symname, "Process %d", pid);
|
||||
g_snprintf (pidstr, sizeof pidstr, "(%d)", pid);
|
||||
|
||||
self = g_atomic_rc_box_new0 (SysprofProcessInfo);
|
||||
self->pid = pid;
|
||||
self->address_layout = sysprof_address_layout_new ();
|
||||
self->symbol_cache = sysprof_symbol_cache_new ();
|
||||
self->mount_namespace = mount_namespace;
|
||||
self->fallback_symbol = _sysprof_symbol_new (g_ref_string_new (symname), NULL, NULL, 0, 0);
|
||||
self->fallback_symbol->is_process = TRUE;
|
||||
self->fallback_symbol = _sysprof_symbol_new (g_ref_string_new (symname),
|
||||
NULL,
|
||||
g_ref_string_new (pidstr),
|
||||
0, 0,
|
||||
SYSPROF_SYMBOL_KIND_PROCESS);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user