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

Revamp dotnet-pgo arguments #48680

Merged
merged 4 commits into from
Feb 25, 2021

Conversation

davidwrighton
Copy link
Member

  • Add a document describing the behavior and how it is expected to be used.
  • Rework the existing command line handling to implement the proposed create-mibc command. (the merge command is still entirely TBD).

- Revamp command line to more logical model where the options for jittrace collection and mibc collection are distinct
- Fix error printing logic
- Factor command line processing into its own file
@davidwrighton
Copy link
Member Author

@dotnet/crossgen-contrib

@AndyAyersMS @briansull Andy, could you take a look at the spec I wrote up, and provide feedback?


In order to use dotnet-pgo you will need to:

1. Collect traces of you application with at least the following trace setting. `Microsoft-Windows-DotNETRuntime:0x1C000080018:4`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an example of doing this, say via dotnet-trace?

If using trace file format that supports multiple process tracing, specify some combination of the `--pid`, `--process-name` and `--clr-instance-id` switches as needed. When run from the command line in situations where these arguments are needed, the valid args will be printed to the console. Usage of the nettrace file format is recommended for users attempting to run this tool as part of a CI system.

The `dotnet-pgo` tool is designed to run on a machine which has the same file system layout as the trace. If this is not the case, `dotnet-pgo` may not be able to find assemblies loaded by the application. In those cases, the `--reference` switch may be used to inform `dotnet-pgo` where to find assemblies that are part of the application.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the argument for --reference supposed to be a full path to an assembly, or a directory where the tool will search for missing assemblies, or ...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This argument is a file or path with wild cards. I'll add a note.

--verbosity <arg> Adjust verbosity level.
--compressed Generate compressed mibc
-h, --help Display this usage message.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely going to need some sort of weighting/prioritization capability. Without it the longer-running scenario profile data may dominate the merged results.

And to figure out suitable weights we may need some sort of analysis capability....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but I think we can bolt that on to this by adding paremeters to the input by adding a ,[flags] after the filename on input.

Copy link
Member Author

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments based on attempting to make the naming a bit more consistent.

--verbosity <arg> Adjust verbosity level.
--compressed Generate compressed mibc
-h, --help Display this usage message.
```
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but I think we can bolt that on to this by adding paremeters to the input by adding a ,[flags] after the filename on input.

If using trace file format that supports multiple process tracing, specify some combination of the `--pid`, `--process-name` and `--clr-instance-id` switches as needed. When run from the command line in situations where these arguments are needed, the valid args will be printed to the console. Usage of the nettrace file format is recommended for users attempting to run this tool as part of a CI system.

The `dotnet-pgo` tool is designed to run on a machine which has the same file system layout as the trace. If this is not the case, `dotnet-pgo` may not be able to find assemblies loaded by the application. In those cases, the `--reference` switch may be used to inform `dotnet-pgo` where to find assemblies that are part of the application.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This argument is a file or path with wild cards. I'll add a note.

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@davidwrighton davidwrighton merged commit 8065f95 into dotnet:master Feb 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2021
@davidwrighton davidwrighton deleted the dotnet-pgo-argrevamp branch April 20, 2021 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants