Commit Graph

23 Commits

Author SHA1 Message Date
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
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
72be9f240f libsysprof-analyze: add sysprof_document_list_marks() 2023-06-14 16:59:20 -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
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
0529cfb2f0 libsysprof-analyze: add helper to get clock start time 2023-06-12 15:11:42 -07:00
663ae8746a libsysprof-analyze: add list model index for allocation records 2023-06-06 16:45:27 -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
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
5b00127d7d libsysprof-analyze: add API to get only samples
We'll probably want this for allocations too at some point.
2023-05-24 14:30:13 -07:00
8348f7fe2c libsysprof-analyze: start on scaffolding for callgraph API 2023-05-24 13:00:47 -07:00
8f98af9b12 libsysprof-analyze: index and list counters from capture 2023-05-22 15:22:35 -07:00
aab4408f73 libsysprof-analyze: index jitmaps for faster access
We want quick access to these for the jitmap symbolizer, so index them
like we do other important types with GtkBitset to get their frame
positions.
2023-05-22 12:25:55 -07:00
00ecc41209 libsysprof-analyze: make SysprofDocumentSymbols private
This instead moves to a public API on the document to symbolize now
that we've gotten much of the necessary bits private in loading the
document. This commit ensures that we only do loading via the loader
now (and removes the incorrect use from the tests so they too go
through the loader).

We check for NoSymbolizer in document symbols so that we can skip any
decoding. That keeps various use cases fast where you don't want to
waste time on symbolizing if you don't need to look at symbols.

There is plenty more we can do to batch decode symbols with some more
API changes, but that will come after we have kernel/userland decoding
integrated from this library.

We may still want to get all symbols into a single symbol cache, but
given that we have address ranges associated with them, that may not
be very useful beyond the hashtable to pid-specific cache we have now.

If symbols were shared between processes, that'd make more sense, but
we aren't doing that (albeit strings are shared between symbol
instances to reduce that overhead).
2023-05-15 10:56:09 -07:00
3350ad61eb libsysprof-analyze: introduce SysprofDocumentLoader
and thereby make a bunch of the exposed API on SysprofDocument private.
Instead we'll push some of that to the loader but for now the tests can
keep doing what their doing using the private API.

The goal here is to not expose a SysprofDocument pointer until the document
has been loaded and symbolized via the loader API. Then we can lookup
symbols directly from the document w/o intermediary objects.
2023-05-12 15:41:48 -07:00
1003372324 libsysprof-analyze: add listmodel of processes
This is handy to be able to show a list of processes that were contained
within a particular capture file.
2023-05-09 15:57:29 -07:00
e0e1791b2d libsysprof-analyze: make lookup_file synchronous
Now that we have a lot of this indexed, it's fast enough to do on the
calling thread.

# Conflicts:
#	src/libsysprof-analyze/sysprof-document.c
#	src/libsysprof-analyze/sysprof-document.h
2023-05-09 12:36:59 -07:00
938a1bbb4a libsysprof-analyze: add listmodel of embedded files
This also indexes the first position of a file by filename so that we can
skip items in the capture file. Generally, embedded files are a single
frame so that will only be one frame to look at. But even when it is a
few frames, they are generally sequential so this vastly reduces how many
frames we'll need to look at for files.
2023-05-09 12:34:03 -07:00
c18b401ab6 libsysprof-analyze: add listmodel of traceables
It can be handy to iterate through the traceables and we already have a
bitset index for that. Use the new bitset index listmodel to provide that
filtered list externally without having to inflate every object in the
underlying listmodel, as GtkFilterListModel would have to do.
2023-05-08 12:24:26 -07:00
95325cc26f libsysprof-analyze: add API to load embedded file as gbytes 2023-05-03 17:07:47 -07:00
976fb93a83 libsysprof-analyze: start on symbols API via document 2023-05-03 14:21:17 -07:00
ed01673a5e libsysprof-analyzer: rename model to SysprofDocument
This will provide better namespacing for the objects inflated from the
document for various frame types. By creating real objects with real
properties we give ourselves quite a bit of flexibility in the data
filtering language coming forth.
2023-04-25 15:26:06 -07:00