-
Notifications
You must be signed in to change notification settings - Fork 431
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
Improve save_args_to_submit_buf
#4217
Merged
Merged
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
geyslan
force-pushed
the
save-args-to-submit-1.1
branch
2 times, most recently
from
July 31, 2024 20:30
bc7e849
to
aa6f8e2
Compare
geyslan
changed the title
Reduce save_args_to_submit_buf
Improve Jul 31, 2024
save_args_to_submit_buf
geyslan
force-pushed
the
save-args-to-submit-1.1
branch
from
July 31, 2024 20:41
aa6f8e2
to
9882329
Compare
rscampos
reviewed
Aug 2, 2024
rscampos
approved these changes
Aug 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - congrats on the improvement and the clean code!
This replaces the switch case branches for a direct access to a type size table and uses bitmasking to decide about the code path to take. Improvements: | dist/tracee.bpf.o | Before (B) | After (B) | Diff (B) | (%) | |-----------------------|------------|-----------|----------|---------| | Size in Bytes | 14118048 | 14098024 | -20024 | -0.14% | | sys_exit_submit | Before (B) | After (B) | Diff (B) | (%) | |-----------------------|------------|-----------|----------|---------| | Interpr Size (xlated) | 25248 | 19200 | -6048 | -23.96% | | JITed Size (jited) | 16600 | 12161 | -4439 | -26.73% | | Memlock | 28672 | 20480 | -8192 | -28.57% | | Metric (1k evts) | Before (ns) | After (ns) | Diff (ns) | (%) | |---------------------|-------------|------------|-----------|--------| | Minimum Time | 184,797 | 167,025 | -17,772 | -9.62% | | Maximum Time | 217,418 | 201,527 | -15,891 | -7.31% | | Average Time | 201,117 | 189,893 | -11,224 | -5.58% | An improvement of ~ -11.22ns in the average time to process 1 single event. Benchmarked on: - AMD Ryzen 9 7950X 16-Core Processor - 64GB RAM Runned with: tracee -e execve,init_module,process_vm_writev,ptrace,arch_prctl,chdir
geyslan
force-pushed
the
save-args-to-submit-1.1
branch
from
August 5, 2024 12:16
9882329
to
cf34d1f
Compare
yanivagman
approved these changes
Aug 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
1. Explain what the PR does
cf34d1f chore: improve save_args_to_submit_buf
2. Explain how to test it
3. Other comments