Module perfcnt::linux::perf_format [] [src]

Contains the various data format structures as used by perf

In order to parse these structures from perf files or perf MMAP buffers, please have a look at the functions in parser.rs.

Structs

BranchEntry
BuildIdRecord
CommRecord
Cpu

Generic CPU description. Used in many different perf structures.

CpuTopology
Event
EventAttr
EventAttrFlags
EventDesc
EventHeader
ExitRecord

This record indicates a process exit event.

ForkRecord

This record indicates a fork event.

GroupDesc
HeaderFlags
LostRecord
MMAP2Record
MMAPRecord

The MMAP events record the PROT_EXEC mappings so that we can correlate user-space IPs to code.

NrCpus
NumaNode
PerfFileHeader
PerfFileSection
PmuMapping
ReadFormat

We use the same read format for READ_FORMAT_GROUP and non-grouped reads for simplicity

ReadFormatFlags
ReadRecord
SampleFormatFlags
SampleId
SampleRecord

This record indicates a sample.

ThreadId

Unique thread descriptor. Used in many different perf structures.

ThrottleRecord
UnthrottleRecord

Enums

EventAttrType
EventData
EventType
HeaderFlag

Constants

EVENT_ATTR_COMM

include comm data

EVENT_ATTR_DISABLED

off by default

EVENT_ATTR_ENABLE_ON_EXEC

next exec enables

EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL

exclude kernel callchains

EVENT_ATTR_EXCLUDE_CALLCHAIN_USER

exclude user callchains

EVENT_ATTR_EXCLUDE_GUEST

don't count in guest

EVENT_ATTR_EXCLUDE_HOST

don't count in host

EVENT_ATTR_EXCLUDE_HV

ditto hypervisor

EVENT_ATTR_EXCLUDE_IDLE

don't count when idle

EVENT_ATTR_EXCLUDE_KERNEL

ditto kernel

EVENT_ATTR_EXCLUDE_USER

don't count user

EVENT_ATTR_EXCLUSIVE

only group on PMU

EVENT_ATTR_FREQ

use freq, not period

EVENT_ATTR_INHERIT

children inherit it

EVENT_ATTR_INHERIT_STAT

per task counts

EVENT_ATTR_MMAP

include mmap data

EVENT_ATTR_MMAP2

include mmap with inode data

EVENT_ATTR_MMAP_DATA

non-exec mmap data

EVENT_ATTR_PINNED

must always be on PMU

EVENT_ATTR_SAMPLE_ID_ALL

sample_type all events

EVENT_ATTR_SAMPLE_IP_ARBITRARY_SKID

SAMPLE_IP can have arbitrary skid

EVENT_ATTR_SAMPLE_IP_CONSTANT_SKID

SAMPLE_IP must have constant skid

EVENT_ATTR_SAMPLE_IP_REQ_ZERO_SKID

SAMPLE_IP requested to have 0 skid

EVENT_ATTR_SAMPLE_IP_ZERO_SKID

SAMPLE_IP must have 0 skid

EVENT_ATTR_TASK

trace fork/exit

EVENT_ATTR_WATERMARK

wakeup_watermark

FORMAT_GROUP

Allows all counter values in an event group to be read with one read.

FORMAT_ID

Adds a 64-bit unique value that corresponds to the event group.

FORMAT_TOTAL_TIME_ENABLED

Adds the 64-bit time_enabled field. This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening.

FORMAT_TOTAL_TIME_RUNNING

Adds the 64-bit time_running field. This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening.

PERF_SAMPLE_ADDR

Records an address, if applicable.

PERF_SAMPLE_BRANCH_STACK

This provides a record of recent branches, as provided by CPU branch sampling hardware (such as Intel Last Branch Record). Not all hardware supports this feature. See the branch_sample_type field for how to filter which branches are reported.

PERF_SAMPLE_CALLCHAIN

Records the callchain (stack backtrace).

PERF_SAMPLE_CPU

Records CPU number.

PERF_SAMPLE_DATA_SRC

Records the data source: where in the memory hierarchy the data associated with the sampled instruction came from. This is only available if the underlying hardware supports this feature.

PERF_SAMPLE_ID

Records a unique ID for the opened event's group leader.

PERF_SAMPLE_IDENTIFIER
PERF_SAMPLE_IP

Records instruction pointer.

PERF_SAMPLE_PERIOD

Records the current sampling period.

PERF_SAMPLE_RAW

Records additional data, if applicable. Usually returned by tracepoint events.

PERF_SAMPLE_READ

Record counter values for all events in a group, not just the group leader.

PERF_SAMPLE_REGS_INTR
PERF_SAMPLE_REGS_USER

Records the current user-level CPU register state (the values in the process before the kernel was called).

PERF_SAMPLE_STACK_USER

Records the user level stack, allowing stack unwinding.

PERF_SAMPLE_STREAM_ID

Records a unique ID for the opened event. Unlike PERF_SAMPLE_ID the actual ID is returned, not the group leader. This ID is the same as the one returned by PERF_FORMAT_ID.

PERF_SAMPLE_TID

Records the process and thread IDs.

PERF_SAMPLE_TIME

Records a timestamp.

PERF_SAMPLE_TRANSACTION
PERF_SAMPLE_WEIGHT

Records a hardware provided weight value that expresses how costly the sampled event was. This allows the hardware to highlight expensive events in a profile.