UNPKG

perfetto-protos

Version:

Perfetto protos exposed via protobuf-es for browser and node

312 lines 11.1 kB
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file protos/perfetto/trace/ftrace/ftrace_stats.proto. */ export declare const file_protos_perfetto_trace_ftrace_ftrace_stats: GenFile; /** * Per-CPU kernel buffer stats for the ftrace data source gathered from * /sys/kernel/tracing/per_cpu/cpuX/stats. * * @generated from message perfetto.protos.FtraceCpuStats */ export type FtraceCpuStats = Message<"perfetto.protos.FtraceCpuStats"> & { /** * CPU index. * * @generated from field: optional uint64 cpu = 1; */ cpu: bigint; /** * Number of entries currently in the kernel buffer. * * @generated from field: optional uint64 entries = 2; */ entries: bigint; /** * Number of events lost in kernel buffers due to overwriting of old events * before userspace had a chance to drain them. Valid if the buffer is in * "overwrite" mode, otherwise see |dropped_events|. * * @generated from field: optional uint64 overrun = 3; */ overrun: bigint; /** * This should always be zero. If not the buffer size is way too small or * something went wrong with the tracer. Quoting the kernel: "number of * commits failing due to the buffer wrapping around while there are * uncommitted events, such as during an interrupt storm". * * @generated from field: optional uint64 commit_overrun = 4; */ commitOverrun: bigint; /** * Size of entries currently in the kernel buffer (see |entries|) in bytes. * The field should be named "bytes", but is misnamed for historical reasons. * This value has known inaccuracies before Linux v6.6: * https://github.com/torvalds/linux/commit/45d99ea * * @generated from field: optional uint64 bytes_read = 5; */ bytesRead: bigint; /** * The timestamp for the oldest event still in the ring buffer. * Unit: seconds for typical trace clocks (i.e. not tsc/counter). * * @generated from field: optional double oldest_event_ts = 6; */ oldestEventTs: number; /** * The current timestamp. * Unit: seconds for typical trace clocks (i.e. not tsc/counter). * * @generated from field: optional double now_ts = 7; */ nowTs: number; /** * If the kernel buffer has overwrite mode disabled, this will show the number * of new events that were lost because the buffer was full. This is similar * to |overrun| but only for the overwrite=false case. * * @generated from field: optional uint64 dropped_events = 8; */ droppedEvents: bigint; /** * The number of events read (consumed) from the buffer by userspace. * * @generated from field: optional uint64 read_events = 9; */ readEvents: bigint; }; /** * Describes the message perfetto.protos.FtraceCpuStats. * Use `create(FtraceCpuStatsSchema)` to create a new message. */ export declare const FtraceCpuStatsSchema: GenMessage<FtraceCpuStats>; /** * Kprobe statistical data, gathered from /sys/kernel/tracing/kprobe_profile. * * @generated from message perfetto.protos.FtraceKprobeStats */ export type FtraceKprobeStats = Message<"perfetto.protos.FtraceKprobeStats"> & { /** * Cumulative number of kprobe events generated for this function * * @generated from field: optional int64 hits = 1; */ hits: bigint; /** * Cumulative number of kprobe events that could not be generated for this * function and were missed. This happens when too much nesting * happens between a kprobe and its kretprobe, overflowing the * maxactives buffer. * * @generated from field: optional int64 misses = 2; */ misses: bigint; }; /** * Describes the message perfetto.protos.FtraceKprobeStats. * Use `create(FtraceKprobeStatsSchema)` to create a new message. */ export declare const FtraceKprobeStatsSchema: GenMessage<FtraceKprobeStats>; /** * Errors and kernel buffer stats for the ftrace data source. * * @generated from message perfetto.protos.FtraceStats */ export type FtraceStats = Message<"perfetto.protos.FtraceStats"> & { /** * A pair of FtraceStats is written on every trace flush: * * START_OF_TRACE - stats recorded at the beginning of the trace. * * END_OF_TRACE - stats recorded during the flush. In other words shortly * before this packet was written. For simple traces this * will be once at the end of the trace. * * @generated from field: optional perfetto.protos.FtraceStats.Phase phase = 1; */ phase: FtraceStats_Phase; /** * Per-CPU stats (one entry for each CPU). * * @generated from field: repeated perfetto.protos.FtraceCpuStats cpu_stats = 2; */ cpuStats: FtraceCpuStats[]; /** * When FtraceConfig.symbolize_ksyms = true, this records the number of * symbols parsed from /proc/kallsyms, whether they have been seen in the * trace or not. It can be used to debug kptr_restrict or security-related * errors. * Note: this will be valid only when phase = END_OF_TRACE. The symbolizer is * initialized. When START_OF_TRACE is emitted it is not ready yet. * * @generated from field: optional uint32 kernel_symbols_parsed = 3; */ kernelSymbolsParsed: number; /** * The memory used by the kernel symbolizer (KernelSymbolMap.size_bytes()). * * @generated from field: optional uint32 kernel_symbols_mem_kb = 4; */ kernelSymbolsMemKb: number; /** * Atrace errors (even non-fatal ones) are reported here. A typical example is * one or more atrace categories not available on the device. * * @generated from field: optional string atrace_errors = 5; */ atraceErrors: string; /** * Ftrace events requested by the config but not present on device. * * @generated from field: repeated string unknown_ftrace_events = 6; */ unknownFtraceEvents: string[]; /** * Ftrace events requested by the config and present on device, but which we * failed to enable due to permissions, or due to a conflicting option * (currently FtraceConfig.disable_generic_events). * * @generated from field: repeated string failed_ftrace_events = 7; */ failedFtraceEvents: string[]; /** * The data source was configured to preserve existing events in the ftrace * buffer before the start of the trace. * * @generated from field: optional bool preserve_ftrace_buffer = 8; */ preserveFtraceBuffer: boolean; /** * Unique errors encountered during reading and parsing of the raw ftrace * data. Ring buffer ABI related errors will also be recorded in the * affected FtraceEventBundles with a timestamp. * Any traces with entries in this field should be investigated, as they * indicate a bug in perfetto or the kernel. * * @generated from field: repeated perfetto.protos.FtraceParseStatus ftrace_parse_errors = 9; */ ftraceParseErrors: FtraceParseStatus[]; /** * Kprobe profile stats for functions hits and misses * * @generated from field: optional perfetto.protos.FtraceKprobeStats kprobe_stats = 10; */ kprobeStats?: FtraceKprobeStats; }; /** * Describes the message perfetto.protos.FtraceStats. * Use `create(FtraceStatsSchema)` to create a new message. */ export declare const FtraceStatsSchema: GenMessage<FtraceStats>; /** * @generated from enum perfetto.protos.FtraceStats.Phase */ export declare enum FtraceStats_Phase { /** * @generated from enum value: UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * @generated from enum value: START_OF_TRACE = 1; */ START_OF_TRACE = 1, /** * @generated from enum value: END_OF_TRACE = 2; */ END_OF_TRACE = 2 } /** * Describes the enum perfetto.protos.FtraceStats.Phase. */ export declare const FtraceStats_PhaseSchema: GenEnum<FtraceStats_Phase>; /** * @generated from enum perfetto.protos.FtraceParseStatus */ export declare enum FtraceParseStatus { /** * @generated from enum value: FTRACE_STATUS_UNSPECIFIED = 0; */ FTRACE_STATUS_UNSPECIFIED = 0, /** * Not written, used for convenience of implementation: * * @generated from enum value: FTRACE_STATUS_OK = 1; */ FTRACE_STATUS_OK = 1, /** * Issues with reading data out of the ftrace ring buffer: * * @generated from enum value: FTRACE_STATUS_UNEXPECTED_READ_ERROR = 2; */ FTRACE_STATUS_UNEXPECTED_READ_ERROR = 2, /** * @generated from enum value: FTRACE_STATUS_PARTIAL_PAGE_READ = 3; */ FTRACE_STATUS_PARTIAL_PAGE_READ = 3, /** * Ring buffer binary data not matching our understanding of the layout: * * @generated from enum value: FTRACE_STATUS_ABI_INVALID_PAGE_HEADER = 4; */ FTRACE_STATUS_ABI_INVALID_PAGE_HEADER = 4, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_EVENT_HEADER = 5; */ FTRACE_STATUS_ABI_SHORT_EVENT_HEADER = 5, /** * @generated from enum value: FTRACE_STATUS_ABI_NULL_PADDING = 6; */ FTRACE_STATUS_ABI_NULL_PADDING = 6, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_PADDING_LENGTH = 7; */ FTRACE_STATUS_ABI_SHORT_PADDING_LENGTH = 7, /** * @generated from enum value: FTRACE_STATUS_ABI_INVALID_PADDING_LENGTH = 8; */ FTRACE_STATUS_ABI_INVALID_PADDING_LENGTH = 8, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_TIME_EXTEND = 9; */ FTRACE_STATUS_ABI_SHORT_TIME_EXTEND = 9, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_TIME_STAMP = 10; */ FTRACE_STATUS_ABI_SHORT_TIME_STAMP = 10, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_DATA_LENGTH = 11; */ FTRACE_STATUS_ABI_SHORT_DATA_LENGTH = 11, /** * @generated from enum value: FTRACE_STATUS_ABI_ZERO_DATA_LENGTH = 12; */ FTRACE_STATUS_ABI_ZERO_DATA_LENGTH = 12, /** * @generated from enum value: FTRACE_STATUS_ABI_INVALID_DATA_LENGTH = 13; */ FTRACE_STATUS_ABI_INVALID_DATA_LENGTH = 13, /** * @generated from enum value: FTRACE_STATUS_ABI_SHORT_EVENT_ID = 14; */ FTRACE_STATUS_ABI_SHORT_EVENT_ID = 14, /** * @generated from enum value: FTRACE_STATUS_ABI_END_OVERFLOW = 15; */ FTRACE_STATUS_ABI_END_OVERFLOW = 15, /** * Issues with parsing the event payload: * * @generated from enum value: FTRACE_STATUS_SHORT_COMPACT_EVENT = 16; */ FTRACE_STATUS_SHORT_COMPACT_EVENT = 16, /** * @generated from enum value: FTRACE_STATUS_INVALID_EVENT = 17; */ FTRACE_STATUS_INVALID_EVENT = 17 } /** * Describes the enum perfetto.protos.FtraceParseStatus. */ export declare const FtraceParseStatusSchema: GenEnum<FtraceParseStatus>; //# sourceMappingURL=ftrace_stats_pb.d.ts.map