-
Notifications
You must be signed in to change notification settings - Fork 710
VPP cpel
- 1 CPEL Performance Event Log Files
- 2 File Format
- 3 Section Formats
- 4 Track Definition Section - Section Type 4
- 5 Event Section - Section Type 5
This page describes the CPEL file format. Over the last decade, we've constructed a set of tools to collect, display and report fine-grained performance event data. As the toolset has grown, limitations inherent in previous file formats have become an issue.
CPEL files consist of a set of sections, similar to ELF-files. Specific tools may or may not understand a particular section. Sections are TLV's: (tag, length, value) tuples. Specific tools can skip or copy sections without needing to know anything about the data therein.
| Octet offset | Data |
| 0x0 | Endian bit (0x80), File Version, 7 bits (0x1...0x7F) |
| 0x1 | Unused, 8 bits |
| 0x2-0x3 | Number of sections (16 bits) (NSECTIONS) |
| 0x4 | File date (32-bits) (POSIX "epoch" format) |
| 0x8 | Type of first section (32 bits) |
| 0xC | Length of first section (32 bits), not including type and length |
| 0x10 | First section data |
| NSECTIONS-1, or up to 64K-2 additional sections | |
| ... | Type of next section (32 bits) |
| ... | Length of next section (32 bits) |
| ... | Next section data |
- When set, the endian bit (0x80 of the first octet of the file) means that data throughout the file is in little endian byte order. Tools SHOULD support little-endian data but may not. Tools MUST either support little-endian data or announce that they do not.
- The [historical] Gist event-log format is easily distinguished from this format. Gist event-logs are big-endian; the first 4 octets of the file contain the number of events in the file. Therefore, Gist event-logs containing less than 2**24 [?16 million] events will always appear to have a CPEL version of zero. Due to TFTP-server limitations, one strongly suspects that all extant Gist event-logs contain less than 2**24 events.
- Sections may appear in any order
CPEL files are intended to stand alone, meaning that one should not need to preserve event definition header files, remember CPU clock rates, and so forth to use the data later. In addition to beefing up the event section type, we define additional section types to enable additional functions in the G2 graphical event viewer.
String table sections concatenate NULL terminated strings and (possibly) arbitrary binary data. The first string in a string table is the table s name. Event definition and event sections refer to strings in a string section by offset from the base of the section.
String table sections MUST be padded to a 4-octet boundary by the addition of 1-3 NULL bytes, as needed.
Tools, particularly visualization tools such as the g2 event viewer MUST support multiple string sections. Tools MAY choose to combine string tables.
Symbol table sections allow tools to translate arbitrary hexadecimal values into function+offset format. Symbol table sections MUST be numerically sorted by the value field. The section data portion of a symbol table section has the following format:
struct symbol_section_header {
char string_table_name[64];
unsigned long number_of_symbols;
};
struct symbol_section_entry {
unsigned long value;
unsigned long name_offset_in_string_table;
};
See the next section for a usage description.
Event definition sections provide display and formatting information for events found in event sections. The section data portion of an event definition section has the following format:
struct event_definition_section_header {
char string_table_name[64];
unsigned long number_of_event_definitions;
};
struct event_definition_entry {
unsigned long event_code;
unsigned long event_format_offset_in_string_table;
unsigned long datum_format_offset_in_string_table;
};
These definitions generalize the stylized header-file definition scheme a bit by completely decoupling event formatting from datum formatting.
String sections enable visualization and reporting tools to neatly represent text events [e.g. syslog strings]. Symbol table sections function likewise when reporting hexadecimal data in routine+offset format.
Visualization tools SHOULD interpret the following printf-like (sub)strings as described:
| Format String | Interpretation |
| %s | String -- insert the indicated string-table entry |
| %k | Symbol -- find nearest match in symbol table, output routine+offset format |
| %d, %o, %u, %x, etc. | Standard printf formats |
Specifying an event_format_offset_in_string_table of zero is equivalent to specifying an event format of E%d. Specifying a datum_format_offset_in_string_table of zero is equivalent to specifying a datum format of [NULL string, prints nothing]. The former behavior is less useful than the latter, which one often uses in practice.
Visualization tools SHOULD interpret missing event definitions as equivalent to specifying the definition [code, StringTableOffset(E%d), 0]
Visualization tools MAY implement arbitrary extended formatting functions. Examples might include symbolic display of protocol PDUs, IP addresses, and arbitrary data structures. Data which occupies more than 4 octets must be added to an event section's associated string table, and referred to in individual events by string section offset.
Embedding arbitrary binary data in a string section should not cause confusion.
This document is not the right venue for defining a meta-language to specify arbitrary bit-fiddling, mapping values to strings, etc. Reporting and visualization tools deal with millions of events. Tool performance is of importance. One expects that a useful set of extended formatting functions will evolve.
Tools MAY interpret multiple printf-like format strings in the following manner:
sprintf(buf, "0x%08x(%d)", event->event_datum, event->event_datum);
Track definition sections provide display and formatting information for track data found in event sections. Visualization tools such as the g2 viewer display events grouped by track. The idea is to provide a means to label per-track displays with something more interesting than the numeric track-id.
For example, if a given CPEL file comprises event data where the track field is the process-id of a specific process, one might choose to display the name of the process in addition to its numeric PID.
struct track_definition_section_header {
char string_table_name[64];
unsigned long number_of_track_definitions;
};
struct track_definition {
unsigned long track_id;
unsigned long track_format_offset_in_string_table;
};
Event sections contain fine-grained performance event data, in the following format:
struct event_section_header {
char string_table_name[64];
unsigned long number_of_events;
unsigned long clock_ticks_per_microsecond;
};
struct event_entry {
unsigned long time[2];
unsigned long track;
unsigned long event_code;
unsigned long event_datum;
};
The event_entry format is identical to the format understood by our current generation reporting and visualization tools. In cooperation with reporting and visualization tools, string table references allow (track, event_code, event_datum) tuples to specify three arbitrary data, of arbitrary size.
- VPP 2022 Make Test Use Case Poll
- VPP-AArch64
- VPP-ABF
- VPP Alternative Builds
- VPP API Concepts
- VPP API Versioning
- VPP-ApiChangeProcess
- VPP-ArtifactVersioning
- VPP-BIER
- VPP-Bihash
- VPP-BugReports
- VPP Build System Deep Dive
- VPP Build, Install, And Test Images
- VPP-BuildArtifactRetentionPolicy
- VPP-c2cpel
- VPP Code Walkthrough VoD
- VPP Code Walkthrough VoD Topic Index
- VPP Code Walkthrough VoDs
- VPP-CodeStyleConventions
- VPP-CodingTips
- VPP Command Line Arguments
- VPP Command Line Interface CLI Guide
- VPP-CommitMessages
- VPP-Committers-SMEs
- VPP-CommitterTasks-ApiFreeze
- VPP CommitterTasks Compare API Changes
- VPP-CommitterTasks-CutPointRelease
- VPP-CommitterTasks-CutRelease
- VPP-CommitterTasks-FinalReleaseCandidate
- VPP-CommitterTasks-PullThrottleBranch
- VPP-CommitterTasks-ReleasePlan
- VPP Configuration Tool
- VPP Configure An LW46 MAP E Terminator
- VPP Configure VPP As A Router Between Namespaces
- VPP Configure VPP TAP Interfaces For Container Routing
- VPP-CoreFileMismatch
- VPP-cpel
- VPP-cpeldump
- VPP-CurrentData
- VPP-DHCPKit
- VPP-DHCPv6
- VPP-DistributedOwnership
- VPP-Documentation
- VPP DPOs And Feature Arcs
- VPP EC2 Instance With SRIOV
- VPP-elog
- VPP-FAQ
- VPP Feature Arcs
- VPP-Features
- VPP-Features-IPv6
- VPP-FIB
- VPP-g2
- VPP Getting VPP 16.06
- VPP Getting VPP Release Binaries
- VPP-HA
- VPP-HostStack
- VPP-HostStack-BuiltinEchoClientServer
- VPP-HostStack-EchoClientServer
- VPP-HostStack-ExternalEchoClientServer
- VPP HostStack Hs Test
- VPP-HostStack-LDP-iperf
- VPP-HostStack-LDP-nginx
- VPP-HostStack-LDP-sshd
- VPP-HostStack-nginx
- VPP-HostStack-SessionLayerArchitecture
- VPP-HostStack-TestHttpServer
- VPP-HostStack-TestProxy
- VPP-HostStack-TLS
- VPP-HostStack-VCL
- VPP-HostStack-VclEchoClientServer
- VPP-Hotplug
- VPP How To Add A Tunnel Encapsulation
- VPP How To Build The Sample Plugin
- VPP How To Connect A PCI Interface To VPP
- VPP How To Create A VPP Binary Control Plane API
- VPP How To Deploy VPP In EC2 Instance And Use It To Connect Two Different VPCs
- VPP How To Optimize Performance %28System Tuning%29
- VPP How To Use The API Trace Tools
- VPP How To Use The C API
- VPP How To Use The Packet Generator And Packet Tracer
- VPP-Howtos
- VPP-index
- VPP Installing VPP Binaries From Packages
- VPP Interconnecting vRouters With VPP
- VPP Introduction To IP Adjacency
- VPP Introduction To N Tuple Classifiers
- VPP IP Adjacency Introduction
- VPP-IPFIX
- VPP-IPSec
- VPP IPSec And IKEv2
- VPP IPv6 SR VIRL Topology File
- VPP Java API
- VPP Java API Plugin Support
- VPP Jira Workflow
- VPP-Macswapplugin
- VPP-MakeTestFramework
- VPP-Meeting
- VPP-MFIB
- VPP Missing Prefetches
- VPP Modifying The Packet Processing Directed Graph
- VPP MPLS FIB
- VPP-NAT
- VPP Nataas Test
- VPP-OVN
- VPP Per Feature Notes
- VPP Performance Analysis Tools
- VPP-perftop
- VPP Progressive VPP Tutorial
- VPP Project Meeting Minutes
- VPP Pulling, Building, Running, Hacking And Pushing VPP Code
- VPP Pure L3 Between Namespaces With 32s
- VPP Pure L3 Container Networking
- VPP Pushing And Testing A Tag
- VPP Python API
- VPP-PythonVersionPolicy
- VPP-QuickTrexSetup
- VPP Random Hints And Kinks For KVM Usage
- VPP Release Plans Release Plan 16.09
- VPP Release Plans Release Plan 17.01
- VPP Release Plans Release Plan 17.04
- VPP Release Plans Release Plan 17.07
- VPP Release Plans Release Plan 17.10
- VPP Release Plans Release Plan 18.01
- VPP Release Plans Release Plan 18.04
- VPP Release Plans Release Plan 18.07
- VPP Release Plans Release Plan 18.10
- VPP Release Plans Release Plan 19.01
- VPP Release Plans Release Plan 19.04
- VPP Release Plans Release Plan 19.08
- VPP Release Plans Release Plan 20.01
- VPP Release Plans Release Plan 20.05
- VPP Release Plans Release Plan 20.09
- VPP Release Plans Release Plan 21.01
- VPP Release Plans Release Plan 21.06
- VPP Release Plans Release Plan 21.10
- VPP Release Plans Release Plan 22.02
- VPP Release Plans Release Plan 22.06
- VPP Release Plans Release Plan 22.10
- VPP Release Plans Release Plan 23.02
- VPP Release Plans Release Plan 23.06
- VPP Release Plans Release Plan 23.10
- VPP Release Plans Release Plan 24.02
- VPP Release Plans Release Plan 24.06
- VPP Release Plans Release Plan 24.10
- VPP Release Plans Release Plan 25.02
- VPP Release Plans Release Plan 25.06
- VPP Release Plans Release Plan 25.10
- VPP Release Plans Release Plan 26.02
- VPP Release Plans Release Plan 26.06
- VPP-RM
- VPP-SecurityGroups
- VPP Segment Routing For IPv6
- VPP Segment Routing For MPLS
- VPP Setting Up Your Dev Environment
- VPP-SNAT
- VPP Software Architecture
- VPP STN Testing
- VPP The VPP API
- VPP Training Events
- VPP-Troubleshooting
- VPP-Troubleshooting-BuildIssues
- VPP-Troubleshooting-Vagrant
- VPP Tutorial DPDK And MacSwap
- VPP Tutorial Routing And Switching
- VPP-Tutorials
- VPP Use VPP To Chain VMs Using Vhost User Interface
- VPP Use VPP To Connect VMs Using Vhost User Interface
- VPP Using mTCP User Mode TCP Stack With VPP
- VPP Using VPP As A VXLAN Tunnel Terminator
- VPP Using VPP In A Multi Thread Model
- VPP-VOM
- VPP VPP BFD Nexus
- VPP VPP Home Gateway
- VPP VPP WIKI DEPRECATED CONTENT
- VPP-VPPCommunicationsLibrary
- VPP-VPPConfig
- VPP What Is ODP4VPP
- VPP What Is VPP
- VPP Working Environments
- VPP Working With The 16.06 Throttle Branch