Get desktop application:
View/edit binary Protocol Buffers messages
Next tag: 18
Time when quipper generated this perf data / protobuf, given as seconds since the epoch.
Records some stats about the serialized perf events.
Bit mask used to determine what metadata has been included. At the moment, only the first number is actually used. See adds_features in perf_reader.cc
Next tag: 7
Used in:
Aux offset.
Aux size.
Is the record was truncated to fit.
Does the record contain snapshot from overwrite mode.
Does the record contain gaps.
Info about the perf sample containing this event.
Next tag: 9
Used in:
Error type as defined by the enum auxtrace_error_type_name.
Intel PT or Intel BTS specific error code.
In per-cpu mode, the cpu this auxtrace error is associated with.
Process ID.
In per-thread mode, the tid this auxtrace error is associated with.
From instruction pointer.
Auxtrace error message.
Message's md5 prefix.
Next tag: 8
Used in:
Size of AUX area tracing buffer.
Offset as determined by aux_head / aux_tail members of struct perf_event_mmap_page.
Implementation specific reference determined when the data is recorded.
Index of AUX area tracing data buffer.
In per-thread mode, the tid this buffer is associated with.
In per-cpu mode, the cpu this buffer is associated with.
The trace data.
Next tag: 3
Used in:
Auxtrace type from the auxtrace_type enum in tools/perf/util/auxtrace.h.
Private data. WARNING: unparsed_binary_blob_priv_data contains unparsed private data specific to the type stored in the above field. This data is included to support serialization of a perf.data to perf_data.proto and deserialization of a perf_data.proto to perf.data. If this data is used for something other than the aforementioned usecase, this data has to be parsed based on the type. For example: If type == PERF_AUXTRACE_INTEL_PT, unparsed_binary_blob_priv_data contains fields filled by intel_pt_info_fill() function in the file tools/perf/arch/x86/util/intel-pt.c. If type == PERF_AUXTRACE_INTEL_BTS, unparsed_binary_blob_priv_data contains fields filled by intel_bts_info_fill() function in the file tools/perf/arch/x86/util/intel-bts.c. NOTE: Do not read this unparsed data directly. Quipper should be modified to parse the data into a new field before reading. Please contact developers of quipper to add support for parsing this data.
Next tag: 10
Used in:
Branch source address.
Branch destination address.
Indicates a mispredicted branch.
Indicates a predicted branch.
Indicates running in a hardware transaction
Indicates aborting a hardware transaction
Cycle count to last branch
Branch type.
Branch speculation info.
Next tag: 4
Used in:
Cgroup ID (file handle).
Cgroup path.
Info about the perf sample containing this event.
Next tag: 7
Used in:
Process id.
Thread id.
Comm string.
Comm string's md5 prefix.
Time the sample was taken. Deprecated, use |sample_info| instead.
Info about the perf sample containing this event.
Next tag: 5
Used in:
Indicates whether the context switch is in or out.
Next (switching out) or previous (switching in) pid.
Next (switching out) or previous (switching in) tid.
Info about the perf sample containing this event.
Next tag: 4
Used in:
Type of event.
Size of event.
ForkEvent is used for both FORK and EXIT events, which have the same data format. We don't want to call this "ForkOrExitEvent", in case a separate exit event is introduced in the future. Next tag: 12
Used in:
Forked process ID.
Parent process ID.
Forked process thread ID.
Parent process thread ID.
Time of fork event in nanoseconds since bootup.
Info about the perf sample containing this event.
Used in:
Next tag: 5
Used in:
Perf sample identifier.
Index associated with the sample identifier.
CPU associated with the sample identifier.
Thread ID associated with the sample identifier.
Next tag: 4
Used in:
Info about the perf sample containing this event.
Next tag: 7
Used in:
Address of kernel symbol.
Address length of kernel symbol.
Type of the kernel symbol. Currently the following types are available: PERF_RECORD_KSYMBOL_TYPE_BPF. More info in documentation: https://screenshot.googleplex.com/VZsTDGmoGqgHRDJ
Ksymbol flags. PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER is the only supported flag. More info in documentation: https://screenshot.googleplex.com/VZsTDGmoGqgHRDJ
Ksymbol name.
Info about the perf sample containing this event.
The kernel collects the number of events it couldn't send in a stretch and when possible sends this number in a PERF_RECORD_LOST event, which is stored in LostEvent. Next tag: 4
Used in:
ID of the event which has been lost. This should be an id found in a PerfFileAttr.
Number of events that were lost.
Info about the perf sample containing this event.
The kernel discards mixed up samples and sends the number in a PERF_RECORD_LOST_SAMPLES event. This event is stored in LostSamplesEvent. Next tag: 3
Used in:
Number of lost samples.
Info about the perf sample containing this event.
Represents both mmap_event and mmap2_event. Next tag: 18
Used in:
Process id.
Thread id.
Start address.
Length.
PG Offset.
Only in MMAP2 events, information about the mapped inode: Major/minor numbers Note that those the fields maj, min, ino, ino_generation should be unspecified if build_id is set.
Inode number and generation.
Only in MMAP2 events, the build ID of this mmap. The build_id is a HexString representation of the bytes in original perf.data (example value: "af2272facafc97e344e12aff495cbddd00000000"). Note that this field should be unspecified if any of the inode-related fields (maj, min, ino, ino_generation) are set.
Protection bits and flags.
Filename.
Filename's md5 prefix.
The root path is defined as the first two levels of directories starting from the root, e.g. /data/app, /system/lib.
Root path's md5 prefix. It helps to categorize filenames we could not recover by the filename_md5_prefix.
Info about the perf sample containing this event.
Next tag: 5
Used in:
PID of the process mapped to these namespaces.
TID of the process mapped to these namespaces.
Device/inode information per namespace up to NR_NAMESPACES.
Info about the perf sample containing this event.
Next tag: 8
Used in:
Misc field in perf_event_header.
Process ID.
Build id. Should always contain kBuildIDArraySize bytes of data. perf_reader.h defines kBuildIDArraySize = 20.
Filename.
Filename Md5sum prefix.
Build id size.
If the build ID event is injected through a filename -> build ID map of quipper's PerfReader::InjectBuildIDs(), i.e., the Build ID event is not in the original perf.data.
Next tag: 6
Used in:
Core siblings.
Core siblings' md5 prefixes.
Thread siblings.
Thread siblings' md5 prefixes.
Core ID and Socket ID per CPU.
Used in:
Core ID
Socket ID
Next tag: 27
Used in:
FORK and EXIT events are structurally identical. They only differ by the event type. But using two distinct fields allows us to differentiate between them without having to check the event type under |header|.
Time after boot in nanoseconds corresponding to the event.
Perf event attribute. Stores the event description. This data structure is defined in the linux kernel: $kernel/include/uapi/linux/perf_event.h. Next tag: 48
Used in:
Type of the event. Type is an enumeration and can be one of the values described at: $kernel/include/linux/perf_event.h. Example types are: PERF_TYPE_HARDWARE PERF_TYPE_SOFTWARE, etc.
Size of the event data in bytes.
The config stores the CPU-specific counter information.
Sample period of the event. Indicates how often the event is triggered in terms of # of events. After |sample_period| events, an event will be recorded and stored.
Sample frequency of the event. Indicates how often the event is triggered in terms of # per second. The kernel will try to record |sample_freq| events per second.
Sample type is a bitfield that records attributes of the sample. Example, whether an entire callchain was recorded, etc.
Bitfield that indicates whether reads on the counter will return the total time enabled and total time running.
Indicates whether the counter starts off disabled.
Indicates whether child processes inherit the counter.
Indicates whether the counter is pinned to a particular CPU.
Indicates whether this counter's group has exclusive access to the CPU's counters.
The following bits restrict events to be counted when the CPU is in user, kernel, hypervisor or idle modes.
Indicates whether mmap events should be recorded.
Indicates whether process comm information should be recorded upon process creation.
Indicates that we are in frequency mode, not period mode.
Indicates whether we have per-task counts.
Indicates whether we enable perf events after an exec() function call.
Indicates whether we trace fork/exit.
Indicates whether we are using a watermark to wake up.
CPUs often "skid" when recording events. That means the instruction pointer may not be the same as the one that caused the counter overflow. Indicates the capabilities of the CPU in terms of recording precise instruction pointer.
Indicates whether we have non-exec mmap data.
If set, all the event types will have the same sample_type.
Indicates whether we are counting events from the host (when running a VM).
Exclude events that happen on a guest OS.
Exclude kernel callchains.
Exclude user callchains.
Include mmap2 events that have inode data.
Flag comm events that are due to an exec.
Indicates whether or not to use @clockid for time fields.
Include context switch data.
Indicates whether ring buffer is written from end to beginning.
Include namespace data.
Include cgroup data.
Include ksymbol data.
Contains the number of events after which we wake up.
Contains the number of bytes after which we wake up.
Information about the type of the breakpoint.
Contains the breakpoint address.
This is an extension of config (see above).
The length of the breakpoint data in bytes.
This is an extension of config (see above).
Contains the type of branch, example: user, kernel, call, return, etc.
Defines set of user regs to dump on samples.
Defines size of the user stack to dump on samples.
Next tag: 8
Used in:
Total number of events read from perf data.
Total number of various types of events.
Number of sample events that were successfully mapped by the address mapper, a quipper module that is used to obscure addresses and convert them to DSO name + offset. Sometimes it fails to process sample events. This field allows us to track the success rate of the address mapper.
Whether address remapping was enabled.
Protobuf version of the perf_event_type struct found in perf/util/event.h. Contains the name of the event (such as "cycles" or "branch-misses") and the event id (which is not unique). Next tag: 4
Used in:
Event id. This is not unique across event types. The combination of the event id and the type field in PerfEventAttr is unique across event types.
Event name.
Event name's md5 prefix.
Describes a perf.data file attribute. Next tag: 3
Used in:
List of perf file attribute ids. Each id describes an event.
Next tag: 5
Used in:
Group name.
Group name's md5 prefix.
Group's leader index.
Number of members in the group.
Next tag: 5
Used in:
Name of the PMU device, e.g. software, cpu, cs_etm, etc.
A range of cpu numbers returned in various /sys/devices locations. e.g. "0-3", "0,3".
Same content as above, but as a list of numbers for ease of use.
Next tag: 3
Used in:
ID of device containing file.
inode number.
Next tag: 6
Used in:
Node id.
Total memory of the node.
Free memory of the node.
List of CPUs in the node.
CPU list's md5 prefix.
Next tag: 4
Used in:
Mapping type.
Mapping name.
Mapping name's md5 prefix.
Next tag: 3
Used in:
The trace event metadata.
Trace event metedata Md5sum prefix. Deprecated as md5prefix of blob data is not useful.
Next tag: 3
Used in:
Type of metadata, such as nrcpus.
uint32 data.
Next tag: 3
Used in:
Type of metadata, such as totalmem.
uint64 data.
Next tag: 8
Used in:
Process ID.
Thread ID.
Value of the event counter when it was queried.
Time enabled.
Time running.
ID.
Info about the perf sample containing this event.
Next tag: 4
Used in:
Based on the value of |PerfEventAttr::read_format & PERF_FORMAT_GROUP|, the read info could contain one or multiple read values and IDs. If the format is non-grouped, the repeated field will have only one entry.
Used in:
Next tag: 27
Used in:
Instruction pointer.
Process id.
Thread id.
The time after boot when the sample was recorded, in nanoseconds.
The address of the sample.
The id of the sample.
The stream id of the sample.
The period of the sample.
The CPU where the event was recorded.
The raw data for the event. Historically, the raw data itself was not stored in the perf_data.proto and so it's possible that only raw_size is set in which case the reader should assume all-zero raw data of the specified size. If raw field is present, then len(raw) == raw_size.
The read field.
Sample callchain info.
Branch stack info.
Sample weight for special events. Microarchitecture-dependent. On Intel Icelake and older, for load latency events, this is the "total" instruction issue-to-retire latency. On AMD, for IBS collections and load instructions, this is the cache latency.
Sample data source flags.
Sample transaction flags for special events.
Physical address of the sample.
Cgroup id.
Data page size
Code page size
No hw_idx collected in branch_stack.
Branch stack hw index, optional field in PERF_SAMPLE_BRANCH_STACK used when PERF_SAMPLE_BRANCH_HW_INDEX is set.
Weight struct.
This message contains information about a perf sample itself, as opposed to a perf event captured by a sample. Next tag: 7
Used in:
, , , , , , , , , , , ,Process ID / thread ID from which this sample was taken.
Time this sample was taken (NOT the same as an event time). It is the number of nanoseconds since bootup.
The ID of the sample's event type (cycles, instructions, etc). The event type IDs are defined in PerfFileAttr.
The CPU on which this sample was taken.
The stream id of the sample.
Next Tag: 2
Used in:
Key-value entries representing some fields of the struct perf_stat_config.
Next Tag: 3
Used in:
An enum value representing a field in the struct perf_stat_config.
Value of the field represented by the enum value in tag.
Next Tag: 7
Used in:
Perf sample identifier.
CPU for which the performance statistics was collected.
Thread for which the performance statistics was collected.
Counter value.
Number of times the counter was enabled.
Number of times the counter was running.
Next Tag: 3
Used in:
Type is an enumeration defining the type of stat round described at: $kernel/tools/perf/util/event.h. Example types are: PERF_STAT_ROUND_TYPE__INTERVAL PERF_STAT_ROUND_TYPE__FINAL
Time taken in nanoseconds by the type of stat round.
Next tag: 9
Used in:
Name of the machine, e.g. "localhost".
Kernel version, e.g. "3.4.0".
Perf version, e.g. "3.4.2642.g0aa604".
CPU architecture family, e.g. "x86_64".
CPU description, e.g. "Intel(R) Celeron(R) CPU 867 @ 1.30GHz".
CPU ID string, with the format: "$VENDOR,$FAMILY,$MODEL,$STEP"
Command line used to run perf to collect this profile. This is split into string tokens to reflect the way it is stored in the raw perf data. e.g. "perf record -a -- sleep 2" become stored as: { "perf", "record", "-a", "--", "sleep", "2" }
The command line stored as a single string.
Next tag: 3
Used in:
The string value.
The string value's md5sum prefix.
Next Tag: 2
Used in:
Next Tag: 4
Used in:
Thread name.
Thread name's md5 prefix.
Next tag: 5
Used in:
Time of throttle event, in nanoseconds since system startup.
Event ID.
Stream ID.
Info about the perf sample containing this event.
Time members to convert between TSC and perf time. Next tag: 8
Used in:
Time shift value.
Time multiplier.
Base time.
Fields added in perf 5.10.
WeightStruct is microarchitecture-dependent field, and represents sample weights for some special events. On Intel Sapphire Rapids and newer, with load latency events, the first field is the cache latency, and the second is the "total" instruction issue-to-retirement latency. On AMD, for IBS collections and only on load instructions, the first field is the cache latency, and the second is the "total" instruction issue-to-retirement latency. Next tag: 4
Used in:
First weight factor.
Second weight factor.
Third weight factor.
A proto mapping of PerfParserOptions, defined in perf_parser.h. See that definition for detail.
Next tag: 3
All lines printed by "perf stat".
The command line used to run "perf stat".
Represents one line of "perf stat" output. Next tag: 4
Used in:
Time since the start of the "perf stat" command, in milliseconds. When running "perf stat" and printing the counters at the end, this is the total time taken by the run. Alternatively, "perf stat" can print its stats at regular intervals until the end of the run. For example, if "perf stat" runs for one second and prints at 200-ms intervals, it will print counter values for each event a total of five times. According to "perf stat" usage instructions, the printing interval should be no less than 100 ms.
Current count value of the event being counted. May be different from the nominal counter value reported by "perf stat", depending on the event. For example, memory access counters are in units of 64 bytes. A counter value of 1024 would represent 65536 bytes, and we would set this field to 65536.
Name of event whose counter is listed on this line. This string should also appear as part of |PerfStatProto::command_line|. "perf stat" will preserve the event name exactly as it is passed in via the command line.