Expand description
Raw bindings for the HiTrace tracing system on OpenHarmony
The official Hitrace NDK guidelines describe the available API. Rust users should likely not use this crate directly, but instead use an abstraction on top of this crate.
§Feature flags
§OpenHarmony API level
This crate by default exposes bindings for API-level 10.
Optionally enable one of the api-* features to get access to bindings for newer
OpenHarmony versions.
api-10(enabled by default) — No effect. API-10 bindings can’t be deselected. The feature exists for internal purposes.api-11— Enables bindings for OpenHarmony API-level 11 (No additions)api-12— Enables bindings for OpenHarmony API-level 12api-13— Enables bindings for OpenHarmony API-level 13 (No changes)api-14— Enables bindings for OpenHarmony API-level 14 (No changes)api-15— Enables bindings for OpenHarmony API-level 15 (No changes)api-16— Enables bindings for OpenHarmony API-level 16 (No changes).api-17— Enables bindings for OpenHarmony API-level 17 (No changes).api-18— Enables bindings for OpenHarmony API-level 18 (No changes).api-19— Enables bindings for OpenHarmony API-level 19. (No changes)api-20— Enables bindings for OpenHarmony API-level 20. (No changes)api-21— Enables bindings for OpenHarmony API-level 21.
Structs§
- HiTrace
Id api-12 - Defines a HiTraceId instance.
- HiTrace
Id_ Valid api-12 - Defines whether a HiTraceId instance is valid.
- HiTrace_
Communication_ Mode api-12 - Enumerates the HiTrace communication modes.
- HiTrace_
Flag api-12 - Enumerates the HiTrace flags.
- HiTrace_
Output_ Level api-19 - Enumerates the HiTrace output levels. The output level threshold system parameter determines the minimum output trace.
- HiTrace_
Version api-12 - Enumerates the HiTrace version numbers.
- __
Bindgen Bitfield Unit
Enums§
- HiTrace_
Tracepoint_ Type api-12 - Enumerates the HiTrace trace point types.
Functions§
- OH_
HiTrace_ ⚠Begin Chain api-12 - Starts tracing of a process.
- OH_
HiTrace_ ⚠Clear Id api-12 - Clears the trace ID of the calling thread and invalidates it.
- OH_
HiTrace_ ⚠Count Trace - Traces the value change of an integer variable based on its name.
- OH_
HiTrace_ ⚠Count Trace Ex api-19 - Traces the value change of an integer variable based on its name with output level control.
- OH_
HiTrace_ ⚠Create Span api-12 - Creates a span ID based on the trace ID of the calling thread.
- OH_
HiTrace_ ⚠Enable Flag api-12 - Enables the specified trace flag in a HiTraceId instance.
- OH_
HiTrace_ ⚠EndChain api-12 - Ends tracing and clears the HiTraceId instance of the calling thread from the TLS.
- OH_
HiTrace_ ⚠Finish Async Trace - Marks the end of an asynchronous trace task.
- OH_
HiTrace_ ⚠Finish Async Trace Ex api-19 - Marks the end of an asynchronous trace task with output level control.
- OH_
HiTrace_ ⚠Finish Trace - Marks the end of a synchronous trace task.
- OH_
HiTrace_ ⚠Finish Trace Ex api-19 - Marks the end of a synchronous trace task with output level control.
- OH_
HiTrace_ ⚠GetChain Id api-12 - Obtains the trace chain ID.
- OH_
HiTrace_ ⚠GetFlags api-12 - Obtains the trace flag set in a HiTraceId instance.
- OH_
HiTrace_ ⚠GetId api-12 - Obtains the trace ID of the calling thread from the TLS.
- OH_
HiTrace_ ⚠GetParent Span Id api-12 - Obtains the parent span ID in a HiTraceId instance.
- OH_
HiTrace_ ⚠GetSpan Id api-12 - Obtains the span ID in a HiTraceId instance.
- OH_
HiTrace_ ⚠IdFrom Bytes api-12 - Creates a HiTraceId structure based on a byte array.
- OH_
HiTrace_ ⚠IdTo Bytes api-12 - Converts a HiTraceId instance into a byte array for caching or communication.
- OH_
HiTrace_ ⚠Init Id api-12 - Initializes a HiTraceId structure.
- OH_
HiTrace_ ⚠IsFlag Enabled api-12 - Checks whether the specified trace flag in a HiTraceId instance is enabled.
- OH_
HiTrace_ ⚠IsId Valid api-12 - Checks whether a HiTraceId instance is valid.
- OH_
HiTrace_ ⚠IsTrace Enabled api-19 - Get the trace output status of the calling process.
- OH_
HiTrace_ ⚠SetChain Id api-12 - Sets the trace chain ID to a HiTraceId instance
- OH_
HiTrace_ ⚠SetFlags api-12 - Sets the trace flag for a HiTraceId instance.
- OH_
HiTrace_ ⚠SetId api-12 - Sets the trace ID of the calling thread. If the ID is invalid, no operation is performed.
- OH_
HiTrace_ ⚠SetParent Span Id api-12 - Sets the parent span ID in a HiTraceId instance.
- OH_
HiTrace_ ⚠SetSpan Id api-12 - Sets the span ID in a HiTraceId instance.
- OH_
HiTrace_ ⚠Start Async Trace - Marks the start of an asynchronous trace task.
- OH_
HiTrace_ ⚠Start Async Trace Ex api-19 - Marks the start of an asynchronous trace task with output level control.
- OH_
HiTrace_ ⚠Start Trace - Marks the start of a synchronous trace task.
- OH_
HiTrace_ ⚠Start Trace Ex api-19 - Marks the start of a synchronous trace task with output level control.
- OH_
HiTrace_ ⚠Tracepoint api-12 - Prints HiTrace information, including the trace ID.