-
Notifications
You must be signed in to change notification settings - Fork 6
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
No way to specify PERF_FLAG_FD_OUTPUT (?) #28
Comments
If it might require a change to the signature of Open, it seems worth fixing before trying to publish this in golang.org/x/... |
The man page for PERF_FLAG_FD_OUTPUT says "broken since Linux 2.6.35". My memory is a little hazy, but I believe you're meant to use PERF_EVENT_IOC_SET_OUTPUT, which is (*Event).SetOutput in this API. |
Please let me know if that works as expected. I see now there is a big comment on SetOutput, and I don't remember all the details. |
I'm yet to succeed at getting this to work but I've only had limited time to try so far. It seems to make sense to me. However, what if the kernel introduces a new useful flag in the future? How could they be specified then? Given current use cases it seems all good, though, so I'm happy to close this. |
@pwaller were you able to successfully achieve your goal? I also would like to reduce the number of ring buffers I need to consume. Your reason is better than mine (ordering guaranteed by the kernel). But then you also mention you were unable to make it work. It is my understanding that this functionality (setting the output) is used by BPF so it is not considered broken. |
I don't think I got to the end of my journey of trying to get BPF working as I wanted to. Please file another issue if you have another legitimate use case for it. I'm going to close this one for now. |
As far as I can tell, there is no way to pass flags into perf.Open.
Here it's passed as 0:
perf/perf.go
Line 121 in 6861f4b
I want to pass PERF_FLAG_FD_OUTPUT so that I can coalesce tracepoint events into a single ring buffer, where it is useful to preserve their ordering.
The text was updated successfully, but these errors were encountered: