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

JIT: annotate pseudo-edges in pgo schema and/or internal model #81638

Open
AndyAyersMS opened this issue Feb 4, 2023 · 3 comments
Open

JIT: annotate pseudo-edges in pgo schema and/or internal model #81638

AndyAyersMS opened this issue Feb 4, 2023 · 3 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@AndyAyersMS
Copy link
Member

Sparse edge instrumentation will sometimes add pseudo-edges into the flow graph to provide a complete picture of flow. For instance, there are pseudo-edges from each return back to method start, and from finally exits back to the first block of the finally.

When reconstructing counts from the sparse edge instrumentation data, we need to match up schema flow edges with actual flow edges so we can propagate the counts. Ideally we'd be looking at the exact same flow graph and use the same edge enumeration technique, so we can just internally note which edges were pseudo-edges and so won't have an actual edge, but we might also want to annotate the schema entries so an external client could potentially do the same sort of reconstruction, or so we can sanity check that we have the same flow graph during reconstruction that we had during instrumentation.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 4, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 4, 2023
@AndyAyersMS AndyAyersMS self-assigned this Feb 4, 2023
@ghost
Copy link

ghost commented Feb 4, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Sparse edge instrumentation will sometimes add pseudo-edges into the flow graph to provide a complete picture of flow. For instance, there are pseudo-edges from each return back to method start, and from finally exits back to the first block of the finally.

When reconstructing counts from the sparse edge instrumentation data, we need to match up schema flow edges with actual flow edges so we can propagate the counts. Ideally we'd be looking at the exact same flow graph and use the same edge enumeration technique, so we can just internally note which edges were pseudo-edges and so won't have an actual edge, but we might also want to annotate the schema entries so an external client could potentially do the same sort of reconstruction, or so we can sanity check that we have the same flow graph during reconstruction that we had during instrumentation.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS AndyAyersMS added this to the 8.0.0 milestone Feb 4, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 4, 2023
@AndyAyersMS
Copy link
Member Author

Pseudo-edges are now identified in the internal model via #81738. They are not externalized (persisted to the schema) but not clear if that's important yet.

@AndyAyersMS
Copy link
Member Author

Not clear we'll need this in 8.0 so moving to future.

@AndyAyersMS AndyAyersMS modified the milestones: 8.0.0, Future Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

1 participant