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

-Add -g option to save sample indices following Go's PGO requirements #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insilications
Copy link

When converting perf.data, PerfDataConverter::GetOrCreateBuilder creates the event name using event_type.name(), adding an underscore and saving it in event_name. It then sets the type of the sample to event_name + "sample" (e.g. "cycles:u_sample").

The problem is that when using the converted perf.data with Go's PGO, it complains that the profile should have at least one of the indices with type/unit of samples/count or cpu/nanoseconds (https://go.dev/doc/pgo#alternative-sources). This adds the -g option to save the sample indices following Go's PGO requirements.

Add -g option to save sample indices following Go's PGO requirements,
with at least one of the indices having type/unit of samples/count or
cpu/nanoseconds. https://go.dev/doc/pgo#alternative-sources
Copy link

google-cla bot commented Aug 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@insilications
Copy link
Author

insilications commented Aug 17, 2024

Signed the CLA. I have no idea if perf_data_converter is the place to add support for this use case, but it could help people who are relying on perf_data_converter to create PMU profiles for use with Go's PGO.

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