Commit Graph

37 Commits

Author SHA1 Message Date
d28080b9ad libsysprof-analyze: add SysprofDocumentJitmap
This adds a specific frame type for the Jitmap frames in the capture files.
You can iterate them without having to bswap as well, which is why this
does not use the SysprofCaptureJitmapIter (which does require bswap'd
frames).
2023-05-22 12:18:57 -07:00
c7f025d4d3 libsysprof-analyze: allow filtering by pid 2023-05-22 10:59:38 -07:00
12e497891f libsysprof-analyze: add SysprofDocumentOverlay
This maps to the SysprofCaptureOverlay data frames. We need them currently
to be able to locate files from various podman/toolbox rootless containers.
2023-05-19 16:51:15 -07:00
f1f0261486 libsysprof-analyze: check if ELF matches inode/build-id
We still want to load it into the cache as it could get used by other
symbols/mmap regions, but don't return the ELF if it won't match an inode
or build-id check. Rely on other fallbacks to create fallback symbols
for those use cases.
2023-05-19 15:33:53 -07:00
978bfc5680 libsysprof-analyze: add tool to test elf loader 2023-05-18 13:11:44 -07:00
287c7feca2 libsysprof-analyze: add test to analyze address layout 2023-05-15 15:26:27 -07:00
b786edd848 libsysprof-analyze: print mmap information 2023-05-15 15:20:52 -07:00
140bc1d384 libsysprof-analyze: add scaffolding for elf symbol resolver 2023-05-15 15:03:25 -07:00
d415f29a15 libsysprof-analyze: allow disabling bundled symbolizer 2023-05-15 14:52:59 -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
9f6e16e373 libsysprof-analyze: take depth from translation func 2023-05-12 14:29:16 -07:00
81c384a974 libsysprof-analyze: use interval tree for symbol cache
This uses an augmented red-black tree to create an interval tree with
non-interval lookups. That amounts to storing address ranges within the
red-black tree, but looking up by single address.
2023-05-12 14:13:40 -07:00
c0bc3c047a libsysprof-analyze: get stack addresses as group 2023-05-11 15:38:14 -07:00
ff1b4d00bd libsysprof-analyze: implement key/value superblock option API
This currently gets used in libsysprof to try to cross mount namespaces to
somewhere we can access a binary on the same subvolume.
2023-05-11 15:21:36 -07:00
35f87b6121 libsysprof-analyze: add superblock-options property
This lets you get the full string that was parsed from the mountinfo
rather than having to go through our yet-to-be-implemented specific
option API.
2023-05-11 15:13:23 -07:00
7c37120edf libsysprof-analyze: make SysprofMount public API
And expose it via sysprof_document_process_list_mounts() so that when
inspecting processes we can see what binaries were mapped as well as what
the filesystem looked like to locate those mapped paths.
2023-05-11 14:37:02 -07:00
5abad47160 libsysprof-analyze: give access to memory maps from process
And add it to test tool to ensure it works.
2023-05-11 12:32:32 -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
d8d787c871 libsysprof-analyze: add test to dump embedded file contents 2023-05-09 12:49:07 -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
6daff5ac6e libsysprof-analyze: return symbols for context switches 2023-05-08 15:49:42 -07:00
dc57721699 libsysprof-analyze: add some dummy symbolize example
We still need the document symbols to do the right thing, which we will
get to after we have access to mount namespace and file loading.
2023-05-08 14:01:17 -07:00
f2479912e6 libsysprof-analyze: cleanup some helper code for symbolize 2023-05-08 12:24:44 -07:00
e6ff4e838c libsysprof-analyze: print info about file chunks 2023-05-05 16:35:16 -07:00
5d255bcb80 libsysprof-analyze: add simple test for symbolizer API 2023-05-03 17:09:18 -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
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
89f9bba8e2 libsysprof-analyze: annotate some frames with extra data 2023-04-27 17:45:32 -07:00
ca83cd6b40 libsysprof-analyze: add document type for samples 2023-04-25 17:10:12 -07:00
a3cf041326 libsysprof-analyze: print some basic frame information 2023-04-25 16:04:35 -07:00
31003c519c libsysprof-analyze: rename to SysprofDocumentFrame
We will eventually be adding sub-types for the various frame types, and
use this as a common ancestor for item inflation.
2023-04-25 15:32:55 -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
efab045006 libsysprof-analyze: start on sysprof-analyze library
The goal here is to break up libsysprof into a library for recording
profiles (using libsysprof-capture) and a library for analyzing profiles
(both used by the sysprof UI).
2023-04-25 11:57:26 -07:00