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

[Ktrace] Spawn and synchronize the ktrace and benchmark processes #166

Open
2 tasks
JiriPavela opened this issue Feb 3, 2024 · 0 comments
Open
2 tasks
Assignees

Comments

@JiriPavela
Copy link
Collaborator

The compiled userspace ktrace and benchmark processes are currently being invoked and terminated manually. Ktrace must automate correct spawning, synchronization and termination of those processes. However, ktrace and sometimes the benchmarks have to run with elevated privileges (sudo) which complicates things with subprocess. Ktrace needs to spawn a new python script with sudo privileges so that subprocess polling and termination of sudo processes works correctly.

  • Create a separate collection script that will be invoked with sudo privileges and manage both ktrace and benchmark process.
  • Correctly synchronize the two processes, most notably:
    • The benchmark process must start only after ktrace successfully loads and attaches the BPF program.
    • The ktrace process must be terminated only after the benchmark finishes (or a timeout is reached) and the leftover event records in the BPF ring buffer are processed.
@JiriPavela JiriPavela converted this from a draft issue Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant