* Add superpmi-replay pipeline file
* Add superpmi-replay-job.yml that downloads collection
* Moved superpmi-replay-job to right location
* make sure to have spmi collection after jit build
* annotate displayName with windows/OSX
* Make osGroup=windows
* Add helixType (if that matters)
* Add some more variables
* skip restore internal tools
* Just use build-jit-job directly
* Hardcode windows.x64.checked
* Add -download_all -download_raw options to superpmi.py
* Seperate 2 jobs
* Fix Upload artifacts
* Fix uploadAsArtifacts
* Fix to uploadAsArtifacts
* comment upload to azure storage temporarily
* Set variables inside superpmi-replay-job
* Entire pipeline
* minor fix
* Add some logging
* Fix the path
* fix file names and partition ids
* add sample download on helix machine
* fix helix-correlation-payload
* Download specific build
* Try to fix correlation payload directory
* Do not run windows x86 for now
* Log directory
* walktree instead of dir
* fix the bug
* Add workitem directory as Payload
* TEMP: Skip downloading collection during setup
* fix core_root
* Make download happen on helix
* Add windows x86
* Use -target_os and pass 1 item to helix
* Add some logging, have different work item ID
* fix the superpmi.log upload
* Fix the log location
- Also include Linux_x64
* one more fix to log_directory
* try to fix download results
* Move the matrix to proj file
* fix superpmi-replay.proj
* Cleanup
* Go back to download specific
* WorkTimeout for 5 hours
* Remove timeoutInMinutes
* fix errors related to logging
* return failed run result
* fix the appending logic
* Remove download-all and download-raw and instead add -no-progres
* do not show download progress, try fixing download file
* TO REVERT: Just try benchmark on windows x64/x86
* Use uploadAsArtifacts in build-jit-job
* Create dummy.txt in workitem directory
* create workitem_directory
* Build clrjit
* fix build-jit-job
* add dependsOn
* print params
* TO REVERT: Just run jitbuild win-x64
* minor
* move under jobParameters
* Cleanup
* review feedback
* Add a verbose jit done event into EventPipe MonoProfiler provider.
In order to get full method info in nettrace it is sometimes needed to
include method load verbose info. This can be done using Microsoft-
Windows-DotNETRuntime provider, but when using that it will also setup
a lot of managed diagnostics classes highly affecting startup profiling.
MonoProfiler provider, Microsoft-DotNETRuntimeMonoProfiler already emits
all needed info for advanced low level diagnostics, but currently lacks
verbose method load data when emitting jit done event.
Commit also adds new versions to JitDone as well as ClassLoaded including
generic type info if available as well as dropping use of ClrInstanceId since
it is not used/needed for events that are new.
* Add Mono Profiler events into EventPipe.
* Drop callstack on exception_clause profile event.
Needed since instrumentation uses mono_profiler_raise_exception_clause
used without wrapper and that in turn will cause incomplete stacks due
to transitioning into native code without informing unwinder.
* Fix build error.
* Add support to configure MonoVM diagnostics using env variable.
Adding new MONO_DIAGNOSTICS env variable that can include diagnostic
specific configs as well as --diagnostic-ports, meaning that its possible
to use that instead of DOTNET_DiagnosticPorts variable. It also add
variable to set some mono profiler settings needed very early during
startup to get GC alloc as well as exception clause checks.
In order to set needed options early in process, EventPipe component
calls a specific component_init method setting up needed config.
* Fix enable/disable callback registrations based on enable/disable bit mask.
* Add ability to specify callspec for method instrumentation.
Add --diagnostic-mono-profiler-callspec= to accept Mono callspec string.
Split keywords to enable method tracing and instrumentation, enables
ability to start instrumenting (but not emitting events) in one session
and then enable emitting events in later session.
If a callspec is used, instrumentation will be enabled on component init.
* Only init component once when using static component builds.
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.
I noticed a bunch of failures trying to run crossgen2 on these binaries
in one of our collections.
Also, make the checking case-insensitive: I saw that we were failing to
match "corerun.exe" against "CoreRun.exe" that was in the exclusion list.
* Add dependency on coreclr in monojit/monointerpreter jobs explicitly to solve pipeline issue #53842
* Use Helix Pre/Post hooks to kill linkering corerun instances to work around ARM64 agent issues
Co-authored-by: Kunal Pathak <[email protected]>
The Azure Storage REST API returns a maximum of 5000 results in
a single query. We have more results in the JIT rolling build set,
so we weren't finding queried git_hash values.
Generalize the query to loop using the "marker" continuation functionality.
We currently have about 800 superpmi collections results, but update
the superpmi.py script similarly for future proofing.
I also changed the query used by jitrollingbuild.py to specify a prefix,
to avoid requiring so many results. Probably should do the same thing for
SuperPMI collections. The downside is the REST api doesn't have a facility
for the prefix to be case-insensitive. I think it's ok to be case-sensitive,
but we'd need to verify that.
Adjust existing genEventing.py/genEventPipe.py to work together with Mono C build. Gives Mono ability to use same set of generated event serializers already used in CoreCLR.
Commit adds support for a optional inclusion file when calling eventing scripts, only adding specific events into generated source files. Since Mono won't handle all native events supported by CoreCLR (just a small amount initially) using the inclusion file will dramatically reduce the size of eventpipe static library, if inclusion file is not used, all events will be included (current behaviour).
Commit also switch existing hand written native events currently used in Mono over to the native events generated by the eventing scripts.
* Run SPMI collection on libraries-tests
* Only run for libraries-tests and change GUID
* fix error
* fix the collection name
* fix the timeoutInMinutes
* Download libraries test artifacts
* try to fix the libs+tests artifacts name
* Use artifacts name as is
* Fix the libraries test artifacts name
* Use librares_test.zip
* Modify the filter to unzip all *Tests.dll files
* Revert "Modify the filter to unzip all *Tests.dll files"
This reverts commit b62f7132ec084453495a92a3e336688585366908.
* Try to unzip libraries_zipped
* overwriteExistingFiles=true
* Fix the asset extension
- Also exclude files present in core_root
* fix artifacts name
* remove extra .
* Ignore permission error
* Copy common test files in CORE_ROOT
- And do not copy not *.Tests.dll" for PMI
* Perform collection for all libraries_tests assets
* Add UnicodeEncodeError EH
* Add PermissionError for copy2
* Copy all the test assests to core_root
* Make input_directory readonly
* make ch_mod recursive
* Add option of error_limit to superpmi.py
* Pass -failureLimit flag to parallel mode
* Revert "Only run for libraries-tests and change GUID"
This reverts commit 7f4cdda9cf4f49fc21a354f616a67554f65cd6ea.
* Fix superpmi.py private store filtering
Given a private store root, we need to filter to just
JIT/EE version, target OS, and target architecture, as we do for
Azure storage.
Previously, all files in the private store would always be considered,
no matter those settings.
* Remove unnecessary `lower()`
Remove `-jitoption` from `asmdiffs` and `collect` commands.
asmdiffs has `-base_jit_option` and `-diff_jit_option`.
Collect doesn't need the option, but processing the args does need
to set it to None since collect does a verification replay which
will check if the argument is set.
* Support private SuperPMI MCH file stores
In addition to the default Azure Storage SuperPMI location,
support private data stores via the new `-private_store` argument
to `replay` and `asmdiffs`. Private stores are typically file
system locations, or, on Windows, UNC paths.
There already exists the `-mch_files` argument, which allows you
to use any specified set of MCH files. However, when specifying
`-mch_files`, only those files are used and the normal stores are
ignored.
The private store mechanism is more convenient in some scenarios,
as it treats the specified private stores equivalently to the default
Azure Storage store.
In addition, both private stores and `-mch_files` handle downloading
ZIP files, un-ZIPping, and caching their contents.
Finally, a new top-level command `upload-private` is introduced to
help create private stores by specifying a set of MCH files to
use. It ZIP compresses the files to upload.
* Fix `-base_jit_path`
If `-base_jit_path` is specified on the command line, ensure it is a
full path before using it.
* 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.
Especially, fix the setting of environment when generating asm diffs
artifacts.
Before, we were setting the global environment before generating textual
dasm or dump files, and not resetting it. Because we currently loop over
all the MCH files doing (1) `superpmi -a` to determine binary diffs,
then (2) generating textual dasm; after the the environment was set in
(2), if there were further MCH files to process, then the variables would
get picked up in (1). This seemed to work ok, except made the diff process
extremely slow because the baseline and diff JIT were generating textual
dasm for every single MC, which was ignored, then we would re-generate it
for any binary diffs.
Thus, for multiple MCH files, and diffs, things are MUCH faster now.
* COMPlus_JitDisablePGO will now block the jit from using profile data. Useful
for investigations and (someday) bug triage. Also disable GDV if we're disabling PGO
* `-base_jit_option` and `-diff_jit_option` can be used to pass options to
superpmy.py asmdiffs.
* Fix SPMI file name computation to better handle cases where the directory is
a relative path.
* Enhance `mcs -jitflags` output to describe how many method contexts have
PGO data, and which kinds of data they hold. Useful for validating that an
SPMI collection done via dynamic PGO has actually collected an interesting
set of jit requests.
Azure CLI authentication is currently disabled (the current
unauthenticated mode will be used).
To use SuperPMI collections and JIT rolling builds after Azure
authentication is enabled, you will need to install the Azure CLI from:
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
and then log in using `az login` before running any superpmi.py
commands.
* Do not pass --use-zapdisable to dotnet
But instead pass to individual CoreRun.exe that is launched during benchmark run. That way we do not slow down the launch of dotnet.exe process.
* Fail superpmi collection pipeline if there was no valid .mch files were found to merge
* Upload merged .mch files as zipped artifacts
TODO: Upload the superpmi.log from all the partition runs
* TEMP: New Jit guid
- Add new JIT guid so we don't overwrite the existing .mch files
- Disable all the runs except benchmarks
* add trailing path sep
* Upload superpmi.logs separately
* Use PublishPipelineArtifacts instead of upload artifacts
* properly pass zapdisable to CoreRun.exe
* Revert "TEMP: New Jit guid"
This reverts commit e89ef69625e4e57bb622fc35ff66d82f14b34285.
* Remove CoreClrTestBuildHost from benchmark run
* fix --envVars for benchmarks run
* add missing space
* temporary disable other runs
* Revert "temporary disable other runs"
This reverts commit 2926d1f582061eee6c7852046982ffb5107887b3.
* Enable EhWriteThry for SingleDef
* If EhWriteThru is enabled, DoNotEnregister if variable is not singleDef
* Revert code in ExecutionContext.RunInternal
* Revert code in AsyncMethodBuildCore.Start()
* Make sure we do not reset lvSingleDef
* Consitent display of frame offset
misc change in superpmi.py
* Use lvEHWriteThruCandidate
* Do not enregister EH Var that has single use
* do not enregister simdtype
* add missing comments
* jit format
* revert an unintended change
* jit format
* Add missing comments
Also change from `--jitoption` to `-jitoption` per convention where
options taking an arg have just one dash.
Fixes#48919.
Also add a missing `_` to the download name.
Co-authored-by: Kunal Pathak <[email protected]>
Did a second search of master in the repo since all the M2M changes went
in and found some remaining places that weren't included in the
previous change.
Refactor download into a function.
Add newline after download is done.
Allow baseline JIT download to show it is being downloaded
(it was suppressed before).
Add new flag `--tiered_compilation` to enable collection of runs with tiered
compilation enabled (by not setting `COMPlus_TieredCompilation=0`).
Note `COMPlus_TieredCompilation` has no impact on prejitting or on replay.
Also be more tolerant of utf-8 encoding issues, in case we see asserts in
methods or classes with funny names.
* Fix SuperPMI Linux collections
1. Run dotnet for jitutils with jitutils dir as the current working dir.
2. Run dotnet.sh/cmd script before running bootstrap (and `dotnet restore`)
to ensure `.dotnet` directory exists.
* Superpmi on Microbenchmarks
* Fix the mch file path name
* distribute the benchmarks in 30 partitions
* Set input directory for benchmarks
* Some fixes to superpmi_benchmarks
Also update the GUID so we don't overwrite the existing collections.
* fix the name of partition_index and partition_count
* Point the core_root path to the superpmi script
* fix python to invoke for setup
* Add verbosity and include all benchmarks
* Fix the benchmarks invocation
* use benchmarks_ci.py script
* run all benchmarks
* fix the performance source code path
* see why dotnet install fails
* Comment all jobs except benchmarks
* update the right fork
* Switch back to doing installing dotnet on azure machine
* Put dotnet in script
* fix dumpMap, revert change in superpmi.py
* Produce artifacts in temp folder
- Disable mcs -strip for now
- Pass the JitName variable
* Experimental: Exit on failure
* Revert "Produce artifacts in temp folder"
This reverts commit afdfbd4b03a684d780ef06f644dba0dcf0621438.
* Use JitName
* Use workitem folder instead of correlation
* fix typo in WorkItemDirectory
* Set the payload directory
* print error message before exiting
* fix some linux issues
* Make dotnet executable
* resolve merge conflicts
* fix typo from merge conflict
* add logging around chmod
* fix the is_windows condition
* cleanup and disable linux arm/arm64
* remove the unwanted parameter
* match up the GUID
* why is this returning nothing
* Make ThreadPool emit events via NativeRuntimeEventSource
* found error...
* hack around having duplicate events generated
* make portable threadpool fire events through nativeruntimeeventsource
* make the initializer live in correct namespace
* EventListener tests are passing now
* make native QCall endpoints that sink into LTTng
* send events through XplatEventLogger sink
* Fix merge error
* double registration
* fix callback not getting handled when lttng is enabled
* cleanup 1
* rename file
* remove stale comments
* remove stale comment
* undo useless change
* fix broken EventListener
* apply code review feedback
* fix windows build
* fix incorrect qcall
* fix up ifdefs for Windows builds
* fix ifdef
* put back removed code
* tests pass now
* Fix NativeRuntimeEventSource not getting enabled for lttng
* Add some more comments
* Add comment in generated code
* fix mono build
* PR feedback
* fix typo
* code review feedback
* Make superpmi collection with command more convenient
Allow a command to be searched for on the PATH.
* Allow searching core_root for tool
Fix help string
* Add crossgen2 automated SuperPMI collection of Core_Root libraries
Linux is excluded; there are uninvestigated crashes doing crossgen2 Linux collections.
I added logic to copy the runtime ".dotnet" directory to Helix machines to use as the
driver for crossgen2, but that doesn't work for cross-platform scenarios (e.g., Windows
x64 .dotnet, x86 Core_Root), so it's commented out for now and the same-Core_Root corerun.exe
is used as the crossgen2 driver.
Add `-collection_type` argument to superpmi-setup.py
Allow copying of .json files to Helix; needed by crossgen2.
Changed superpmi pipeline to run with DEBUG level logging from superpmi.py so it's
easier to see what happened when looking at Helix logs (without having to find and separately
download the superpmi.log file).
Changed superpmi.py to write stdout/stderr files to log on failure, so we can see why
crossgen2 failed.
Fix creation of log file directories when `-log_file` argument specified
Excluded many more native files from superpmi collection setup.
Fixes#47541
Extra:
1. If `-temp_dir` is specified to superpmi.py, normalize it to
an absolute path.
2. Add a superpmi.py collect `-exclude` option to avoid collecting
assemblies known to fail (and cause pop-up failures: see #47552).
(This isn't used by the automated collection, but is generally useful.)
3. Stop logging too-verbose message about CORINFO_SIG_INST handle
array illegal values, since it's "by design" for crossgen2
4. Force lower-casing of JIT-EE version string, for consistency.