8000 Add support for parsing `Record`s via the `perf_event_data` crate by Phantomical · Pull Request #7 · Phantomical/perf-event · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for parsing Records via the perf_event_data crate #7

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

Merged
merged 10 commits into from
May 15, 2023

Conversation

Phantomical
Copy link
Owner

As in the title, this PR uses the perf_event_data crate to add support for parsing Records gotten from a sampler. I've also replaced the implementation details of the various counter read related structs with types from perf_event_data.

The detailed changes here are

  • perf_event_data is now reexported as the data module in the crate root. I have used #[doc(inline)] so that the docs are inlined into the main crate.
  • The internals of GroupData, GroupEntry, GroupIter, and CounterData have all been replaced with types from perf_event_data. No public API changes have been made here.
  • Counter now keeps a ParseConfig from perf_event_data internally instead of just a ReadFormat value. This can now be accessed via Counter::config. This increases the size of Counter by 16 bytes but I don't think that that is an issue.

@Phantomical Phantomical merged commit 4b162cb into master May 15, 2023
@Phantomical Phantomical deleted the perf-data branch May 15, 2023 05:50
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.

1 participant
0