Commit Graph

228 Commits

Author SHA1 Message Date
a74e6daa3b libsysprof: use a{sv} for future profiler specific options
We may need this in the future to send backend-specific options to the
profiler peer.
2019-05-29 15:13:01 -07:00
82f8872c1d libsysprof: add libc/libstdc++ 2019-05-29 15:13:01 -07:00
1ee1a7cc3a libsysprof: ignore kernel symbols if embedded resolver is found
This ensures that we don't mix symbols from kernels if we can reasonably
expect that the necessary symbols were decoded by the peer.
2019-05-29 15:13:01 -07:00
716b913347 libsysprof: check for enough symbols to dereference 2019-05-29 15:13:01 -07:00
7f92889076 libsysprof: be NULL safe 2019-05-29 15:13:01 -07:00
1583ec3f79 libsysprof: fix tag lookups for 0 tags 2019-05-29 15:13:01 -07:00
c8c1b53352 libsysprof: be more defensive 2019-05-29 15:13:01 -07:00
1a11480010 libsysprof: add missing externs 2019-05-29 15:13:01 -07:00
d55e36219c libsysprof: fix various seek usage 2019-05-29 15:13:01 -07:00
b1f58d6104 libsysprof: lseek before deserializing 2019-05-29 15:13:01 -07:00
54f5f6be49 libsysprof: decode symbols from embedded maps in callgraphs 2019-05-29 15:13:01 -07:00
854f0bea52 libsysprof: add symbol resolver that can resolve from capture file
If the capture file has an embedded __symbols__ file within it, we can
try to resolve the function names from the data embedded within that
virtual file.
2019-05-29 15:13:01 -07:00
8f607ed123 libsysprof: use SysprofSymbolMap to write symbol maps 2019-05-29 15:13:01 -07:00
7ffd3e41cf libsysprof: add utility to build symbol maps
These are useful to allow us to append symbol informatio to a capture file
using the existing symbol resolvers.

It can read/write a small format embedded within capture files so that
we can append them from the target machine rather than decoding from the
machine we run Sysprof UI on.
2019-05-29 15:13:01 -07:00
3b3011544b libsysprof: decode and supplement kernel symbols 2019-05-29 15:13:01 -07:00
1f91bc77ed libsysprof: avoid kallsyms in capture file
The kallsyms is huge (like 12Mb) and we want to avoid adding anything we
don't need. Instead, we can rely on the symbols source to decode the
symbols immediately and add them to supplemental.
2019-05-29 15:13:01 -07:00
649dcf3aac libsysprof: add trailing empty kernel node
This can be used so that we always know a symbol will be after the returned
symbol (so we can look for peer address).
2019-05-29 15:13:01 -07:00
b2b3b48b52 libsysprof: add __symbols__ file with supplemental symbol data
This can be used by a future symbol resolver to resolve symbols from the
target host rather than on the capture view host.
2019-05-29 15:13:01 -07:00
b9c52f4573 libsysprof: whitespace 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
e39feeeeb0 utils: add symbol range support for binfile and elfparser 2019-05-29 15:13:01 -07:00
f18a7171cf whitespace 2019-05-29 15:13:01 -07:00
57255a1d29 libsysprof: remove lookaside from public API 2019-05-29 15:13:01 -07:00
90c165aa08 libsysprof: stub out source for appending symbols 2019-05-29 15:13:01 -07:00
8a246d4453 libsysprof: create hook for supplemental writer data 2019-05-29 15:13:01 -07:00
4da55f4267 libsysprof: add cpuinfo to capture file when possible 2019-05-29 15:13:01 -07:00
874fb01c25 libsysprof: use embedded kallsyms when possible
This uses the kallysms that has been embedded in the capture file when
that is possible (such as when proc-source appends it).
2019-05-29 15:13:01 -07:00
b8c30e3285 libsysprof: add kallsyms to capture file
This can be used by the kernel symbol resolver to resolve symbols on a
different machine than where the capture is performed.
2019-05-29 15:13:01 -07:00
c7b4465e27 libsysprof: add missing new func 2019-05-29 15:13:01 -07:00
17a835570e build: remove dead code 2019-05-29 15:13:01 -07:00
3706869e06 libsysprof: clear trace fd after reading 2019-05-29 15:13:01 -07:00
552ccb4f60 libsysprof: move tracefd to separate source 2019-05-29 15:13:01 -07:00
385ece7c41 whitespace 2019-05-29 15:13:01 -07:00
7bba7a4dff hostinfo: get proc fd from daemon
Current CPU speed is censored in various containers, so we need access to
it from the daemon.
2019-05-29 15:13:01 -07:00
2c6044d7bb helpers: remove flatpak check for now
We don't know if the file is sensitive or not, so we must go to the
daemon for the contents.
2019-05-29 15:13:01 -07:00
272a0e284e whitespace 2019-05-29 15:13:01 -07:00
697ef7f350 libsysprof: serialize dbus proxy settings 2019-05-29 15:13:01 -07:00
7bec0d7698 libsysprof: make sure we have a SysprofSource 2019-05-29 15:13:01 -07:00
aac6e6ed9f Revert "helpers: try harder to avoid D-Bus to daemon"
This reverts commit 84c708890621472d640dfe2360e1273fcc5163cf.

This caused some issues with callgraphs.
2019-05-29 15:13:01 -07:00
404317d49d libsysprof: implement various serialization hooks 2019-05-29 15:13:01 -07:00
974cbf5130 libsysprof: add helper to create profiler from capture reader
This will look at what was in the reader before and create a new local
profiler from that. This still needs to add support for restoring info
from sources which need to be inflated.
2019-05-29 15:13:01 -07:00
9229e41976 libsysprof: allow auto-start of sysprof3
We don't need to allow auth here, but we do need to allow auto-start.
2019-05-29 15:13:01 -07:00
6a5c00b446 libsysprof: store some information about the profile in keyfile
This gets added as a metadata chunk to the capture file so that we can
use it later to recreate the session. The goal is to add something like
ctrl+r to run the capture again with identical settings to the previous
capture.
2019-05-29 15:13:01 -07:00
5331e8bd7f hostinfo: actually parse cpu freq details 2019-05-29 15:13:01 -07:00
cfab4b2d73 libsysprof: skip when no writer is available 2019-05-29 15:13:01 -07:00
54c39172df libsysprof-ui: fix dereference after steal
This is undefined behavior and most go right to left
2019-05-29 15:13:01 -07:00
27e75cf61b libsysprof: improve some defaults 2019-05-29 15:13:01 -07:00
4f00ec5e49 libsysprof: add some symbol libraries 2019-05-29 15:13:01 -07:00
3321308c4a libsysprof: use SYSPROF_TRACE_FD env var when spawning
This avoids connecting to the bus which is racey, and instead just hands
the FD off to the subprocess.
2019-05-29 15:13:01 -07:00
dbc47a3a69 libsysprof: log source failure to console 2019-05-29 15:13:01 -07:00