profile

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupTree

type GroupTree struct {
	// contains filtered or unexported fields
}

func NewGroupTree

func NewGroupTree() *GroupTree

func (*GroupTree) Flatten

func (t *GroupTree) Flatten(capture *path.Capture) []*service.ProfilingData_Group

Flatten flattens this tree into a list of group protos.

func (*GroupTree) GetOrCreateDrawCallGroup

func (t *GroupTree) GetOrCreateDrawCallGroup(name string, link api.SubCmdIdx) int32

GetDrawCallGroup finds or creates the group for the given draw call command and returns its id. TODO: the same assumptions apply here as do for GetOrCreateGroup.

func (*GroupTree) GetOrCreateGroup

func (t *GroupTree) GetOrCreateGroup(name string, link sync.SubCmdRange) int32

GetOrCreateGroup finds or creates the group for the given command range and returns its id. TODO: this function makes some assumptions about command/sub command IDs: 1. we only get groups for command buffers, renderpasses and draw calls. 2. no overlaps. 3. the sub command ids are [cmdId, submission, cmdbuff, cmd]. All these assumptions currently hold and are also made in other parts of the code in some way. The assumptions will need to be codified as part of the command/sub-command refactor that is already planned.

func (*GroupTree) Visit

func (t *GroupTree) Visit(callback func(parent int32, node *groupTreeNode))

Visit visits each node in the tree invoking the given callback for each node.

type ProfilingData

type ProfilingData struct {
	Groups        *GroupTree
	Slices        SliceData
	Counters      []*service.ProfilingData_Counter
	GpuCounters   *service.ProfilingData_GpuCounters
	CounterGroups []*service.ProfilingData_CounterGroup
}

func NewProfilingData

func NewProfilingData() *ProfilingData

func (*ProfilingData) ComputeCounters

func (pd *ProfilingData) ComputeCounters(ctx context.Context)

ComputeCounters calculates the summarized GPU performance and fills in the GpuCounters field.

func (*ProfilingData) MergeStaticAnalysis

func (pd *ProfilingData) MergeStaticAnalysis(ctx context.Context, staticAnalysis *api.StaticAnalysisProfileData)

type Slice

type Slice struct {
	Context       int64
	RenderTarget  int64
	Frame         int64
	Submission    int64
	HardwareQueue int64
	CommandBuffer int64
	Renderpass    int64
	Timestamp     uint64
	Duration      uint64
	SliceID       uint64
	Name          string
	Depth         int32
	ArgSet        int64
	Track         int32
	TrackName     string
	GroupID       int32 // To be filled in by caller.
}

type SliceData

type SliceData []Slice

func ExtractSliceData

func ExtractSliceData(ctx context.Context, processor *perfetto.Processor) (SliceData, error)

func (SliceData) MapIdentifiers

func (d SliceData) MapIdentifiers(ctx context.Context, handleMapping map[uint64][]service.VulkanHandleMappingItem)

func (SliceData) ToService

Jump to

Keyboard shortcuts

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