Rename the superpmi.py asmdiffs output directory (#50403)
authorBruce Forstall <brucefo@microsoft.com>
Tue, 30 Mar 2021 22:45:56 +0000 (15:45 -0700)
committerGitHub <noreply@github.com>
Tue, 30 Mar 2021 22:45:56 +0000 (15:45 -0700)
commita5b829e9c7c6d672262c50a3780bbff426ec1266
tree33f3a0b746b127c4bc6a00f2d495072be2394944
parent01081d62d5703e475b720277feac9b000bbcd1dd
Rename the superpmi.py asmdiffs output directory (#50403)

* Rename the superpmi.py asmdiffs output directory

Previously, the directory name was `asm.os.arch.build_flavor`.
Now, use the MCH file name instead. Since the MCH filename of our
collections has the target os/arch/flavor, those components will still
be there (but will be based on the MCH file, not the host; this is
important if you are doing cross-compile asm diffs). It will
also have the MCH base name, such as "benchmarks.run", to help
distinguish different runs. Of course, if there is a conflict with
a previous run, `.1`, `.2`, etc., is appended to the directory name.

Also, add a new, optional `-tag` option to `superpmi.py asmdiffs` to
allow specifying an additional word to prefix the artifacts folder
base name. This might help more easily distinguish different experiments.

So, `superpmi.py asmdiffs -filter benchmarks -tag test2` might give you
dasm files in these directories:
```
c:\runtime\artifacts\spmi\asm.test2.benchmarks.run.windows.x64.checked.3\base
c:\runtime\artifacts\spmi\asm.test2.benchmarks.run.windows.x64.checked.3\diff
```

* Review feedback

Created `create_artifacts_base_name()` function.

Fixed `run_and_log` to display command line of command being
invoked at the specified log level. Currently only affects invoking
`jit-analyze`, which makes the `jit-analyze` command line visible
on the console, not just in the log file.
src/coreclr/scripts/superpmi.py