Commit Graph

10 Commits

Author SHA1 Message Date
33c81a3a9c memprof: add memory profiling using LD_PRELOAD
This brings over some of the techniques from the old memprof design.
Sysprof and memprof shared a lot of code, so it is pretty natural to
bring back the same callgraph view based on memory allocations.

This reuses the StackStash just like it did in memprof. While it
would be nice to reuse some existing tools out there, the fit of
memprof with sysprof is so naturally aligned, it's not really a
big deal to bring back the LD_PRELOAD. The value really comes
from seeing all this stuff together instead of multiple apps.

There are plenty of things we can implement on top of this that
we are not doing yet such as temporary allocations, cross-thread
frees, graphing the heap, and graphing differences between the
heap at to points in time. I'd like all of these things, given
enough time to make them useful.

This is still a bit slow though due to the global lock we take
to access the writer. To improve the speed here we need to get
rid of that lock and head towards a design that allows a thread
to request a new writer from Sysprof and save it in TLS (to be
destroyed when the thread exits).
2020-02-07 19:00:33 -08:00
c2728b8ada cleanup: remove duplicated NSEC_PER_SEC macros
This switches everything to using a single 64-bit constant for NSEC_PER_SEC
that ensure we're doing 64-bit math everywhere.
2019-07-18 10:22:46 -07:00
318e9e300c tools: add option to list files in capture 2019-05-29 15:13:01 -07:00
7650d6e7c6 libsysprof-capture: add file chunk frame type 2019-05-29 15:13:01 -07:00
cc415c9140 libsysprof-capture: add log frame type
This is useful to interleave logs with the capture so that we can have
correlation without interjecting them into mark fields.
2019-05-29 15:13:01 -07:00
2d500bebe2 tools: add some timing information to dump utility 2019-05-29 15:13:01 -07:00
567f8a3a0f libsysprof-capture: shorten names by removing Frame 2019-05-29 15:13:01 -07:00
db9aea95ea libsysprof-capture: add metadata frame type
This will allow sources and aids to discover information about what was
done between capture loading and saving.
2019-05-29 15:13:00 -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
1708ad1b48 tree: start on massive tree refactor
The big thing going on here is that we are going to split up the libraries
a bit better, and remove GObject from the capture library. The libsysprof
library will bring in the capture library statically, so we can export the
symbols we want.

Eventually, we will bump the version to sysprof-3, but not yet.
2019-05-29 15:12:59 -07:00