Commit Graph

28 Commits

Author SHA1 Message Date
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
ff41633abc libsysprof-analyze: use EggBitset instead of GTK
This uses the newly brought in EggBitset instead of GtkBitset so that we
can drop our GTK dependency in the libsysprof-analyze library.
2023-05-25 15:16:13 -07:00
f6ec119899 libsysprof-analyze: move definition to private header
So we can access it from other sources.
2023-05-25 11:13:32 -07:00
81672f191b libsysprof-analyze: fix symbol name for context switch
We want the last context as we're working backwards in the stack trace.
2023-05-25 11:12:23 -07:00
9c8b3b9c25 libsysprof-analyze: add bit for context switch symbols 2023-05-25 11:11:52 -07:00
a90b9a2fc7 libsysprof-analyze: use separate cache for kernel symbols
Additionally this reduces some GHashTable lookup costs by doing it once
for the process-info per-traceable rather than one per instruction pointer
per traceable.
2023-05-15 14:30:06 -07:00
525b30a42f libsysprof-analyze: give symbolizer access to address context
The kallsym symbol resolver will need this to short-circuit unless we're
within a kernel address context.
2023-05-15 13:07:48 -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
8c17830522 libsysprof-analyze: resolve via symbol cache for pid 2023-05-11 15:48:13 -07:00
352fa617c0 libsysprof-analyze: fix transfer ownership of refstring 2023-05-11 14:05:07 -07:00
5d5f0a5085 libsysprof-analyze: plumb access to string pooling
We want various subsystems to start using this, but we need to plumb it
to the symbolizers to take advantage of it.
2023-05-11 13:09:50 -07:00
9b5e25037b libsysprof-analyze: add SysprofProcessInfo
This internal type is used to collect things about a process like the
memory maps, address layout, and symbol cache. This can persist once
parsed at startup, then applied to objects created on demand such as the
SysprofDocumentProcess or used by symbolizers internally rather than
complicated function arguments.
2023-05-11 12:21:32 -07:00
8f4fa95663 libsysprof-analyze: use mountnamespace/addresslayout in symbolize 2023-05-10 16:51:05 -07:00
b3a4c295c3 libsysprof-analyze: add basic symbol cache
This relies on begin/end range for the symbols to create something akin to
an interval tree, albeit with GSequence. If performance needs to be
addressed, can probably augment SysprofSymbol for an interval rbtree.
2023-05-10 15:14:09 -07:00
b625fec454 libsysprof-analyze: add basic symbolize API
This isn't what it will look like in final form, just get the minimum
there for us to use it with the bundled decoder (copied from libsysprof
with adaptations).
2023-05-09 13:29:52 -07:00
689599ef43 libsysprof-analyze: add note about symbolizing work 2023-05-08 16:16:09 -07:00
6daff5ac6e libsysprof-analyze: return symbols for context switches 2023-05-08 15:49:42 -07:00
7f6191a3dd libsysprof-analyze: add stub for symbol lookup 2023-05-08 14:00:09 -07:00
f2479912e6 libsysprof-analyze: cleanup some helper code for symbolize 2023-05-08 12:24:44 -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
377e8e26c6 libsysprof-analyze: print some basic info for debugging 2023-05-04 10:14:43 -07:00
c282b54d41 libsysprof-analyze: fetch the decoded addresses onto the stack 2023-05-04 10:03:05 -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
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