mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: add API to ignore the idle process (pid 0)
This commit is contained in:
@ -356,6 +356,11 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self,
|
||||
g_assert (SYSPROF_IS_DOCUMENT_TRACEABLE (traceable));
|
||||
|
||||
pid = sysprof_document_frame_get_pid (SYSPROF_DOCUMENT_FRAME (traceable));
|
||||
|
||||
/* Ignore "Process 0" (the Idle process) if requested */
|
||||
if (pid == 0 && (self->flags & SYSPROF_CALLGRAPH_FLAGS_IGNORE_PROCESS_0) != 0)
|
||||
return;
|
||||
|
||||
tid = sysprof_document_traceable_get_thread_id (traceable);
|
||||
stack_depth = sysprof_document_traceable_get_stack_depth (traceable);
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ typedef enum _SysprofCallgraphFlags
|
||||
SYSPROF_CALLGRAPH_FLAGS_HIDE_SYSTEM_LIBRARIES = 1 << 2,
|
||||
SYSPROF_CALLGRAPH_FLAGS_BOTTOM_UP = 1 << 3,
|
||||
SYSPROF_CALLGRAPH_FLAGS_CATEGORIZE_FRAMES = 1 << 4,
|
||||
SYSPROF_CALLGRAPH_FLAGS_IGNORE_PROCESS_0 = 1 << 5,
|
||||
} SysprofCallgraphFlags;
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
|
||||
Reference in New Issue
Block a user