Commit Graph

2208 Commits

Author SHA1 Message Date
bf8a851a57 elf: fix pid usage
We want the pid from the event.
2021-09-21 15:35:37 -07:00
11ae2fa395 build: fix write length 2021-09-21 13:12:02 -07:00
0fd7ea3f80 tests: cleanup addr decode output 2021-09-21 11:50:34 -07:00
09360c5cb9 tests: add test to dump translated maps 2021-09-21 11:50:22 -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
5f43a57ab0 tests: add util to extract build-id
Easier to remember than readelf stuff and tests the same code paths.
2021-09-16 22:59:28 -07:00
4d12f9eea7 build: use static library for tests 2021-09-16 22:58:51 -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
e02785ba23 start on new resolver for paths 2021-09-14 19:53:46 -07:00
1d2c00b120 tests: make test tool system independent
We don't want to rely on host /proc/mounts or we cannot really test this
on machines other than the target failure.
2021-08-30 15:25:24 -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
bcda9694c6 profiler: fix typo in mutable calculation
Fixes #65
2021-06-03 13:57:38 -07:00
ef17d80673 Updated Spanish translation 2021-05-05 10:43:58 +02:00
38af7af6c4 Add Chinese (China) translation 2021-04-16 08:32:34 +00:00
b939cdb0fd Update Romanian translation 2021-04-13 09:15:21 +00:00
c6840d48d1 Release 3.40.1
This release fixes an issue created during GNOME 40 development where the
libsysprof-capture-4.a library could leak symbols into a shared library
that consumed it (such as Pango, GTK 4, and GLib).

This fixes that by removing symbol visibility from libsysprof-capture.a.
Distributions are encouraged to rebuild their libraries that consume
Sysprof's libsysprof-capture-4.a.
2021-03-23 10:58:57 -07:00
6f11fcf510 sysprofd: fix warning 2021-03-22 14:55:04 -07:00
3f2b486741 build: remove symbol visibility from capture static library
The visibility of symbols was getting extracted from the .a into the
libraries that link_whole the archive. We can simply disable the visibility
from the .a with a custom config.h.meson which avoids it for the capture
library. Since we already double-compile those sources for the shared
library, the shared library visibility is not affected.

This was tested by compiling a simple library which calls
sysprof_clock_init() and ensuring that no extra symbols were found with
`nm libfoo.so | grep ' T '`.

Fixes #60
2021-03-22 14:49:00 -07:00
7353f8d950 Update Basque translation
(cherry picked from commit 3d6b074cbdb146a6544a5cbf0cf7dcc3357ef108)
2021-03-20 08:45:11 +00:00
5463c965b1 Release 3.40.0 2021-03-19 17:17:46 -07:00
2c86b4b803 Update Hungarian translation 2021-03-18 00:47:15 +00: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
66c6e8b862 Update Polish translation 2021-03-14 14:27:17 +01:00
2d9682ca7e Update Indonesian translation 2021-03-14 12:22:45 +00:00
0ff4ab3e61 Update Brazilian Portuguese translation 2021-03-12 20:09:34 +00:00
dd4f66d57d Update Swedish translation 2021-03-10 16:28:46 +00:00
b950cb749b Update Ukrainian translation 2021-03-09 08:02:20 +00:00
dc85e5fa9c Merge branch 'fix-ui-typo' into 'master'
libsysprof-ui: Fix a typo in a label

See merge request GNOME/sysprof!43
2021-03-09 00:11:31 +00:00
d1a43dc4a8 libsysprof-ui: Fix a typo in a label 2021-03-08 15:27:27 -08:00
7b87560be8 Update German translation 2021-02-26 20:35:58 +00:00
311405fd84 Release 3.39.94 (40.beta2) 2021-02-25 14:43:14 -08:00
7e92b3e14b elf: use overlays to resolve library paths 2021-02-25 14:09:15 -08:00
43d2b0b019 proc: track overlays for flatpak /app and /usr 2021-02-25 13:44:58 -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
8b0f3f4682 proc: fix capture of application id 2021-02-25 13:03:46 -08:00
7a8f1d9d2e flatpak: add stubs to extra flatpak cgroup information
The goal here is to discover the app and runtime paths so that we can
create a path mapping when resolving addresses.
2021-02-25 12:15:15 -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
b22899474d proc: discover filesystem root for podman containers
For processes we find in a podman container, we can sniff the libpod
cgroup scope. Using that we can translate into the podman layer that
contains the files.

With that, future work could find the proper .so when resolving based on
alternate roots for the process.
2021-02-24 18:40:41 -08:00
b5790be7ad helpers: add ability to read /proc/$pid/cgroup file 2021-02-24 17:57:03 -08:00
4758fb42ce capture: add pid-root frame type
While I'm not thrilled to add new frame types for every sort of thing, I
think having this will be relatively useful so we can improve decoding
operations.

This adds SysprofCapturePidRoot which lets us specify a root directory
on the host system for which is the real root (/) of the PID. This can
be useful when reconstructing overlays for containers and you need to
direct access to alternate roots.

The layer gives us some ability to try to deal with overlayfs, albeit at
a very rudimentary level. In most cases I anticipate we just deal with
the main root and ignore overlays until necessary.
2021-02-24 17:56:37 -08:00
ff22417de9 build: add missing 3.40 version macros 2021-02-24 17:41:20 -08:00
afafeacc70 tests: avoid use of file that changes in test case
It turns out that /proc/cpuinfo changes out from under us rather frequently
and that makes it a bad use-case for a unit test. This uses meson.build
which presumably wont change while running the tests.
2021-02-24 17:41:09 -08:00
937e162472 tests: fix environment for running tests
These should not be in quotes so that we can build actual file paths
from them.
2021-02-24 17:39:35 -08:00
e7d1458428 sysprof: shorten default height of window 2021-02-24 14:20:23 -08:00
c93286cf9a libsysprof-ui: remove GTK aid
This isn't needed anymore now that we have the Control FD source which is
used to pass data between processes.
2021-02-24 14:20:17 -08:00