mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: fix merging of similar processes
We want the "similar process" key to be the argv[0] or something close to it so that we can coalesce across processes with different arguments.
This commit is contained in:
@ -828,6 +828,8 @@ sysprof_document_load_processes (SysprofDocument *self)
|
||||
if (cmdline != NULL)
|
||||
{
|
||||
GRefString *nick = g_ref_string_acquire (process_info->fallback_symbol->binary_nick);
|
||||
g_auto(GStrv) split = g_strsplit (cmdline, " ", 2);
|
||||
const char *shared_name = split[0] ? split[0] : cmdline;
|
||||
|
||||
g_clear_object (&process_info->symbol);
|
||||
process_info->symbol =
|
||||
@ -837,7 +839,7 @@ sysprof_document_load_processes (SysprofDocument *self)
|
||||
|
||||
g_clear_object (&process_info->shared_symbol);
|
||||
process_info->shared_symbol =
|
||||
_sysprof_symbol_new (sysprof_strings_get (self->strings, cmdline),
|
||||
_sysprof_symbol_new (sysprof_strings_get (self->strings, shared_name),
|
||||
NULL, NULL, 0, 0,
|
||||
SYSPROF_SYMBOL_KIND_PROCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user