Difference between revisions of "VPP/cpel"
From fd.io
								< VPP
												
				 (Created page with "=== CPEL Performance Event Log Files ===  This page describes the CPEL file format.  Over the last decade, we've constructed a set of tools to collect, display and report fine...")  | 
				|||
| Line 6: | Line 6: | ||
=== File Format ===  | === File Format ===  | ||
| + | This table describes the CPEL file format.  | ||
| + | |||
| + | {|  | ||
| + | |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  | ||
| + | |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  | ||
| + | |...  | ||
| + | |}  | ||
Revision as of 15:34, 12 February 2016
CPEL Performance Event Log Files
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.
File Format
This table describes the CPEL file format.
| 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 | 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 | ... |