/* automatically generated by rust-bindgen 0.72.1 */

pub const PERFETTO_STREAM_WRITER_PATCH_SIZE: u32 = 4;
pub const PERFETTO_BACKEND_IN_PROCESS: _bindgen_ty_1 = 1;
pub const PERFETTO_BACKEND_SYSTEM: _bindgen_ty_1 = 2;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
pub type PerfettoBackendTypes = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoStreamWriterImpl {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoStreamWriter {
    pub impl_: *mut PerfettoStreamWriterImpl,
    pub begin: *mut u8,
    pub end: *mut u8,
    pub write_ptr: *mut u8,
    pub written_previously: usize,
}
unsafe extern "C" {
    pub fn PerfettoStreamWriterUpdateWritePtr(arg1: *mut PerfettoStreamWriter);
}
unsafe extern "C" {
    pub fn PerfettoStreamWriterNewChunk(arg1: *mut PerfettoStreamWriter);
}
unsafe extern "C" {
    pub fn PerfettoStreamWriterAppendBytesSlowpath(
        arg1: *mut PerfettoStreamWriter,
        src: *const u8,
        size: usize,
    );
}
unsafe extern "C" {
    pub fn PerfettoStreamWriterAnnotatePatch(
        arg1: *mut PerfettoStreamWriter,
        patch_addr: *mut u8,
    ) -> *mut u8;
}
unsafe extern "C" {
    pub fn PerfettoStreamWriterReserveBytesSlowpath(arg1: *mut PerfettoStreamWriter, size: usize);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsImpl {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsTlsImpl {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsTracerImpl {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub static mut perfetto_atomic_false: bool;
}
pub type PerfettoDsInstanceIndex = u32;
unsafe extern "C" {
    pub fn PerfettoDsImplCreate() -> *mut PerfettoDsImpl;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsOnSetupArgs {
    _unused: [u8; 0],
}
pub type PerfettoDsOnSetupCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
        ds_config: *mut ::std::os::raw::c_void,
        ds_config_size: usize,
        user_arg: *mut ::std::os::raw::c_void,
        args: *mut PerfettoDsOnSetupArgs,
    ) -> *mut ::std::os::raw::c_void,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsOnStartArgs {
    _unused: [u8; 0],
}
pub type PerfettoDsOnStartCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
        user_arg: *mut ::std::os::raw::c_void,
        inst_ctx: *mut ::std::os::raw::c_void,
        args: *mut PerfettoDsOnStartArgs,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsOnStopArgs {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsAsyncStopper {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn PerfettoDsOnStopArgsPostpone(
        arg1: *mut PerfettoDsOnStopArgs,
    ) -> *mut PerfettoDsAsyncStopper;
}
unsafe extern "C" {
    pub fn PerfettoDsStopDone(arg1: *mut PerfettoDsAsyncStopper);
}
pub type PerfettoDsOnStopCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
        user_arg: *mut ::std::os::raw::c_void,
        inst_ctx: *mut ::std::os::raw::c_void,
        args: *mut PerfettoDsOnStopArgs,
    ),
>;
pub type PerfettoDsOnDestroyCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        user_arg: *mut ::std::os::raw::c_void,
        inst_ctx: *mut ::std::os::raw::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsOnFlushArgs {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsAsyncFlusher {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn PerfettoDsOnFlushArgsPostpone(
        arg1: *mut PerfettoDsOnFlushArgs,
    ) -> *mut PerfettoDsAsyncFlusher;
}
unsafe extern "C" {
    pub fn PerfettoDsFlushDone(arg1: *mut PerfettoDsAsyncFlusher);
}
pub type PerfettoDsOnFlushCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
        user_arg: *mut ::std::os::raw::c_void,
        inst_ctx: *mut ::std::os::raw::c_void,
        args: *mut PerfettoDsOnFlushArgs,
    ),
>;
pub type PerfettoDsOnCreateCustomState = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
        tracer: *mut PerfettoDsTracerImpl,
        user_arg: *mut ::std::os::raw::c_void,
    ) -> *mut ::std::os::raw::c_void,
>;
pub type PerfettoDsOnDeleteCustomState =
    ::std::option::Option<unsafe extern "C" fn(obj: *mut ::std::os::raw::c_void)>;
pub type PerfettoDsOnClearCustomState = ::std::option::Option<
    unsafe extern "C" fn(
        obj: *mut ::std::os::raw::c_void,
        user_arg: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
unsafe extern "C" {
    pub fn PerfettoDsSetOnSetupCallback(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnSetupCb);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnStartCallback(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnStartCb);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnStopCallback(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnStopCb);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnDestroyCallback(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnDestroyCb);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnFlushCallback(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnFlushCb);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnCreateTls(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnCreateCustomState);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnDeleteTls(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnDeleteCustomState);
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnCreateIncr(
        arg1: *mut PerfettoDsImpl,
        arg2: PerfettoDsOnCreateCustomState,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnDeleteIncr(
        arg1: *mut PerfettoDsImpl,
        arg2: PerfettoDsOnDeleteCustomState,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsSetOnClearIncr(arg1: *mut PerfettoDsImpl, arg2: PerfettoDsOnClearCustomState);
}
unsafe extern "C" {
    pub fn PerfettoDsSetCbUserArg(arg1: *mut PerfettoDsImpl, user_arg: *mut ::std::os::raw::c_void);
}
pub const PerfettoDsBufferExhaustedPolicy_PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_DROP:
    PerfettoDsBufferExhaustedPolicy = 0;
pub const PerfettoDsBufferExhaustedPolicy_PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_ABORT:
    PerfettoDsBufferExhaustedPolicy = 1;
pub const PerfettoDsBufferExhaustedPolicy_PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_DROP:
    PerfettoDsBufferExhaustedPolicy = 2;
pub type PerfettoDsBufferExhaustedPolicy = ::std::os::raw::c_uint;
unsafe extern "C" {
    pub fn PerfettoDsSetBufferExhaustedPolicy(arg1: *mut PerfettoDsImpl, policy: u32) -> bool;
}
unsafe extern "C" {
    pub fn PerfettoDsSetBufferExhaustedPolicyConfigurable(
        arg1: *mut PerfettoDsImpl,
        configurable: bool,
    ) -> bool;
}
unsafe extern "C" {
    pub fn PerfettoDsImplRegister(
        ds_impl: *mut PerfettoDsImpl,
        enabled_ptr: *mut *mut bool,
        descriptor: *const ::std::os::raw::c_void,
        descriptor_size: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn PerfettoDsImplUpdateDescriptor(
        ds_impl: *mut PerfettoDsImpl,
        descriptor: *const ::std::os::raw::c_void,
        descriptor_size: usize,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsImplGetInstanceLocked(
        ds_impl: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn PerfettoDsImplReleaseInstanceLocked(
        ds_impl: *mut PerfettoDsImpl,
        inst_id: PerfettoDsInstanceIndex,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsImplGetCustomTls(
        ds_impl: *mut PerfettoDsImpl,
        tracer: *mut PerfettoDsTracerImpl,
        inst_id: PerfettoDsInstanceIndex,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn PerfettoDsImplGetIncrementalState(
        ds_impl: *mut PerfettoDsImpl,
        tracer: *mut PerfettoDsTracerImpl,
        inst_id: PerfettoDsInstanceIndex,
    ) -> *mut ::std::os::raw::c_void;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoDsImplTracerIterator {
    pub inst_id: PerfettoDsInstanceIndex,
    pub tls: *mut PerfettoDsTlsImpl,
    pub tracer: *mut PerfettoDsTracerImpl,
}
unsafe extern "C" {
    pub fn PerfettoDsImplTraceIterateBegin(
        ds_impl: *mut PerfettoDsImpl,
    ) -> PerfettoDsImplTracerIterator;
}
unsafe extern "C" {
    pub fn PerfettoDsImplTraceIterateNext(
        ds_impl: *mut PerfettoDsImpl,
        iterator: *mut PerfettoDsImplTracerIterator,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsImplTraceIterateBreak(
        ds_impl: *mut PerfettoDsImpl,
        iterator: *mut PerfettoDsImplTracerIterator,
    );
}
unsafe extern "C" {
    pub fn PerfettoDsTracerImplPacketBegin(
        tracer: *mut PerfettoDsTracerImpl,
    ) -> PerfettoStreamWriter;
}
unsafe extern "C" {
    pub fn PerfettoDsTracerImplPacketEnd(
        tracer: *mut PerfettoDsTracerImpl,
        writer: *mut PerfettoStreamWriter,
    );
}
pub type PerfettoDsTracerOnFlushCb =
    ::std::option::Option<unsafe extern "C" fn(user_arg: *mut ::std::os::raw::c_void)>;
unsafe extern "C" {
    pub fn PerfettoDsTracerImplFlush(
        tracer: *mut PerfettoDsTracerImpl,
        cb: PerfettoDsTracerOnFlushCb,
        user_arg: *mut ::std::os::raw::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoHeapBuffer {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn PerfettoHeapBufferCreate(arg1: *mut PerfettoStreamWriter) -> *mut PerfettoHeapBuffer;
}
unsafe extern "C" {
    pub fn PerfettoHeapBufferCopyInto(
        arg1: *mut PerfettoHeapBuffer,
        arg2: *mut PerfettoStreamWriter,
        dst: *mut ::std::os::raw::c_void,
        size: usize,
    );
}
unsafe extern "C" {
    pub fn PerfettoHeapBufferDestroy(
        arg1: *mut PerfettoHeapBuffer,
        arg2: *mut PerfettoStreamWriter,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoPbDecoder {
    pub read_ptr: *const u8,
    pub end_ptr: *const u8,
}
pub const PerfettoPbDecoderStatus_PERFETTO_PB_DECODER_OK: PerfettoPbDecoderStatus = 0;
pub const PerfettoPbDecoderStatus_PERFETTO_PB_DECODER_DONE: PerfettoPbDecoderStatus = 1;
pub const PerfettoPbDecoderStatus_PERFETTO_PB_DECODER_ERROR: PerfettoPbDecoderStatus = 2;
pub type PerfettoPbDecoderStatus = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoPbDecoderDelimitedField {
    pub start: *const u8,
    pub len: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PerfettoPbDecoderField {
    pub status: u32,
    pub wire_type: u32,
    pub id: u32,
    pub value: PerfettoPbDecoderField__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union PerfettoPbDecoderField__bindgen_ty_1 {
    pub delimited: PerfettoPbDecoderDelimitedField,
    pub integer64: u64,
    pub integer32: u32,
    pub double_val: f64,
    pub float_val: f32,
}
unsafe extern "C" {
    pub fn PerfettoPbDecoderParseField(decoder: *mut PerfettoPbDecoder) -> PerfettoPbDecoderField;
}
unsafe extern "C" {
    pub fn PerfettoPbDecoderSkipField(decoder: *mut PerfettoPbDecoder) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoProducerBackendInitArgs {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn PerfettoProducerBackendInitArgsCreate() -> *mut PerfettoProducerBackendInitArgs;
}
unsafe extern "C" {
    pub fn PerfettoProducerBackendInitArgsSetShmemSizeHintKb(
        arg1: *mut PerfettoProducerBackendInitArgs,
        size: u32,
    );
}
unsafe extern "C" {
    pub fn PerfettoProducerBackendInitArgsDestroy(arg1: *mut PerfettoProducerBackendInitArgs);
}
unsafe extern "C" {
    pub fn PerfettoProducerSystemInit(args: *const PerfettoProducerBackendInitArgs);
}
unsafe extern "C" {
    pub fn PerfettoProducerInProcessInit(args: *const PerfettoProducerBackendInitArgs);
}
unsafe extern "C" {
    pub fn PerfettoProducerActivateTriggers(
        trigger_names: *mut *const ::std::os::raw::c_char,
        ttl_ms: u32,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTracingSessionImpl {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionSystemCreate() -> *mut PerfettoTracingSessionImpl;
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionInProcessCreate() -> *mut PerfettoTracingSessionImpl;
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionSetup(
        arg1: *mut PerfettoTracingSessionImpl,
        cfg_begin: *mut ::std::os::raw::c_void,
        cfg_len: usize,
    );
}
pub type PerfettoTracingSessionStopCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoTracingSessionImpl,
        user_arg: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn PerfettoTracingSessionSetStopCb(
        arg1: *mut PerfettoTracingSessionImpl,
        cb: PerfettoTracingSessionStopCb,
        user_arg: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionStartAsync(arg1: *mut PerfettoTracingSessionImpl);
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionStartBlocking(arg1: *mut PerfettoTracingSessionImpl);
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionStopAsync(arg1: *mut PerfettoTracingSessionImpl);
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionStopBlocking(arg1: *mut PerfettoTracingSessionImpl);
}
pub type PerfettoTracingSessionFlushCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoTracingSessionImpl,
        success: bool,
        user_arg: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn PerfettoTracingSessionFlushAsync(
        arg1: *mut PerfettoTracingSessionImpl,
        timeout_ms: u32,
        cb: PerfettoTracingSessionFlushCb,
        user_arg: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionFlushBlocking(
        arg1: *mut PerfettoTracingSessionImpl,
        timeout_ms: u32,
    ) -> bool;
}
pub type PerfettoTracingSessionReadCb = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoTracingSessionImpl,
        data: *const ::std::os::raw::c_void,
        size: usize,
        has_more: bool,
        user_arg: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn PerfettoTracingSessionReadTraceBlocking(
        arg1: *mut PerfettoTracingSessionImpl,
        cb: PerfettoTracingSessionReadCb,
        user_arg: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn PerfettoTracingSessionDestroy(arg1: *mut PerfettoTracingSessionImpl);
}
unsafe extern "C" {
    pub fn PerfettoTeInit();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeCategoryDescriptor {
    pub name: *const ::std::os::raw::c_char,
    pub desc: *const ::std::os::raw::c_char,
    pub tags: *mut *const ::std::os::raw::c_char,
    pub num_tags: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeCategoryImpl {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub static mut perfetto_te_any_categories: *mut PerfettoTeCategoryImpl;
}
unsafe extern "C" {
    pub static mut perfetto_te_any_categories_enabled: *mut bool;
}
unsafe extern "C" {
    pub fn PerfettoTeCategoryImplCreate(
        desc: *mut PerfettoTeCategoryDescriptor,
    ) -> *mut PerfettoTeCategoryImpl;
}
unsafe extern "C" {
    pub fn PerfettoTePublishCategories();
}
unsafe extern "C" {
    pub fn PerfettoTeCategoryImplGetEnabled(arg1: *mut PerfettoTeCategoryImpl) -> *mut bool;
}
pub type PerfettoTeCategoryImplCallback = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut PerfettoTeCategoryImpl,
        inst_id: PerfettoDsInstanceIndex,
        created: bool,
        global_state_changed: bool,
        user_arg: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn PerfettoTeCategoryImplSetCallback(
        cat: *mut PerfettoTeCategoryImpl,
        cb: PerfettoTeCategoryImplCallback,
        user_arg: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn PerfettoTeCategoryImplGetIid(cat: *mut PerfettoTeCategoryImpl) -> u64;
}
unsafe extern "C" {
    pub fn PerfettoTeCategoryImplDestroy(arg1: *mut PerfettoTeCategoryImpl);
}
pub const PerfettoTeTimestampType_PERFETTO_TE_TIMESTAMP_TYPE_MONOTONIC: PerfettoTeTimestampType = 3;
pub const PerfettoTeTimestampType_PERFETTO_TE_TIMESTAMP_TYPE_BOOT: PerfettoTeTimestampType = 6;
pub const PerfettoTeTimestampType_PERFETTO_TE_TIMESTAMP_TYPE_INCREMENTAL: PerfettoTeTimestampType =
    64;
pub const PerfettoTeTimestampType_PERFETTO_TE_TIMESTAMP_TYPE_ABSOLUTE: PerfettoTeTimestampType = 65;
pub type PerfettoTeTimestampType = ::std::os::raw::c_uint;
pub const PERFETTO_I_CLOCK_INCREMENTAL_UNDERNEATH: _bindgen_ty_2 = 6;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeTimestamp {
    pub clock_id: u32,
    pub value: u64,
}
unsafe extern "C" {
    pub fn PerfettoTeGetTimestamp() -> PerfettoTeTimestamp;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeRegisteredTrackImpl {
    pub descriptor: *mut ::std::os::raw::c_void,
    pub descriptor_size: usize,
    pub uuid: u64,
}
unsafe extern "C" {
    pub static mut perfetto_te_process_track_uuid: u64;
}
pub const PerfettoTeType_PERFETTO_TE_TYPE_SLICE_BEGIN: PerfettoTeType = 1;
pub const PerfettoTeType_PERFETTO_TE_TYPE_SLICE_END: PerfettoTeType = 2;
pub const PerfettoTeType_PERFETTO_TE_TYPE_INSTANT: PerfettoTeType = 3;
pub const PerfettoTeType_PERFETTO_TE_TYPE_COUNTER: PerfettoTeType = 4;
pub type PerfettoTeType = ::std::os::raw::c_uint;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_CSTR: PerfettoTeHlProtoFieldType = 0;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_BYTES: PerfettoTeHlProtoFieldType =
    1;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_NESTED: PerfettoTeHlProtoFieldType =
    2;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_VARINT: PerfettoTeHlProtoFieldType =
    3;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_FIXED64: PerfettoTeHlProtoFieldType =
    4;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_FIXED32: PerfettoTeHlProtoFieldType =
    5;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_DOUBLE: PerfettoTeHlProtoFieldType =
    6;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_FLOAT: PerfettoTeHlProtoFieldType =
    7;
pub const PerfettoTeHlProtoFieldType_PERFETTO_TE_HL_PROTO_TYPE_CSTR_INTERNED:
    PerfettoTeHlProtoFieldType = 8;
pub type PerfettoTeHlProtoFieldType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoField {
    pub type_: PerfettoTeHlProtoFieldType,
    pub id: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldCstr {
    pub header: PerfettoTeHlProtoField,
    pub str_: *const ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldCstrInterned {
    pub header: PerfettoTeHlProtoField,
    pub str_: *const ::std::os::raw::c_char,
    pub interned_type_id: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldBytes {
    pub header: PerfettoTeHlProtoField,
    pub buf: *const ::std::os::raw::c_void,
    pub len: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldNested {
    pub header: PerfettoTeHlProtoField,
    pub fields: *const *mut PerfettoTeHlProtoField,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldVarInt {
    pub header: PerfettoTeHlProtoField,
    pub value: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldFixed64 {
    pub header: PerfettoTeHlProtoField,
    pub value: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldFixed32 {
    pub header: PerfettoTeHlProtoField,
    pub value: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldDouble {
    pub header: PerfettoTeHlProtoField,
    pub value: f64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlProtoFieldFloat {
    pub header: PerfettoTeHlProtoField,
    pub value: f32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union PerfettoTeHlProtoFieldUnion {
    pub field_cstr: PerfettoTeHlProtoFieldCstr,
    pub field_bytes: PerfettoTeHlProtoFieldBytes,
    pub field_nested: PerfettoTeHlProtoFieldNested,
    pub field_varint: PerfettoTeHlProtoFieldVarInt,
    pub field_fixed64: PerfettoTeHlProtoFieldFixed64,
    pub field_fixed32: PerfettoTeHlProtoFieldFixed32,
    pub field_double: PerfettoTeHlProtoFieldDouble,
    pub field_float: PerfettoTeHlProtoFieldFloat,
    pub field_cstr_interned: PerfettoTeHlProtoFieldCstrInterned,
}
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_REGISTERED_TRACK: PerfettoTeHlExtraType =
    1;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_NAMED_TRACK: PerfettoTeHlExtraType = 2;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_TIMESTAMP: PerfettoTeHlExtraType = 3;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DYNAMIC_CATEGORY: PerfettoTeHlExtraType =
    4;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_COUNTER_INT64: PerfettoTeHlExtraType = 5;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_COUNTER_DOUBLE: PerfettoTeHlExtraType = 6;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_BOOL: PerfettoTeHlExtraType = 7;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_UINT64: PerfettoTeHlExtraType =
    8;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_INT64: PerfettoTeHlExtraType =
    9;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_DOUBLE: PerfettoTeHlExtraType =
    10;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_STRING: PerfettoTeHlExtraType =
    11;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_DEBUG_ARG_POINTER: PerfettoTeHlExtraType =
    12;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_FLOW: PerfettoTeHlExtraType = 13;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_TERMINATING_FLOW: PerfettoTeHlExtraType =
    14;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_FLUSH: PerfettoTeHlExtraType = 15;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_NO_INTERN: PerfettoTeHlExtraType = 16;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_PROTO_FIELDS: PerfettoTeHlExtraType = 17;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_PROTO_TRACK: PerfettoTeHlExtraType = 18;
pub const PerfettoTeHlExtraType_PERFETTO_TE_HL_EXTRA_TYPE_NESTED_TRACKS: PerfettoTeHlExtraType = 19;
pub type PerfettoTeHlExtraType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtra {
    pub type_: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraRegisteredTrack {
    pub header: PerfettoTeHlExtra,
    pub track: *const PerfettoTeRegisteredTrackImpl,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraNamedTrack {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub id: u64,
    pub parent_uuid: u64,
    pub is_name_static: bool,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraTimestamp {
    pub header: PerfettoTeHlExtra,
    pub timestamp: PerfettoTeTimestamp,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDynamicCategory {
    pub header: PerfettoTeHlExtra,
    pub desc: *const PerfettoTeCategoryDescriptor,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraCounterInt64 {
    pub header: PerfettoTeHlExtra,
    pub value: i64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraCounterDouble {
    pub header: PerfettoTeHlExtra,
    pub value: f64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union PerfettoTeHlExtraCounterUnion {
    pub counter_int64: PerfettoTeHlExtraCounterInt64,
    pub counter_double: PerfettoTeHlExtraCounterDouble,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgBool {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: bool,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgUint64 {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgInt64 {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: i64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgDouble {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: f64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgString {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: *const ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraDebugArgPointer {
    pub header: PerfettoTeHlExtra,
    pub name: *const ::std::os::raw::c_char,
    pub value: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union PerfettoTeHlExtraDebugArgUnion {
    pub arg_bool: PerfettoTeHlExtraDebugArgBool,
    pub arg_uint64: PerfettoTeHlExtraDebugArgUint64,
    pub arg_int64: PerfettoTeHlExtraDebugArgInt64,
    pub arg_double: PerfettoTeHlExtraDebugArgDouble,
    pub arg_string: PerfettoTeHlExtraDebugArgString,
    pub arg_pointer: PerfettoTeHlExtraDebugArgPointer,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraFlow {
    pub header: PerfettoTeHlExtra,
    pub id: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraProtoFields {
    pub header: PerfettoTeHlExtra,
    pub fields: *const *mut PerfettoTeHlProtoField,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraProtoTrack {
    pub header: PerfettoTeHlExtra,
    pub uuid: u64,
    pub fields: *const *mut PerfettoTeHlProtoField,
}
pub const PerfettoTeHlNestedTrackType_PERFETTO_TE_HL_NESTED_TRACK_TYPE_NAMED:
    PerfettoTeHlNestedTrackType = 1;
pub const PerfettoTeHlNestedTrackType_PERFETTO_TE_HL_NESTED_TRACK_TYPE_PROTO:
    PerfettoTeHlNestedTrackType = 2;
pub const PerfettoTeHlNestedTrackType_PERFETTO_TE_HL_NESTED_TRACK_TYPE_REGISTERED:
    PerfettoTeHlNestedTrackType = 3;
pub const PerfettoTeHlNestedTrackType_PERFETTO_TE_HL_NESTED_TRACK_TYPE_THREAD:
    PerfettoTeHlNestedTrackType = 4;
pub const PerfettoTeHlNestedTrackType_PERFETTO_TE_HL_NESTED_TRACK_TYPE_PROCESS:
    PerfettoTeHlNestedTrackType = 5;
pub type PerfettoTeHlNestedTrackType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlNestedTrack {
    pub type_: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlNestedTrackNamed {
    pub header: PerfettoTeHlNestedTrack,
    pub name: *const ::std::os::raw::c_char,
    pub id: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlNestedTrackProto {
    pub header: PerfettoTeHlNestedTrack,
    pub id: u64,
    pub fields: *const *mut PerfettoTeHlProtoField,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlNestedTrackRegistered {
    pub header: PerfettoTeHlNestedTrack,
    pub track: *const PerfettoTeRegisteredTrackImpl,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeHlExtraNestedTracks {
    pub header: PerfettoTeHlExtra,
    pub tracks: *const *mut PerfettoTeHlNestedTrack,
}
unsafe extern "C" {
    pub fn PerfettoTeHlEmitImpl(
        cat: *mut PerfettoTeCategoryImpl,
        type_: i32,
        name: *const ::std::os::raw::c_char,
        extra_data: *const *mut PerfettoTeHlExtra,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeLlImplIncr {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeLlImplTls {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PerfettoTeLlImplIterator {
    pub ds: PerfettoDsImplTracerIterator,
    pub incr: *mut PerfettoTeLlImplIncr,
    pub tls: *mut PerfettoTeLlImplTls,
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplBegin(
        cat: *mut PerfettoTeCategoryImpl,
        ts: PerfettoTeTimestamp,
    ) -> PerfettoTeLlImplIterator;
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplNext(
        cat: *mut PerfettoTeCategoryImpl,
        ts: PerfettoTeTimestamp,
        iterator: *mut PerfettoTeLlImplIterator,
    );
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplBreak(
        arg1: *mut PerfettoTeCategoryImpl,
        arg2: *mut PerfettoTeLlImplIterator,
    );
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplDynCatEnabled(
        tracer: *mut PerfettoDsTracerImpl,
        inst_id: PerfettoDsInstanceIndex,
        dyn_cat: *const PerfettoTeCategoryDescriptor,
    ) -> bool;
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplTrackSeen(arg1: *mut PerfettoTeLlImplIncr, uuid: u64) -> bool;
}
unsafe extern "C" {
    pub fn PerfettoTeLlImplIntern(
        incr: *mut PerfettoTeLlImplIncr,
        type_: i32,
        data: *const ::std::os::raw::c_void,
        data_size: usize,
        seen: *mut bool,
    ) -> u64;
}
