8 releases

0.4.0 Apr 12, 2024
0.3.5 Feb 27, 2024
0.3.4 Nov 27, 2023
0.3.2 Jul 24, 2023
0.1.0 May 9, 2023

#246 in Unix APIs

Download history 23/week @ 2024-08-18 51/week @ 2024-08-25 15/week @ 2024-09-01 124/week @ 2024-09-08 25/week @ 2024-09-15 36/week @ 2024-09-22 106/week @ 2024-09-29 8/week @ 2024-10-06 24/week @ 2024-10-13 23/week @ 2024-10-20 30/week @ 2024-10-27 17/week @ 2024-11-03 127/week @ 2024-11-10 21/week @ 2024-11-17 97/week @ 2024-11-24 105/week @ 2024-12-01

351 downloads per month
Used in 4 crates

MIT license

165KB
1.5K SLoC

EventHeader for Rust

Crates.io Documentation MIT licensed Build Status maintenance status

The eventheader crate provides a simple and efficient way to log EventHeader-encoded Tracepoints via the Linux user_events system. The events can be generated and collected on Linux 6.4 or later (requires the user_events kernel feature to be enabled, the tracefs or debugfs filesystem to be mounted, and appropriate permissions configured for the /sys/kernel/.../tracing/user_events_data file).

This crate uses macros to generate event metadata at compile-time, improving runtime performance and minimizing dependencies. To enable compile-time metadata generation, the event schema must be specified at compile-time. For example, event name and field names must be string literals, not variables.

In rare cases, you might not know what events you want to log until runtime. For example, you might be implementing a middle-layer library providing event support to a dynamic top-layer or a scripting language like JavaScript or Python. In these cases, you might use the eventheader_dynamic crate instead of this crate.

Dependencies