Interface ITraceCategory2
interface ITraceCategory2
Extends ITraceCategory
ITraceCategory2 interface extends ITraceCategory to add new API calls
Methods
endWithArgs()
Creates a tracepoint with trace_type “end”, along with the passed parameters. Using this end API will add additional debug arguments to the associated begin tracepoint. The name and category provided in this end method should match that in the begin method to denote they belong to the same trace session. If args are being passed by associated begin call, if the same arg key is passed in this end call, the arg value associated with the begin call will be overwritten.voidendWithArgs(stringname,string[]args)
Parameters
name
string — Required
The name of the tracepoint
args
string[] — Required
Debug arguments that must come as a key-value pair.
endAsyncWithArgs()
Create a tracepoint with trace_type “end”, along with the passed parameters. This tracepoint is used to track an application on a thread. The name, category, and cookie provided in this end method should match that in the begin method to denote they belong to the same trace session. If args are being passed with associated begin call, if the same arg key is passed in this end call, the begin associated arg value will be overwritten.voidendAsyncWithArgs(i32cookie,stringname,string[]args)
Parameters
cookie
i32 — Required
Thread id.
name
string — Required
The name of the tracepoint.
args
string[] — Required
Debug arguments that must come as a key-value pair.
endWithFlow()
Create a tracepoint with trace_type “end”, this call does not pass any debug arguments. This tracepoint will be associated with a flowId, denoting that two (or more) tracepoints are connected. If the flowId is unique, then this tracepoint will be the start of the flow, otherwise this tracepoint will be connected to the previous tracepoint with the same flowId. If scope is globalScope, the caller is responsible for ensuring that it’s globally-unique (e.g. by generating a random value). This should be used only for flow events which cross the process boundary (e.g. IPCs). Otherwise, the given flowId is xor’ed with Perfetto’s internal process track id to attempt to ensure that it’s globally unique. The name and category provided in this end method should match that in the begin method to denote they belong to the same trace session. If the begin call also creates a Flow, if the two FlowIds are different, the flows will branch off into different tracepoints.voidendWithFlow(stringname,i32flowId,ScopeTypescope)
Parameters
name
string — Required
The name of the tracepoint.
flowId
i32 — Required
Id to denote that two (or more) tracepoints are related.
scope
ScopeType — Required
ScopeType enum used to declare if globally or process scoped.
endWithFlowArgs()
Create a tracepoint with trace_type “end” along with the passed parameters. This tracepoint will be associated with a flowId, denoting that two (or more) tracepoints are connected. If the flowId is unique, then this tracepoint will be the start of the flow, otherwise this tracepoint will be connected to the previous tracepoint with the same flowId. If scope is globalScope, the caller is responsible for ensuring that it’s globally-unique (e.g. by generating a random value). This should be used only for flow events which cross the process boundary (e.g. IPCs). Otherwise, the given flowId is xor’ed with Perfetto’s internal process track id to attempt to ensure that it’s globally unique. The name and category provided in this end method should match that in the begin method to denote they belong to the same trace session. If args are being passed by associated begin call, if the same arg key is passed in this end call, the begin associated arg value will be overwritten If the begin call also creates a Flow, if the two FlowIds are different, the flows will branch off into different tracepoints.voidendWithFlowArgs(stringname,i32flowId,string[]args,ScopeTypescope)
Parameters
name
string — Required
The name of the tracepoint.
flowId
i32 — Required
Id to denote that two (or more) tracepoints are related.
args
string[] — Required
Debug arguments that must come as a key-value pair.
scope
ScopeType — Required
ScopeType enum used to declare if globally or process scoped.
endWithTerminateFlow()
Create a tracepoint with trace_type “end”, this call does not pass any debug arguments. This tracepoint will also end the Flow associated with the flowId, releasing the Id allowing it to be reused. If scope is globalScope, the caller is responsible for ensuring that it’s globally-unique (e.g. by generating a random value). This should be used only for flow events which cross the process boundary (e.g. IPCs). Otherwise, the given flowId is xor’ed with Perfetto’s internal process track id to attempt to ensure that it’s globally unique. The name and category provided in this end method should match that in the end method to denote they belong to the same trace session.voidendWithTerminateFlow(stringname,i32flowId,ScopeTypescope)
Parameters
name
string — Required
The name of the tracepoint.
flowId
i32 — Required
The Id of the Flow to terminate.
scope
ScopeType — Required
ScopeType enum used to declare if globally or process scoped.
endWithTerminateFlowArgs()
Create a tracepoint with trace_type “end” along with the passed parameters. This tracepoint will also end the Flow associated with the flowId, releasing the Id allowing it to be reused. If scope is globalScope, the caller is responsible for ensuring that it’s globally-unique (e.g. by generating a random value). This should be used only for flow events which cross the process boundary (e.g. IPCs). Otherwise, the given flowId is xor’ed with Perfetto’s internal process track id to attempt to ensure that it’s globally unique. The name and category provided in this end method should match that in the end method to denote they belong to the same trace session. If args are being passed by associated begin call, if the same arg key is passed in this end call, the begin associated arg value will be overwritten.voidendWithTerminateFlowArgs(stringname,i32flowId,string[]args,ScopeTypescope)
Parameters
name
string — Required
The name of the tracepoint.
flowId
i32 — Required
The Id of the Flow to terminate.
args
string[] — Required
Debug arguments that must come as a key-value pair.
scope
ScopeType — Required
ScopeType enum used to declare if globally or process scoped.
Constants
UIKIT_KS
string="uikit_ks"
UIKIT_APP
string="uikit_app"
UIKIT
string="uikit"
UIKIT_KS_COMMON
string="uikit_ks_common"

