mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 14:40:54 +00:00
libsysprof-capture: add frame type for tracing
This is like sample but has an "enter/exit" flag with it. This can be useful when you want to provide tracing instead of sampling. We use a different frame type so that we can denote that this isn't traditional sampling, and the flag can be used to find the next exit for the current enter for calculating durations. The entire stack trace is provided to make things easier on tools which may want to deal with indirect functions that were not instrumented but can be unwound. That may allow for tooling to give the user some insight that it's not *just* this function entering, but some functions before it were entered too. This also adds a SysprofTracer instrument which will preload a libsysprof-tracer-6.so into the process providing the __cyg_profile_func_enter() and __cyg_profile_func_leave() hooks.
This commit is contained in:
@ -143,6 +143,15 @@ bool sysprof_capture_writer_add_sample (Sy
|
||||
const SysprofCaptureAddress *addrs,
|
||||
unsigned int n_addrs);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
bool sysprof_capture_writer_add_trace (SysprofCaptureWriter *self,
|
||||
int64_t time,
|
||||
int cpu,
|
||||
int32_t pid,
|
||||
int32_t tid,
|
||||
const SysprofCaptureAddress *addrs,
|
||||
unsigned int n_addrs,
|
||||
bool entering);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
bool sysprof_capture_writer_add_fork (SysprofCaptureWriter *self,
|
||||
int64_t time,
|
||||
int cpu,
|
||||
|
||||
Reference in New Issue
Block a user