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

Feature: Syscall #6

Merged
merged 8 commits into from
Jul 24, 2020
Merged

Feature: Syscall #6

merged 8 commits into from
Jul 24, 2020

Conversation

Skrinikov
Copy link
Contributor

Implements the iovisor's syscount code in rust

Only difference so far between the outputs is that it does not show counts/latency by process. They implemented it by reading /proc/{pid}/comm and I'm trying to figure out a way to do it with bpf only. e.g. BPF_HASH(pid, BPF_HASH(..))

Possible bug:
The bpf table in rust never seems to be empty. i.e. there would always be an entry with key=0 even after I call delete_all. And syscall=0 maps to read so you see the following whenever there are no actual values.

SYSCALL                COUNT  time (ns)       
read                   0      0  

@brayniac
Copy link
Contributor

For now, can we skip printing when count is zero with a todo in the code explaining why?

Also, if you don't mind opening an issue in rust-bcc - I want to take a deeper look into this. Please link it to this PR for reference.

I will review the PR tomorrow. Thanks!

Cargo.toml Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
src/syscalls/main.rs Outdated Show resolved Hide resolved
@brayniac brayniac merged commit f3329eb into rust-bpf:master Jul 24, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants