Commit Graph

26 Commits

Author SHA1 Message Date
1ef9fc1e30 elf: handle NULL lookaside
This code uses the hashtable directly to avoid the overhead of calling
the path which creates ProcessInfo entries. So we need to also handle
the chance the lookaside is NULL.
2022-09-05 20:51:58 -07:00
46e7e31f45 elf-symbol-resolver: Add Flatpak Debug paths
Add paths for com.example.App.Debug and com.example.Sdk.Debug where most
of the debug symbols should lie.
2021-10-15 07:17:14 +03:00
01eafe951e elf-symbol-resolver: Use custom debug dirs
They were set up, but not actually used for resolving. Fix that.
2021-10-08 23:37:12 +03:00
a0de244f7e elf: add note about zero inodes 2021-09-21 16:03:58 -07:00
bf8a851a57 elf: fix pid usage
We want the pid from the event.
2021-09-21 15:35:37 -07:00
4c6912e804 elf: add helpers for test utilities to verify decoding 2021-09-21 11:50:03 -07:00
fb33d382cc extract instance data from .flatpak-info 2021-09-17 17:16:44 -07:00
728c5081d1 more work on resolver kinds 2021-09-17 17:11:06 -07:00
5f352abc86 do delayed path resolving of files containing symbols
we still need to teach this to locate debug dirs relative to the
process paths.
2021-09-15 17:52:58 -07:00
3e7e677419 start cleaning up proc source for delayed maps 2021-09-14 22:20:03 -07:00
5f255403aa libsysprof: remove /sysroot/ workaround
This isnt really need anymore now that we have other ways of resolving this.
It fixes an issue with resolving some symbols on systems like GNOME OS.
2021-08-26 17:12:37 -07:00
2c0ea406fd elf: use strncmp for comparison
We expect strncmp available on systems we build ELF parsers.
2021-03-17 13:01:02 -07:00
605cdfc3f1 elf: skip past /sysroot/ when symbol resolving
The /sysroot/ convention is something we see on OSTree-based systems
such as Silverblue or CoreOS which contains the running image. We can
skip that part of the path so that symbol resolving continues as normal.

We are starting to come into a situation where we need more advanced
path translations because we keep having to do things like this. Until
Linux figures out file-system namespaces at a higher level at least.
2021-03-17 12:56:38 -07:00
7e92b3e14b elf: use overlays to resolve library paths 2021-02-25 14:09:15 -08:00
14139232d5 capture: rename PidRoot to Overlay and add src/dst
Really what we want to deal with here is tracking an overlay that we may
need to be able to decode after the fact (in case processes exit or we
need to do post-processing symbol resolution).

For the podman case, that is $some_path mapped to root (/), generally
speaking. For flatpak though, that would have two mappings, one for
/app and another for /usr (possibly more).
2021-02-25 13:43:09 -08:00
9e823c57ce elf: use discovered root when decoding symbols 2021-02-24 19:05:43 -08:00
bd8a8ada26 elf: track pid root when building lookaside buffers
We want to know the location of our root if it was specified in the
capture file. Such is useful for decoding symbols that may not be
reported right from perf tooling.

This allows us to try to translate maps for processes in containers.
2021-02-24 18:59:35 -08:00
31d83a12b9 elf: short-circuit symbol resolving 2020-02-07 16:54:18 -08:00
9a3a95a5ca podman: add debug directories from podman containers
This is meant to allow us to find the debug files for a given library for
podman containers running as the current user. However, we still need to
try to translate the fuse-overlayfs paths when parsing the /proc/pid/mounts
or we'll have incorrect paths coming from the event stream.
2020-01-24 10:54:32 -08:00
3b17e65a39 libsysprof: attach symbol directories to ELF resolver
The goal here is to drop the sysprof-symbol-dirs.[ch] altogether in
favor of modifying the resolver directories on the particular resolver
directly.
2019-08-02 19:41:26 -07:00
0c3f2df42b libsysprof: improve decoding a bit from flatpak 2019-08-02 13:22:03 -07:00
82f8872c1d libsysprof: add libc/libstdc++ 2019-05-29 15:13:01 -07:00
b17ff843d7 libsysprof: add helper to decode symbols with address range 2019-05-29 15:13:01 -07:00
f18a7171cf whitespace 2019-05-29 15:13:01 -07:00
4f00ec5e49 libsysprof: add some symbol libraries 2019-05-29 15:13:01 -07:00
53c718b708 build: rename all symbols to use sysprof_ as prefix
As we gain in usage, we need to be more careful about using a prefix
that will not collide with other symbols. So version 3 of our ABI will
change to using Sysprof/SYSPROF/sysprof as the various prefixes.

The soname/api version bump will happen later on this branch so that
things are easier to test up until then.
2019-05-29 15:12:59 -07:00