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

Create a summary Markdown file for all asm diffs #54430

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

BruceForstall
Copy link
Member

Create a per-MCH file summary.md file, then accumulate them all into
a single overall summary Markdown file, for use in GitHub comments.
Uses the existing jit-analyze --md functionality.

Also, change asm diffs to not report missing data or asm diffs as a
replay failure.

Finally, don't overwrite superpmi.log files (or the new diff_summary.md files):
create new, unique file names for each run.

Create a per-MCH file summary.md file, then accumulate them all into
a single overall summary Markdown file, for use in GitHub comments.
Uses the existing `jit-analyze --md` functionality.

Also, change asm diffs to not report missing data or asm diffs as a
replay failure.

Finally, don't overwrite superpmi.log files (or the new diff_summary.md files):
create new, unique file names for each run.
@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 Jun 18, 2021
@BruceForstall
Copy link
Member Author

@kunalspathak @dotnet/jit-contrib PTAL

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

Minor comments.

# Don't report as replay failure asm diffs (return code 2) or missing data (return code 3).
# Anything else, such as compilation failure (return code 1, typically a JIT assert) will be
# reported as a replay failure.
if return_code != 2 and return_code != 3:
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 superpmi replay, so why would it get return_code == 2 (asm diffs failure)?

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 is the asm diffs case (only).

I'll go ahead and add similar "ignore" code to the replay case, but only for missing data.

summary_mch_filename = os.path.basename(summary_mch) # Display just the MCH filename, not the full path
summary_file = summary_file_info[1]
with open(summary_file, "r") as read_fh:
write_fh.write(summary_mch_filename + ":\n\n")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
write_fh.write(summary_mch_filename + ":\n\n")
write_fh.write("##" + summary_mch_filename + ":" + os.linesep + os.linesep)

Copy link
Member Author

Choose a reason for hiding this comment

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

According to the docs (https://docs.python.org/3/library/os.html#os.linesep), you shouldn't use os.linesep when writing in text mode: Python auto-converts.

The ## is a good idea.

@BruceForstall BruceForstall merged commit fd7e924 into dotnet:main Jun 18, 2021
@BruceForstall BruceForstall deleted the CreateSpmiSummaryMarkdown branch June 18, 2021 19:23
@ghost ghost locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants