tracepoint_perf

Crates.iotracepoint_perf
lib.rstracepoint_perf
version0.4.1
created_at2025-02-28 19:50:25.87594+00
updated_at2025-02-28 19:50:25.87594+00
descriptionRust API for reading and writing perf.data files
homepage
repositoryhttps://github.com/microsoft/LinuxTracepoints-Rust
max_upload_size
id1573102
size162,434
Kyle Sabo (Robo210)

documentation

README

perf.data file format

This crate provides support for reading and writing files compatible with the perf.data files generated by the Linux perf tool.

Core types:

  • PerfDataFileReader supports enumerating the headers and events from a perf.data file. It exposes the data using types from the tracepoint_decode crate, making it easy to decode the resulting events and their fields.
  • PerfDataFileWriter supports writing a perf.data file containing caller-supplied headers and event data. It includes support for synthesizing some of the more commonly-used headers from tracepoint_decode metadata types, including the TRACING_DATA and EVENT_DESC headers.

Examples:

  • decode_perf: demonstrates using PerfDataFileReader along with the types from the tracepoint_decode crate to decode a perf.data file and write it as text to stdout.
  • decode_perf_to_json: expands on the decode_perf sample and converts event data to JSON.
  • rewrite_perf: demonstrates using PerfDataFileWriter, generating a new perf.data file using content from an existing perf.data file.
Commit count: 54

cargo fmt