Commit Graph

2188 Commits

Author SHA1 Message Date
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
61934a1c02 libsysprof: make perf_event_paranoid failure softer
We can survive this being at 2, but we can keep it a debug info bit for
now to be less annoying on the console.
2021-02-24 14:03:51 -08:00
143554c68e profiler: preroll authorization before starting
This helps some annoying cases where we keep checking over and over for
each CPU, procfile, etc during startup.

It makes the tool less useful on systems without D-Bus, but let's be
honest, profiling is a Linux only game for Sysprof.
2021-02-24 14:01:01 -08:00
4777e74862 sysprofd: ftruncate() when overwriting files
This is really only used for proc like files which are generally a single
page, but might as well start from zero.
2021-02-24 13:03:24 -08:00
86fb061899 governor: always disable paranoid status
This allows us to always attempt to disable the perf_event_paranoid
setting to -1 while we profile.
2021-02-24 12:19:36 -08:00
6d3398f258 libsysprof-ui: always setup governor source on Linux
We need this for disabling paranoid perf event.
2021-02-24 12:19:08 -08:00
7ca4acc30d sysprof-cli: always create governor source
But also disable it unless we're on Linux.
2021-02-24 11:59:34 -08:00
53d3c0afc9 governor: default to not disabling governor 2021-02-24 11:58:40 -08:00
52e04cf346 governor: disable paranoid setting in governor source
This could be it's own source, but it's nice to have it in one place
with our performance tooling.
2021-02-24 11:56:22 -08:00
0abba0949d libsysprof: add client access to paranoid API 2021-02-24 11:54:19 -08:00
5a82ce21f2 libsysprof: fix typos 2021-02-24 11:34:01 -08:00
667180cbc8 sysprofd: add API to set perf_event_paranoid
This will allow us to get more information on demand when running the
profiler without endless tweaking by end users.
2021-02-24 11:26:10 -08:00
adf8a3cd6a version: relicense with the rest of sysprof-capture 2021-02-24 09:39:01 -08:00
902397917b release 3.39.92 2021-02-23 15:52:36 -08:00
3e1686a7f4 ui: tweak layout of recording button a bit
This makes things look a lot better on the initial display. If the window
is too large, the compositor can maximize it anyway.
2021-02-23 15:50:10 -08:00
f59a0db3dc update copyright 2021-02-23 15:40:42 -08:00
4d332dc68a about: add symbolic information to release 2021-02-23 15:40:32 -08:00
b77523eb3d use g_memdup2() 2021-02-23 15:39:25 -08:00
843585e00d cursor: handle NULL readers gracefully
Fixes #55
2021-02-23 15:33:51 -08:00
f41212680a podman: add various possible debug dirs 2021-02-19 16:58:58 -08:00
77a340e3f6 build: use specify pic for static libsysprof-capture 2021-02-19 09:37:24 -08:00