Crate hitrace_sys

Crate hitrace_sys 

Source
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 12
  • api-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§

HiTraceIdapi-12
Defines a HiTraceId instance.
HiTraceId_Validapi-12
Defines whether a HiTraceId instance is valid.
HiTrace_Communication_Modeapi-12
Enumerates the HiTrace communication modes.
HiTrace_Flagapi-12
Enumerates the HiTrace flags.
HiTrace_Output_Levelapi-19
Enumerates the HiTrace output levels. The output level threshold system parameter determines the minimum output trace.
HiTrace_Versionapi-12
Enumerates the HiTrace version numbers.
__BindgenBitfieldUnit

Enums§

HiTrace_Tracepoint_Typeapi-12
Enumerates the HiTrace trace point types.

Functions§

OH_HiTrace_BeginChainapi-12
Starts tracing of a process.
OH_HiTrace_ClearIdapi-12
Clears the trace ID of the calling thread and invalidates it.
OH_HiTrace_CountTrace
Traces the value change of an integer variable based on its name.
OH_HiTrace_CountTraceExapi-19
Traces the value change of an integer variable based on its name with output level control.
OH_HiTrace_CreateSpanapi-12
Creates a span ID based on the trace ID of the calling thread.
OH_HiTrace_EnableFlagapi-12
Enables the specified trace flag in a HiTraceId instance.
OH_HiTrace_EndChainapi-12
Ends tracing and clears the HiTraceId instance of the calling thread from the TLS.
OH_HiTrace_FinishAsyncTrace
Marks the end of an asynchronous trace task.
OH_HiTrace_FinishAsyncTraceExapi-19
Marks the end of an asynchronous trace task with output level control.
OH_HiTrace_FinishTrace
Marks the end of a synchronous trace task.
OH_HiTrace_FinishTraceExapi-19
Marks the end of a synchronous trace task with output level control.
OH_HiTrace_GetChainIdapi-12
Obtains the trace chain ID.
OH_HiTrace_GetFlagsapi-12
Obtains the trace flag set in a HiTraceId instance.
OH_HiTrace_GetIdapi-12
Obtains the trace ID of the calling thread from the TLS.
OH_HiTrace_GetParentSpanIdapi-12
Obtains the parent span ID in a HiTraceId instance.
OH_HiTrace_GetSpanIdapi-12
Obtains the span ID in a HiTraceId instance.
OH_HiTrace_IdFromBytesapi-12
Creates a HiTraceId structure based on a byte array.
OH_HiTrace_IdToBytesapi-12
Converts a HiTraceId instance into a byte array for caching or communication.
OH_HiTrace_InitIdapi-12
Initializes a HiTraceId structure.
OH_HiTrace_IsFlagEnabledapi-12
Checks whether the specified trace flag in a HiTraceId instance is enabled.
OH_HiTrace_IsIdValidapi-12
Checks whether a HiTraceId instance is valid.
OH_HiTrace_IsTraceEnabledapi-19
Get the trace output status of the calling process.
OH_HiTrace_SetChainIdapi-12
Sets the trace chain ID to a HiTraceId instance
OH_HiTrace_SetFlagsapi-12
Sets the trace flag for a HiTraceId instance.
OH_HiTrace_SetIdapi-12
Sets the trace ID of the calling thread. If the ID is invalid, no operation is performed.
OH_HiTrace_SetParentSpanIdapi-12
Sets the parent span ID in a HiTraceId instance.
OH_HiTrace_SetSpanIdapi-12
Sets the span ID in a HiTraceId instance.
OH_HiTrace_StartAsyncTrace
Marks the start of an asynchronous trace task.
OH_HiTrace_StartAsyncTraceExapi-19
Marks the start of an asynchronous trace task with output level control.
OH_HiTrace_StartTrace
Marks the start of a synchronous trace task.
OH_HiTrace_StartTraceExapi-19
Marks the start of a synchronous trace task with output level control.
OH_HiTrace_Tracepointapi-12
Prints HiTrace information, including the trace ID.