New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sending large eBPF events more memory efficient #119
Merged
MatteoNardi
merged 19 commits into
main
from
73-make-sending-large-ebpf-events-more-memory-efficient
Jan 16, 2023
Merged
Make sending large eBPF events more memory efficient #119
MatteoNardi
merged 19 commits into
main
from
73-make-sending-large-ebpf-events-more-memory-efficient
Jan 16, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove the deprecated StringArray and DataArray, which have been replaced by the dynamic buffer. See: - bpf-common/include/buffer.bpf.h - bpf-common/src/parsing/buffer_index.rs
MatteoNardi
force-pushed
the
73-make-sending-large-ebpf-events-more-memory-efficient
branch
from
December 5, 2022 15:20
7328b57
to
643175e
Compare
A warning was making all CI builds but x86_64 fail (I guess `-Werror` got somehow enabled) Also, since warnings are generally trivial to solve, but make the actual compiler output hard to decipher, I think it's better to force to address them.
banditopazzo
requested changes
Jan 13, 2023
you can update |
also in |
MatteoNardi
force-pushed
the
73-make-sending-large-ebpf-events-more-memory-efficient
branch
from
January 13, 2023 15:59
4a37829
to
c41ad7f
Compare
Old code didn't take advantage of dynamic buffer and always wrote the whole event, even if most if it was unused. Create an output.bpf.h with macros and utility functions for emitting perf events.
Improve get_path_str and make it compatible again with 20 components, as before the dynamic buffer refactor.
banditopazzo
approved these changes
Jan 16, 2023
…-ebpf-events-more-memory-efficient
MatteoNardi
deleted the
73-make-sending-large-ebpf-events-more-memory-efficient
branch
January 16, 2023 16:49
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make sending large eBPF events more memory efficient
This fixes #73 by removing variable-length fields from the eBPF event payloads and adding them to a dynamic buffer, sent after the event.
bpf-common/include/buffer.bpf.h
struct buffer_index
is used on the eBPF sidestruct BufferIndex
is used on the Rust sideIntoPayload
trait was introduced.bytes::Bytes
for buffer management, this results in less data copying.event::Payload
This was the simplest solution I could envision for #73.
I have
cargo fmt
;cargo clippy
;cargo test
and all tests pass;