Crates.io | eventheader |
lib.rs | eventheader |
version | 0.4.0 |
source | src |
created_at | 2023-05-09 22:57:47.789131 |
updated_at | 2024-04-12 23:51:21.910714 |
description | Rust API for eventheader-encoded Linux Tracepoints via user_events |
homepage | |
repository | https://github.com/microsoft/LinuxTracepoints-Rust |
max_upload_size | |
id | 860860 |
size | 152,251 |
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.