Commit Graph

6 Commits (4742e0348281f37fd1abac01c756057bf98f1a24)

Author SHA1 Message Date
Thomas Eizinger 4742e03482
De-duplicate `panic_handler` and `main`-stub with macro 4 weeks ago
Thomas Eizinger 267796f1f5
Feature-gate `no_std` and `no_main`
The `no_std` and `no_main` attributes are only needed when we compile
the eBPF kernels for the "bpf" architecture. By feature-gating them on
the target architecture, we ensure the kernels compile just fine on a
host-architecture like x64. They won't be able to do anything
meaningfully but it is useful within the context of the larger workspace
they are embedded in as it allows `cargo build --workspace` and `cargo
test --workspace` to just work.
4 weeks ago
Thomas Eizinger c005ad30ed
Use correct cfg for panic handler 4 weeks ago
Tamir Duberstein e0c4948e36 Extract integration-common for shared types 5 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
Andrew Werner e2cf734490 aya: Implement RingBuf
This implements the userspace binding for RingBuf.

Instead of streaming the samples as heap buffers, the process_ring
function takes a callback to which we pass the event's byte region,
roughly following [libbpf]'s API design. This avoids a copy and allows
marking the consumer pointer in a timely manner.

[libbpf]: https://github.com/libbpf/libbpf/blob/master/src/ringbuf.c

Additionally, integration tests are added to demonstrate the usage
of the new APIs and to ensure that they work end-to-end.

Co-authored-by: William Findlay <william@williamfindlay.com>
Co-authored-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
2 years ago