tracer

package
v0.0.0-...-9202be0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AngleTraceOptions

func AngleTraceOptions() *service.TraceTypeCapabilities

AngleTraceOptions returns the default trace options for Angle.

func FuchsiaTraceOptions

func FuchsiaTraceOptions() *service.TraceTypeCapabilities

FuchsiaTraceOptions returns the default trace options for Fuchsia.

func GapiiOptions

func GapiiOptions(o *service.TraceOptions) gapii.Options

GapiiOptions converts the given TraceOptions to gapii.Options.

func LayersFromOptions

func LayersFromOptions(ctx context.Context, o *service.TraceOptions) []string

LayersFromOptions Parses the perfetto options, and returns the required layers

func PerfettoTraceOptions

func PerfettoTraceOptions() *service.TraceTypeCapabilities

PerfettoTraceOptions returns the default trace options for Perfetto.

func VulkanTraceOptions

func VulkanTraceOptions() *service.TraceTypeCapabilities

VulkanTraceOptions returns the default trace options for Vulkan.

Types

type Process

type Process interface {
	// Capture connects to this trace and waits for a capture to be delivered.
	// It copies the capture into the supplied writer.
	// If the process was started with the DeferStart flag, then tracing will wait
	// until start is fired.
	// Capturing will stop when the stop signal is fired (clean stop) or the
	// context is cancelled (abort).
	Capture(ctx context.Context, start task.Signal, stop task.Signal, ready task.Task, w io.Writer, written *int64) (size int64, err error)
}

Process is a handle to an initialized trace that can be started.

type TraceTargetTreeNode

type TraceTargetTreeNode struct {
	Name            string   // What is the name of this tree node
	Icon            []byte   // What is the icon for this node
	URI             string   // What is the URI of this node
	TraceURI        string   // Can this node be traced
	Children        []string // Child URIs of this node
	Parent          string   // What is the URI of this node's parent
	ApplicationName string   // The friendly application name for the trace node if it exists
	ExecutableName  string   // The friendly executable name for the trace node if it exists
}

TraceTargetTreeNode represents a node in the traceable application Tree

type Tracer

type Tracer interface {
	// TraceConfiguration returns the device's supported trace configuration.
	TraceConfiguration(ctx context.Context) (*service.DeviceTraceConfiguration, error)
	// GetTraceTargetNode returns a TraceTargetTreeNode for the given URI
	// on the device
	GetTraceTargetNode(ctx context.Context, uri string, iconDensity float32) (*TraceTargetTreeNode, error)
	// FindTraceTargets finds TraceTargetTreeNodes for a given search string on
	// the device
	FindTraceTargets(ctx context.Context, uri string) ([]*TraceTargetTreeNode, error)

	// SetupTrace starts the application on the device, and causes it to wait
	// for the trace to be started. It returns the process that was created, as
	// well as a function that can be used to clean up the device
	SetupTrace(ctx context.Context, o *service.TraceOptions) (Process, app.Cleanup, error)

	// GetDevice returns the device associated with this tracer
	GetDevice() bind.Device
	// ProcessProfilingData takes a buffer for a Perfetto trace and translates it into
	// a ProfilingData
	ProcessProfilingData(ctx context.Context, buffer *bytes.Buffer, capture *path.Capture, staticAnalysisResult chan *api.StaticAnalysisProfileData, handleMapping map[uint64][]service.VulkanHandleMappingItem, syncData *sync.Data) (*service.ProfilingData, error)
	// Validate validates the GPU profiling capabilities of the given device and returns
	// an error if validation failed or the GPU profiling data is invalid.
	Validate(ctx context.Context, enableLocalFiles bool) (*service.DeviceValidationResult, error)
}

Tracer is an option interface that a bind.Device can implement. If it exists, it is used to set up and connect to a tracing application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL