Commit Graph

29 Commits

Author SHA1 Message Date
c0a7a94d52 libsysprof-analyze: add flag to ignore system libraries 2023-07-06 12:13:23 -07:00
36aa121607 libsysprof-analyze: helper to list traceables by string search
This will let you take a callgraph and create a new GListModel containing
the original traceables but filtered with something like "_sysprof_*" to
get all traceables containing functions starting with "_sysprof_".
2023-07-05 16:53:44 -07:00
5b929b8d5d libsysprof-analyze: add callgraph flags for thread-ids
This allows you to set a flag to show the thread id of what was recorded.

Use this to help disassociate similar threads in a process to figure out
which thread is consuming a majority of the Total time of that process.
2023-06-14 15:11:56 -07:00
2a65bf30af 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.
2023-06-14 12:08:23 -07:00
6ab28ff641 libsysprof-analyze: make summary augmentation optional
That way the descendant graphs can generate the self values but ignore the
summary augmentation (as that would mess up the generated values).

This fixes it so that showing the descendants tree keeps proper Total
and Self values.
2023-06-13 10:31:42 -07:00
662cc65bb9 libsysprof-analyze: clean up descendant node tree on finalize 2023-06-13 10:30:25 -07:00
8af3cd896a libsysprof-analyze: add descendants generation
We still have some work to do here so it doesn't mess up the summary
augmentation, but this is a start on re-generating the callgraphs for a
specific symbol.
2023-06-12 22:59:11 -07:00
90fdd7f842 libsysprof-analyze: use symbol hash for better coalescing
We want to increase how much the symbols get coalesced across processes
so long as they are reasonably the same symbol.
2023-06-12 17:22:17 -07:00
f701e028b4 libsysprof-analyze: add some flags for internal state
This can help us to avoid various work items when processing symbols.
2023-06-12 14:15:08 -07:00
c8c307cb96 libsysprof-analyze: rename ctor for node
That way we can have an alternate way of creating these that does not
require using a SysprofCallgraphNode.
2023-06-12 12:12:53 -07:00
fbe0b99314 libsysprof-analyze: use symbol to get callers list
That keeps the API clear of the indirection Frame object so we can use it
elsewhere like in the functions column view to select callees.
2023-06-12 11:35:01 -07:00
b873ee1f37 libsysprof-analyze: cleanup symbols array in finalize 2023-06-12 11:34:22 -07:00
2c9c41dedc libsysprof-analyze: allow specifying ptr array for symbols
This will allow us to use the same model with a different list of symbols.
2023-06-12 11:34:04 -07:00
643aa374cb libsysprof-analyze: add GListModel of callgraph symbols
This has an indirect object (SysprofCallgraphSymbol) so that we can provide
plumbing to get the callgraph as well as the augmented data from the
indirection object.

This allows for callgraphs to show overview in the functions list which
contains the same augmentation that the descendants view does.
2023-06-12 11:15:50 -07:00
d2a38bf1a6 libsysprof-analyze: introduce [Unwindable] callgraph node
This interjects a node for unwindable traces so that cost gets accounted
to the process, but is not just at the [process] graph item as that makes
it very hard to subtract to figure out what it was.

Instead just insert an [Unwindable] node and cost-account to that.
2023-06-09 15:58:57 -07:00
3f34c4625b libsysprof-analyze: cleanup walking to root 2023-06-09 15:57:52 -07:00
2511e79cae libsysprof-analyze: allow getting root augments with NULL 2023-06-09 15:57:34 -07:00
814c25d45a libsysprof-analyze: add summary augmentation capabilities
This allows us to have augmentation at the summary level so that things
like the weighted callgraph or memprof callgraph can add their respective
summary data up the chain of function calls.
2023-06-09 11:19:40 -07:00
900c39c0d8 libsysprof-analyze: use summary struct for symbol information
We still need to figure out the right way to plumb in the augmentation data
so that things that need to walk up the chain are possible, but this first
gets things in order to do that.
2023-06-09 10:50:39 -07:00
2c46d6a4c1 libsysprof-analyze: add listmodel of stacktraces containing symbol 2023-06-08 14:22:18 -07:00
6fc1049e63 libsysprof-analyze: don't duplicate callers 2023-06-06 17:33:42 -07:00
275869b198 libsysprof-analyze: implement basic callers listing
This doesn't give us augmentation data like we would have from the
existing callgraphs, but we can deal with that later.
2023-06-06 17:30:13 -07:00
44e9da2692 callgraph: be more graceful with unwind failures 2023-06-06 16:44:50 -07:00
8353b1eb9c libsysprof-analyze: account kernel stacks to the kernel
If our entire stack was in kernel address context, inject the
"- - Kernel - -" symbol at the top of the stack trace so that accounting
gets properly assigned to the kernel. This is typical with kernel processes
such as kworker.
2023-05-25 11:16:08 -07:00
6f90a552e7 libsysprof-analyze: include final address context
We may need to know the final address context so we can inject symbols as
necessary into the top of the callgraph. We know it when generating the
symbols, so just yield it to the caller too.
2023-05-25 11:15:07 -07:00
f79a3c6d2e libsysprof-context: skip context switches at head of trace
We can get stack traces which have a USER at the end, or KERNEL at the
end, and nothing after it. Not really useful to us.
2023-05-25 11:13:10 -07:00
7f192958ae libsysprof-analyze: free callgraph node tree on finalize 2023-05-24 17:29:32 -07:00
3ae108464d libsysprof-analyze: implement augmented callgraph
This creates a SysprofCallgraph object which is a GListModel of
SysprofCallgraphFrame. The SysprofCallgraphFrame is also a GListModel of
SysprofCallgraphFrame so that we can map this all into a GtkListView in
the future for tree-like visibility.

The augmentation allows for the same callgraph code to be used for multiple
scenarios such as CPU sampling as well as memory allocation tracking.

If your augmentation size is <=sizeof(void*) then you do not occur an extra
allocation and you can use the inline augmentation space.

The test-callgraph clearly shows that we still need to do the shuffling
of -- Kernel -- and -- User -- like the old callgraph code did. But that
will come soon enough.
2023-05-24 17:11:30 -07:00
8348f7fe2c libsysprof-analyze: start on scaffolding for callgraph API 2023-05-24 13:00:47 -07:00