Skip to content

Conversation

@BruceForstall
Copy link
Contributor

The SuperPMI collection scripts were initially written to do
PMI-based collections, and crossgen2 and benchmarks were added
later. This change cleans up the scripts to only do what is
required for a particular collection type. E.g., don't clone and
build jitutils to get pmi.dll for crossgen2 collections, where it
is not needed. Additional documentation is added and things are
renamed to be more clear, if possible. Also, don't pass PMI-specific
arguments to superpmi.py for crossgen2 collections (where they are
ignored, but might be confusing to readers).

In addition, the superpmi_collect_setup.py script gets more argument validation.
This isn't terribly necessary since it's only called in one place in the CI
scripts, but it is useful for documentation, and helps when you are calling
the script manually as part of testing changes. I added a -payload_directory
argument that specifies where the correlation and work item payloads should
be placed, instead of assuming they should be in "well-known" directories
in the source tree. Once again, this is useful for testing.

The SuperPMI collection scripts were initially written to do
PMI-based collections, and crossgen2 and benchmarks were added
later. This change cleans up the scripts to only do what is
required for a particular collection type. E.g., don't clone and
build jitutils to get pmi.dll for crossgen2 collections, where it
is not needed. Additional documentation is added and things are
renamed to be more clear, if possible. Also, don't pass PMI-specific
arguments to superpmi.py for crossgen2 collections (where they are
ignored, but might be confusing to readers).

In addition, the superpmi_collect_setup.py script gets more argument validation.
This isn't terribly necessary since it's only called in one place in the CI
scripts, but it is useful for documentation, and helps when you are calling
the script manually as part of testing changes. I added a `-payload_directory`
argument that specifies where the correlation and work item payloads should
be placed, instead of assuming they should be in "well-known" directories
in the source tree. Once again, this is useful for testing.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 25, 2022
@ghost ghost assigned BruceForstall Aug 25, 2022
@ghost
Copy link

ghost commented Aug 25, 2022

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

Issue Details

The SuperPMI collection scripts were initially written to do
PMI-based collections, and crossgen2 and benchmarks were added
later. This change cleans up the scripts to only do what is
required for a particular collection type. E.g., don't clone and
build jitutils to get pmi.dll for crossgen2 collections, where it
is not needed. Additional documentation is added and things are
renamed to be more clear, if possible. Also, don't pass PMI-specific
arguments to superpmi.py for crossgen2 collections (where they are
ignored, but might be confusing to readers).

In addition, the superpmi_collect_setup.py script gets more argument validation.
This isn't terribly necessary since it's only called in one place in the CI
scripts, but it is useful for documentation, and helps when you are calling
the script manually as part of testing changes. I added a -payload_directory
argument that specifies where the correlation and work item payloads should
be placed, instead of assuming they should be in "well-known" directories
in the source tree. Once again, this is useful for testing.

Author: BruceForstall
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@BruceForstall
Copy link
Contributor Author

A test collection was done to validate these changes:

https://dev.azure.com/dnceng/internal/_build/results?buildId=1965888&view=results

@BruceForstall
Copy link
Contributor Author

@kunalspathak @dotnet/jit-contrib PTAL

@JulieLeeMSFT JulieLeeMSFT added this to the 8.0.0 milestone Aug 25, 2022
Copy link
Contributor

@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.

LGTM with nit comments.


parser = argparse.ArgumentParser(description="description")

parser.add_argument("-source_directory", help="path to source directory")
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition to introducing -payload_directory, did you just move these around or are there any real updates too that I am not spotting?

# payload
pmiassemblies_directory = os.path.join(workitem_directory, "pmiAssembliesDirectory")
input_artifacts = os.path.join(pmiassemblies_directory, coreclr_args.collection_name)
input_artifacts = os.path.join(workitem_payload_directory, "collectAssembliesDirectory", coreclr_args.collection_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider setting variable for "collectAssembliesDirectory" in yml which can be used in python script as well as proj file.

# Title : superpmi_collect_setup.py
#
# Notes:
#
Copy link
Member

Choose a reason for hiding this comment

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

@BruceForstall, can we delete run-pmi-diffs.py and other unused scripts in this directory? More than one scripts in this directory have stale references: 4-6 years old docker containers, Jenkins CI which is unused since 2019, downloading emulators from 2016 blobs which return 404-Not-Found etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Yes, we should do that. (But not in this change)

@BruceForstall
Copy link
Contributor Author

This change was subsumed by #74961

@BruceForstall BruceForstall deleted the CleanUpSuperPmiCollect branch September 7, 2022 20:08
@ghost ghost locked as resolved and limited conversation to collaborators Oct 8, 2022
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.

4 participants