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

#236 in Unix APIs

Download history 27/week @ 2024-07-22 90/week @ 2024-07-29 9/week @ 2024-08-05 11/week @ 2024-08-12 24/week @ 2024-08-19 54/week @ 2024-08-26 9/week @ 2024-09-02 123/week @ 2024-09-09 26/week @ 2024-09-16 39/week @ 2024-09-23 102/week @ 2024-09-30 8/week @ 2024-10-07 38/week @ 2024-10-14 24/week @ 2024-10-21 18/week @ 2024-10-28 15/week @ 2024-11-04

95 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