Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunFdtransfer ¶
RunFdtransfer runs the fdtransfer command to start the fdtransfer server. Note that the client is part of the libasyncprofielr.so binary. The client connects to the fdtransfer server using a Unix domain socket and sends a request to the server for a file descriptor, specifying the type of the request (e.g., PERF_FD for perf_event_open()). The server processes the request, opens the file descriptor, and sends it back to the client using Unix domain socket with ancillary data (SCM_RIGHTS). The client receives the file descriptor and can use it for further operations.
Types ¶
type AsyncProfiler ¶
type AsyncProfiler struct {
// contains filtered or unexported fields
}
func NewAsyncProfiler ¶
func NewAsyncProfiler(jattachPath, libasyncPath string, pid int, opts ...func(*AsyncProfiler)) *AsyncProfiler
TODO: Move this to profiler package NewAsyncProfiler initializes a new AsyncProfiler instance with the given paths, process ID, event type, and duration.
func (*AsyncProfiler) BuildCommand ¶
BuildCommand builds the command to be executed to run AsyncProfiler.
func (*AsyncProfiler) SetAction ¶
func (p *AsyncProfiler) SetAction(action string, options ...ProfilerOptions) error
type ProfilerOption ¶
type ProfilerOption func(*AsyncProfiler)
func WithDuration ¶
func WithDuration(duration string) ProfilerOption
func WithEventType ¶
func WithEventType(eventType string) ProfilerOption
func WithOutputFile ¶
func WithOutputFile(outputFile string) ProfilerOption