Commit Graph

316 Commits

Author SHA1 Message Date
b40be19530 libsysprof-analyze: add test for symbol collision 2023-06-20 14:24:02 -07:00
07d08597ba libsysprof-analyze: handle collision in symbol cache
If we have two nodes that collide for address space, we need to keep the
one we already have in the symbol cache. The other node cannot be cached
and will be dropped instead.

This fixes a leak when collisions occur.
2023-06-20 14:23:46 -07:00
1aafb143fd libsysprof-analyze: clear stream on finalize 2023-06-20 14:22:51 -07:00
5787809f95 libsysprof-analyze: add simple strings test for asan
This just helps track down if there are any leaks via asan.
2023-06-20 13:49:49 -07:00
7595c611d7 libsysprof-analyze: remove unused function
No need for the "peek" variant, so just remove it.
2023-06-20 13:39:09 -07:00
c2a8b04cf7 libsysprof-analyze: ignore inf/-inf values in xy series 2023-06-20 11:49:34 -07:00
d0d19cff39 libsysprof-analyze: use doubles for reference data
We only want to move to float for the internal 0..1 positions which are
used to draw to the screen (to reduce how much data we hold on to). But for
the data we need to calculate those 0..1 positions, we want better
precision for large numbers. Use double for all of those.
2023-06-20 11:49:22 -07:00
72d489f786 libsysprof-analyze: use weak backpointers for child listmodel 2023-06-20 11:26:10 -07:00
ab5c0c2bf7 libsysprof-analyze: don't leak subvolume mount option 2023-06-20 11:19:01 -07:00
3dfd5c0550 libsysprof-analyze: make error message better 2023-06-20 11:03:56 -07:00
29c72cf202 libsysprof-analyze: cleanup tid->symbol hashtable 2023-06-20 11:03:43 -07:00
4d86d8641a libsysprof-analyze: cleanup kernel symbols 2023-06-20 11:03:31 -07:00
43ec0e48f5 libsysprof-gtk: start on some loading progress 2023-06-19 19:00:22 -07:00
7f13f0e327 libsysprof-analyze: ignore end time from syscap header
We are already walking through all the frames so we can guess this better
than what is in the capture file. This helps ensure that loading older
captures still has the end clamped to the last event we'll see.
2023-06-16 17:08:21 -07:00
4e5e6be841 libsysprof-analyze: add API to read back the min/max ranges 2023-06-16 16:58:46 -07:00
06767c0a1d libsysprof-analyze: add an XY series strucuture
This is meant to contain information about XY coordinates that we can
store in a normalized form. That allows them to be reused across different
scales without regenerating them.

It also includes a back-pointer to the model index so that we can pull out
the real object when necessary for drawing.
2023-06-16 16:16:44 -07:00
10b2ecd299 libsysprof-analyze: remove pre-calculated time offsets
These are rather annoying because we want to avoid inflating the objects
in most cases anyway.
2023-06-16 13:10:41 -07:00
d752e2eec2 libsysprof-analyze: add SysprofTimeSeries
This includes a helper to generate timeseries items such as marks which
have a point in time and optionally a duration.

The TimeSpan has also been beefed up to gain a few operations that are
useful for implementing that.
2023-06-16 13:07:40 -07:00
1a94b60fbf libsysprof-analyze: only extend timespan for data types 2023-06-15 16:51:08 -07:00
d4da036f73 libsysprof-analyze: move timespan to analyze library
That way we can use it for the document itself, and have it update the
timespan of the recording in case it didn't get updated due to ctrl+c or
something prematurely stopping.
2023-06-15 16:43:17 -07:00
6dcb5e5fdd libsysprof-analyze: include time as fractions for marks
This allows more easily calculating the horizontal position of marks and
their duration from charts.
2023-06-15 16:14:32 -07:00
b572b7426e libsysprof-analyze: pre-sort marks from hashtable 2023-06-15 13:27:27 -07:00
1455876835 libsysprof-analyze: make mark catalog work with sections
This allows us more flexibility with creating sections usin the flatten
list model as the rows need to contain the data for the headers.
2023-06-15 13:19:18 -07:00
1a806d3106 libsysprof-analyze: ignore empty message rows 2023-06-15 12:39:21 -07:00
9a762fa1d4 libsysprof-analyze: add mark catalog kind
We can use this to separate catalogs for names vs groups when building
tree models of them.
2023-06-15 11:52:15 -07:00
8b4ab761ab libsysprof-analyze: add mark information during index pass 2023-06-15 11:44:36 -07:00
80dac7c0cd libsysprof-analyze: create mark catalogs from hashtable
We still need to insert these when parsing the mmap'd capture on the
first pass of data.
2023-06-15 10:35:16 -07:00
51ce85b399 libsysprof-analyze: add scaffolding for listing marks by name/group 2023-06-15 09:36:18 -07:00
231535a396 libsysprof-analyze: add SysprofMarkCatalog
This will get used to group marks together by group->name->marks from
the SysprofDocument.
2023-06-14 22:22:34 -07:00
72be9f240f libsysprof-analyze: add sysprof_document_list_marks() 2023-06-14 16:59:20 -07:00
d51d7c4773 libsysprof-analyze: add rsvg/gdk_pixbuf to modules 2023-06-14 15:38:48 -07:00
b6589e67cf libsysprof-analyze: include threads in filtered descendants view 2023-06-14 15:26:56 -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
e63c0b7c2e libsysprof-analyze: fix descendants of process symbols 2023-06-14 14:25:01 -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
ef11121ff6 libsysprof-analyze: mark fallback symbol is_process 2023-06-12 23:01:22 -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
465b0e1613 libsysprof-analyze: add sysprof_symbol_hash() for hash tables 2023-06-12 17:21:41 -07:00
a3df31c246 libsysprof-analyze: include binary path basename in hash
This helps improve the chances that we get a match on "libfoo.so" and the
symbol name within it.
2023-06-12 17:21:28 -07:00
ddfa3f57ab libsysprof-analyze: add sysprof_document_list_symbols_in_traceable()
This function will list the symbols in a traceable in a way that is
suitable for showing in a GtkListView or GtkColumnView. For example, that
requires creating copies of the symbols so that duplicates do not cause
hickups with GtkListItemManager.
2023-06-12 16:41:30 -07:00
63b42c2319 libsysprof-analyze: track relative offset for frame
This is handy so that we don't have to keep multiple objects around to
handle this request. Otherwise we'd need to keep references to the
document and that is a bit annoying.

This of course has a limit of about an hour (in tv_nsec), but that is
far longer than we can realistically record anyway.
2023-06-12 15:41:29 -07:00
0529cfb2f0 libsysprof-analyze: add helper to get clock start time 2023-06-12 15:11:42 -07:00
fc9bb894a1 libsysprof-analyze: list traceables containing a callgraph frame
This uses the intersection of all the bitset from the frame to the root to
first reduce the number of traceables to look at. Once we have the
intersection, we check the traceables for prefix and yield another list
model using that bitset index on the same traceables list model.

This can be used to show a supplimental list of all the traceables for a
callgraph up to certain node.
2023-06-12 14:54:04 -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