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

PerfEvent: add option to set the inherit bit #807

Closed

Conversation

akhramov
Copy link

@akhramov akhramov commented Oct 4, 2023

The inherit bit allows extending perf scope to the new child processes.

(I am not sure about the API, though)

@netlify
Copy link

netlify bot commented Oct 4, 2023

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 548c131
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/651ef0d6139ccf00086c9842
😎 Deploy Preview https://deploy-preview-807--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mergify
Copy link

mergify bot commented Oct 4, 2023

Hey @alessandrod, this pull request changes the Aya Public API and requires your review.

@mergify mergify bot requested a review from alessandrod October 4, 2023 18:05
@mergify mergify bot added api/needs-review Makes an API change that needs review aya This is about aya (userspace) test A PR that improves test cases or CI labels Oct 4, 2023
@akhramov akhramov force-pushed the feature/perf-event-inherit-child branch from 0f44f4a to 548c131 Compare October 5, 2023 17:22
The inherit bit allows extending perf scope to the new child
processes.
@alessandrod
Copy link
Collaborator

Thanks for the PR!

(I am not sure about the API, though)

What does libbpf do? I'm inclined to say we should set inherit=1 by default?

@akhramov
Copy link
Author

akhramov commented Oct 7, 2023

What does libbpf do

https://github.com/torvalds/linux/blob/82714078aee4ccbd6ee7579d5a21f8a72155d0fb/tools/lib/bpf/libbpf.c#L12441-L12448

It doesn't set the bit either.

I'm inclined to say we should set inherit=1 by default?

We can, but it can ruin it for users who don't expect events from the sub-processes.

@alessandrod
Copy link
Collaborator

I see.

I think inherit applies to all variants tho right? So maybe it should be an extra bool argument to attach()?

@alessandrod
Copy link
Collaborator

Ping? 😊

@akhramov
Copy link
Author

Hey, sorry for the delay. I found my way around this, so probably we should close the PR.

@akhramov akhramov closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/needs-review Makes an API change that needs review aya This is about aya (userspace) test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants