Commit Graph

364 Commits

Author SHA1 Message Date
7720f690e0 libsysprof-analyze: add bitset index
This is meant to be a simple index helper where we already have a bitset
created for a low-cardinality index. We can reuse the read-only bitset
and filter on the document itself.

This index will keep a reference on the document so it's lifetime persists.
2023-05-08 12:23:14 -07:00
f5a97fa945 libsysprof-analyze: ignore zero length data 2023-05-05 16:35:53 -07:00
e6ff4e838c libsysprof-analyze: print info about file chunks 2023-05-05 16:35:16 -07:00
634a32bdfa libsysprof-analyze: allow zero length embedded files 2023-05-05 16:35:10 -07:00
83a61dd9ef libsysprof-analyze: simplify sysprof_document_lookup_file_async()
Instead of walking the listmodel for every object which might be a file
chunk, and treating it as possibly non-native-endianness, this uses the
new index of file chunks and accesses their frame as an object. That
object will do endianness conversions for us.

The extra overhead of creating the GObject is lessened by avoiding looking
at many of the frames in the model.
2023-05-05 13:38:57 -07:00
e763cc14bb libsysprof-analyze: index locations of file chunks
Create a roaring bitmap of list model positions that contain file chunks.
We can use this in the future to avoid iterating the whole listmodel for
matching file chunks to just the index positions containing file chunks.
2023-05-05 13:37:03 -07:00
235dd98621 libsysprof-analyze: add SysprofDocumentFileChunk
This object will represent frames in the list model which are file chunks.
2023-05-05 13:34:53 -07:00
1c75c4c548 libsysprof-analyze: rename samples to traceables
This includes all current traceables, not just samples, so make the name
a bit more clear which it is.
2023-05-05 13:03:03 -07:00
ee957ed1d4 libsysprof-analyze: start on mount namespace APIs
The goal here is that we can try to reproduce to some degree the mount
namespace as the PID saw it, but also convert that to paths where we can
find the files on the host system.
2023-05-05 12:44:31 -07:00
17eaa7a610 libsysprof-analyze: add various docs
These functions have some transfer semantics, so even though they are
private API, make sure that we document it for the future.
2023-05-04 14:32:33 -07:00
89fb7329a8 libsysprof-analyze: add memory map and builder objects
The goal here is to have a memory map for each of our processes so that we
can translate a memory address into an offset within a file.

We will then use an upcoming SysprofMountNamespace as a view into a process
file system layout to convert the mapped filename into something we can
access from the current process (be it on the host, or via flatpak, etc).
2023-05-04 14:30:02 -07:00
16d03ed630 libsysprof-analyze: add object to represent a mapped file 2023-05-04 13:58:20 -07:00
377e8e26c6 libsysprof-analyze: print some basic info for debugging 2023-05-04 10:14:43 -07:00
d2331c888c libsysprof-analyze: fix link dep 2023-05-04 10:14:19 -07:00
c282b54d41 libsysprof-analyze: fetch the decoded addresses onto the stack 2023-05-04 10:03:05 -07:00
e8531ebe58 libsysprof-analyze: add batch getter for stack addresses
This allows caching the interface vfunc to reduce the overhead of accessing
each instruction pointer in the array.
2023-05-04 10:02:53 -07:00
00d8081bfe libsysprof-analyze: break out helper to for adding traceable 2023-05-03 17:50:51 -07:00
10c332d5d2 libsysprof-analyze: index traceables for faster access
This allows us to skip past all the nodes we don't care about with
relatively low overhead once the document has been generated.
2023-05-03 17:44:15 -07:00
b72eda6be2 libsysprof-analyze: prepare symbolizers before decoding 2023-05-03 17:22:37 -07:00
5d255bcb80 libsysprof-analyze: add simple test for symbolizer API 2023-05-03 17:09:18 -07:00
284d0d1f09 libsysprof-analyzer: make multi symbolizer transfer ownership 2023-05-03 17:09:03 -07:00
354eb39676 libsysprof-analyze: add API for bundled symbolizer
This, once completed, will use __symbols__ embedded within a capture file
to decode symbols rather than querying ELF files directly.
2023-05-03 17:08:50 -07:00
95325cc26f libsysprof-analyze: add API to load embedded file as gbytes 2023-05-03 17:07:47 -07:00
c0ade7da01 libsysprof-analyze: add helper for native byte order 2023-05-03 17:07:19 -07:00
f550394b62 libsysprof-analyze: add prepare vfunc for symbolizers
This will allow them to pre-process the document and extract whatever
information they need out of it to do symbolizing.
2023-05-03 15:31:56 -07:00
426aaad781 libsysprof-analyze: add plumbing for symbolization
This gets the worker thread going and the state passed to eventually do
symbolization through the new symbolizer API.
2023-05-03 14:59:46 -07:00
976fb93a83 libsysprof-analyze: start on symbols API via document 2023-05-03 14:21:17 -07:00
f7374f3252 libsysprof-analyze: add minimal symbolizer API
This exposes the types and hierarchy but won't expose the API details that
we need internally. The idea here is that we can keep that private so we
can adjust how it is used should we need to since the public interface
would be the SysprofDocumentSymbols, not the SysprofSymbolizer which does
decoding directly via address/context state.
2023-05-03 14:16:31 -07:00
793740b20f libsysprof-analyze: add SysprofSymbol
The goal here is to get an object to represent a symbol so that we can
more easily extend things in the future. We'll still use those pointers
as unique in the stackstash in the future.
2023-05-02 13:31:22 -07:00
4505e8bb85 libsysprof-analyze: use ref strings internally
This gives us a bit more control than the string chunk, so long as we can
rely on the allocator to do something nice.
2023-05-02 13:30:09 -07:00
ffb6533e02 libsysprof-analyze: add API for intern'ing strings in document
We will want to re-use strings as much as we can for resolving symbols,
tags, etc.
2023-05-01 11:39:55 -07:00
a27d626187 libsysprof-analyze: install libsysprof-analyze-6.so 2023-04-28 16:52:19 -07:00
7a3f90e8f5 libsysprof-analyze: add process list model
This is not yet functional, but gets the scaffolding in place that we'll
use to filter out processes and turn them into something more useful such
as their execution lifetime.
2023-04-28 16:49:52 -07:00
1d9de6fb28 libsysprof-analyze: print stack depth on frame info 2023-04-28 13:19:24 -07:00
1c0790a0a2 libsysprof-analyze: cleanup printf format 2023-04-28 13:16:15 -07:00
760d573f92 libsysprof-analyze: move stack-depth to SysprofDocumentTraceable
This makes the property for depth a requirement, which will allow for
easier quierying from various listmodel filters.
2023-04-28 13:16:07 -07:00
8c5b4720c0 libsysprof-analyze: implement traceable for samples 2023-04-28 12:19:59 -07:00
98edb9c39a libsysprof-analyze: implement traceable for allocations 2023-04-28 12:18:12 -07:00
fe4b6ee812 libsysprof-analyze: add interface for stracetrace types
Currently, this would need to be implemented by SysprofDocumentSample and
SysprofDocumentAllocation. But we could potentially start allowing many
types to attach a trace if we modifier the capture format to allow it.
2023-04-28 12:14:17 -07:00
fdfe130edd libsysprof-analyze: add missing autoptr cleanup funcs 2023-04-28 12:13:08 -07:00
5efa3d04e7 libsysprof-analyze: add is-free convenience property
This just allows filtering by the property rather than having to do an
expression like size==0.
2023-04-28 11:46:12 -07:00
86561c0c4f libyssprof-analyze: add document type for allocations 2023-04-28 11:44:30 -07:00
6b762ef64a libsysprof-analyze: add document type for fork 2023-04-28 10:36:17 -07:00
72c0ba731c libsysprof-analyze: add document type for metadata 2023-04-27 17:58:23 -07:00
d878fbf372 libsysprof-analyze: add document type for task exit
We don't have any extra data here currently, but it can be nice to be able
to check a gtype when consuming frames.
2023-04-27 17:50:28 -07:00
89f9bba8e2 libsysprof-analyze: annotate some frames with extra data 2023-04-27 17:45:32 -07:00
24d0d4af52 libsysprof-analyze: add document type for processes
Generally this is all the processes at startup, but can also be a process
that is executed while the capture is running. Useful to pair with an
Exit frame for pid/tid duration.
2023-04-27 17:45:04 -07:00
6031233cc3 libsysprof-analyze: add document type for marks 2023-04-27 17:22:44 -07:00
92950f4b6b libsysprof-analyze: add document type for log messages 2023-04-27 17:15:35 -07:00
9b05f5c0a5 libsysprof-analyze: make CSTRING helper more succinct to use 2023-04-27 17:14:19 -07:00