Commit Graph

10 Commits

Author SHA1 Message Date
45c8c95706 libsysprof-capture: Drop GError usage from SysprofCaptureWriter
Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
2020-07-03 22:00:34 +01:00
e19d70bca0 libsysprof-capture: Drop GError usage from SysprofCaptureReader
Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
2020-07-03 22:00:34 +01:00
d2047fb557 libsysprof-capture: Move autocleanup definitions to libsysprof
In preparation for dropping the GLib dependency from libsysprof-capture,
move the autocleanup definitions up to libsysprof. Add a new header for
them.

This is slightly awkward in the tools, which depend on
libsysprof-capture but not libsysprof. Rather than make them depend on
libsysprof (which might be disabled at configure time), include the
`sysprof-capture-autocleanups.h` file between source directories.
`SYSPROF_COMPILATION` needs to be defined for this to work.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
2020-07-02 21:07:11 +01:00
5dbb486512 tracefd: give memfd a descriptive name
This makes it easier to track down from /proc/$pid/fd/.
2019-06-12 11:14:21 -07:00
4a31b934be tracefd: use g_strdup_printf()
I don't like maintaining stack based string allocations unless it's really
a performance savings.
2019-06-12 11:13:44 -07:00
e97490be16 libsysprof: abstract subprocess usage
For embedding cases, we need a bit more control here so that the
application can be in control of how the process is spawned.
2019-06-11 18:48:28 -07:00
dcd1a9fbcf libsysprof: allow changing envvar from init and after 2019-06-03 19:09:30 -07:00
c7b4465e27 libsysprof: add missing new func 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