Skip to content
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

Use strace's --seccomp-bpf option #2

Open
i-ky opened this issue Apr 16, 2023 · 1 comment
Open

Use strace's --seccomp-bpf option #2

i-ky opened this issue Apr 16, 2023 · 1 comment

Comments

@i-ky
Copy link
Contributor

i-ky commented Apr 16, 2023

Newer versions of strace support --seccomp-bpf option introduced in version 5.3:

Implemented usage of seccomp-bpf for stopping tracees only for filtered
syscalls. Use --seccomp-bpf option to enable.

It has huge impact on performance. According to my tests, strace command currently used by compile-db-gen adds ~100% overhead (i.e. build time doubles under strace). Simply adding --seccomp-bpf reduces overhead to ~10% making it almost unnoticeable.

I honestly don't know why strace developers did not make --seccomp-bpf a new default, but it definitely makes sense to use it in compile-db-gen, if available.

@i-ky i-ky changed the title Use srtace's --seccomp-bpf option Use strace's --seccomp-bpf option Apr 18, 2023
@sunlin7
Copy link
Owner

sunlin7 commented Jan 16, 2024

I'm still working on CentOS 7, kernel 3.10.0, strace 4.24.
Will update to the Ubuntu 20.04 this year, then will work on feature. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants