libsysprof-capture: add simplified collector API

This is a simplified API for the inferior to use (such as from a
LD_PRELOAD) that will use mmap()'d ring buffer created by Sysprof. Doing
so can reduce the amount of overhead in the inferior enough to make some
workloads useful. For example, collecting memory statistics and backtraces
is now fast enough to be useful.
This commit is contained in:
Christian Hergert
2020-02-13 18:56:31 -08:00
parent ec67106a4d
commit c546d31ad9
4 changed files with 517 additions and 0 deletions

View File

@ -6,6 +6,7 @@ libsysprof_capture_headers = files([
'sysprof-capture-reader.h',
'sysprof-capture-types.h',
'sysprof-capture-writer.h',
'sysprof-collector.h',
'sysprof-platform.h',
'sysprof-capture.h',
'sysprof-version-macros.h',
@ -22,6 +23,7 @@ libsysprof_capture_sources = files([
'sysprof-capture-util.c',
'sysprof-capture-writer.c',
'sysprof-capture-writer-cat.c',
'sysprof-collector.c',
'sysprof-clock.c',
'sysprof-platform.c',
])
@ -35,6 +37,8 @@ configure_file(
libsysprof_capture_deps = [
glib_dep,
gio_dep,
gio_unix_dep,
]
libsysprof_capture = static_library(