Ivan Diaz Sanchez [Thu, 20 May 2021 19:46:20 +0000 (19:46 +0000)]
Print R2RDump Statistics in the Output File Instead of Console (#52278)
* Moved R2RDump statistics from console to --out file
* Automated the fixup statistics report into a self-maintaining component.
* Optimized the minimum values by setting them at the beginning, and removing the Math.Max() calls.
Vladimir Sadov [Thu, 20 May 2021 19:23:39 +0000 (12:23 -0700)]
make TestBasePriorityOnWindows not fail when ruinning tests with `-low` (#53003)
Andy Ayers [Thu, 20 May 2021 18:56:11 +0000 (11:56 -0700)]
JIT: fix invocation of unboxed entry when method returns struct (#52998)
If a value class method returns a struct, and its unboxed entry point
requires a type context argument, make sure to pass the context argument
properly.
Also, fetch the type context (method table) from the box, rather than
creating it from the class handle we have on hand; this tends to produce
smaller code as we're often fetching the method table for other reasons
anyways.
Closes #52975.
Steve Pfister [Thu, 20 May 2021 17:44:08 +0000 (13:44 -0400)]
Enable Android arm device tests (#52935)
As a result of dotnet/xharness#584 being fixed, we can now run arm 32 bit apps on our arm64 devices.
Alexander Köplinger [Thu, 20 May 2021 16:48:31 +0000 (18:48 +0200)]
Fix installer tests on runtime-staging (#53025)
* Fix installer tests on runtime-staging
After https://github.com/dotnet/runtime/pull/52548 some installer tests that were using `PlatformSpecific(TestPlatforms.Windows)` started failing in the runtime-staging pipeline on Linux, even though they shouldn't have been executing.
Turns out this is because with https://github.com/dotnet/runtime/commit/
81771effb2097045b2fca49d4ee4ca252f1e5a94 we're adding the `-trait category=failing` on the runtime-staging pipeline.
This doesn't work since `PlatformSpecific` attribute works by setting the "failing" category.
To fix this use a separate trait that can be used to only run the specific tests we want in runtime-staging.
* Fix: Trait only works on class
Steve Harter [Thu, 20 May 2021 16:39:28 +0000 (11:39 -0500)]
JsonNode trimmability improvements (#52934)
Vladimir Sadov [Thu, 20 May 2021 16:00:03 +0000 (09:00 -0700)]
Couple simple cleanups in singlefile/bundle (#52995)
* compress all kinds of files (except DepsJson and RuntimeConfigJson)
* outdated comment
Jan Vorlicek [Thu, 20 May 2021 09:02:22 +0000 (11:02 +0200)]
Move metadata off the executable heaps (#52912)
* Move metadata off the executable heaps
This change moves metadata structures that manage blocks of heap memory
out of the heaps in preparation for the W^X changes that will make the
heap memory read-execute only and modifying the metadata would require
unnecessary mappings and unmappings of the memory as read-write.
The structures moved in this change are the following:
* LoaderHeapBlock
* FreeBlock
* HeapList
* Remove unnecessary m_pCurBlock from the UnlockedLoaderHeap
Johan Lorensson [Thu, 20 May 2021 07:08:42 +0000 (09:08 +0200)]
Add native EventPipe event source generation into Mono build. (#52844)
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.
Johan Lorensson [Thu, 20 May 2021 06:50:43 +0000 (08:50 +0200)]
Handle thread at safe point as managed frame in Sample Profiler. (#52972)
Viktor Hofer [Thu, 20 May 2021 06:28:04 +0000 (08:28 +0200)]
React to MSBuild Traversal and NoTargets SDK updates (#52895)
* Remove custom rebuild entry point in Build.proj
The rebuild target was added into the Traversal SDK here: https://github.com/microsoft/MSBuildSdks/commit/
fd7660d62b139f282926d98212b7aeb3e6460daa#diff-
ad560c0828c6bab536a01e43bb052bfce14a959b8df2c3f89cccfca0b399681c
* Update global.json
* Update global.json
* Update native-binplace.proj
* Update externals.csproj
* Update native-binplace.proj
* Update native-binplace.proj
* Default tfm for NoTargets projects
* Don't run GenFacades on ApiCompat.proj
* ApiCompat fix and packaging cleanup
* Fixes
* Only set if not multi-targeting
Aaron Robinson [Thu, 20 May 2021 06:27:43 +0000 (23:27 -0700)]
Ensure test delegates survive during native usage. (#53005)
Aaron Robinson [Thu, 20 May 2021 05:03:34 +0000 (22:03 -0700)]
Objective-C msgSend* support for pending exceptions in Release (#52849)
* Support checking for overridden methods during P/Invoke inline pass
* Objective-C runtime msgSend* functions are never inlinable.
* Update CrossGen2.
* Add comment on details of how we are testing the
SetMessageSendPendingException API.
* Disable the crossgen2smoke on OSX ARM64
David Wrighton [Thu, 20 May 2021 01:02:06 +0000 (18:02 -0700)]
Fix crossgen2 comp jobs (#52949)
- Remove experimental utf8 dll from list of dlls to compile
- Fix CORE_ROOT value to point at correct directory
- Add testResults.xml support for better test diagnostics
- Print out stdout and stderr for better debugging build time failures
hrrrrustic [Thu, 20 May 2021 00:34:49 +0000 (03:34 +0300)]
CoreLib missed Equals nullable annotations (#52167)
* add NotNullWhen attribute
Jeremy Koritzinsky [Wed, 19 May 2021 23:43:37 +0000 (16:43 -0700)]
Add basic natvis visualizations for some VM types (#52853)
Tlakaelel Axayakatl Ceja [Wed, 19 May 2021 20:04:03 +0000 (13:04 -0700)]
Enable single file analyzer in the runtime (#50894)
Summary:
Enables single file analyzer in the runtime by adding the ILLink.Analyzers package and the property EnableSingleFileAnalyzer equals to true
Deletes entries IL3000 and IL3001 in the CodeAnalysis.ruleset so the analyzer can actually produce these warnings otherwise the analyzer execution would be skipped. *Note*: tests warnings are controlled by CodeAnalysis.test.ruleset (this PR adds IL3002 to the CodeAnalysis.test.ruleset to disable the warning on tests)
Resolve warnings on single file dangerous patterns by:
- Annotating incompatible single file patterns with RequiresAssemblyFiles
- Suppressing the warning (because there is code that handles the incompatible code)
- Fixing the issue on code (remove the incompatible code and replace it with something that won't fail)
- Opening an issue to track fix and either annotate/suppress the current behavior
Sergey Andreenko [Wed, 19 May 2021 19:23:29 +0000 (12:23 -0700)]
Cut target.h into pieces. (#52952)
* Cut target.h into platform specific pieces.
* C_ASSERT is not used there.
* delete unused "REGNUM_MASK'.
* delete redefines of "REGMASK_BITS".
* add headers to JIT_HEADERS
Jose Perez Rodriguez [Wed, 19 May 2021 18:18:49 +0000 (11:18 -0700)]
Resolve ILLink warning on Microsoft.Extensions.Options.DataAnnotations (#52721)
* Resolve ILLink warning on Microsoft.Extensions.Options.DataAnnotations
* Fix build and add annotations to TOptions to try to keep as much as we can
Viktor Hofer [Wed, 19 May 2021 18:04:01 +0000 (20:04 +0200)]
Stop reading TargetFramework prop in props files (#52897)
* Stop reading TargetFramework prop in props files
The TargetFramework property isn't expected to be set in props files
before a project's body is evaluated.
Don't let BuildTargetFramework property fallback to TargetFramework as
BTF's sole intent is to convey the TargetFramework to filter to and not
the current selected TargetFramework. Reduce usage of BTF so that it is
only used in places where code is actually conditioned on filtering.
In addition to that, specify BuildTargetFramework as a global property for
all traversal builds so when invoking one of the traversal projects directly
(src.proj, ref.proj, etc.), BuildTargetFramework doesn't need to specified
manually to get the default behavior (filter on compatible to net6.0).
Remove the inferred BuildingNetCoreAppVertical because of that and
inline its meaning.
Make sendtohelix a normal NoTargets proj so that it has access to the
properties which were moved into the Directory.Build.targets file as
otherwise it wouldn't import that file.
Tarek Mahmoud Sayed [Wed, 19 May 2021 17:59:30 +0000 (10:59 -0700)]
Regression and Perf Fixes (#52956)
Fan Yang [Wed, 19 May 2021 17:29:51 +0000 (13:29 -0400)]
Disable a failing test (#52970)
Ulrich Weigand [Wed, 19 May 2021 17:29:39 +0000 (19:29 +0200)]
Add public Architecture enum value for s390x (#52906)
* Add S390x value to System.Runtime.InteropServices.Architecture enum
* Add native s390x architecture detection
Kevin Jones [Wed, 19 May 2021 16:55:29 +0000 (12:55 -0400)]
Support ChaChaPoly1305 on Android if available
In addition to making ChaCha/Poly work, this change refactors the "HasTag" implementation.
The CIPHER_HAS_TAG was used to determine if the GCMParameterSpec
configuration is needed for variable length tags.
While ChaCha20Poly1305 has authentication tags, it does not permit a tag
length other than 16 bytes, so there is nothing to configure.
This renames the CIPHER_HAS_TAG to be more specific that the cipher
supports more than one tag length, and removes it from ChaCha20Poly1305.
This simplifies the IV initialization a bit.
Filip Navara [Wed, 19 May 2021 16:23:22 +0000 (18:23 +0200)]
Implement iOS PAL for S.S.C.X509Certificates
Levi Broderick [Wed, 19 May 2021 16:08:44 +0000 (09:08 -0700)]
Obsolete SuppressIldasmAttribute and remove ildasm.exe support for it (#50951)
Mitchell Hwang [Wed, 19 May 2021 15:18:00 +0000 (11:18 -0400)]
[MacCatalyst][libraries] Add specific SkipOnPlatform and ActiveIssues instead of test level skip (#52859)
* [MacCatalyst][libraries] Add System.Console.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add Microsoft.Extensions.Hosting.Unit.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add System.Net.NetworkInformation.FunctionalTests SkipOnPlatform
* [MacCatalyst][libraries] Add System.IO.FileSystems.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add Microsoft.VisualBasic.Core.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Threading.Thread.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.IO.FileSystem.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Runtime.Extensions.Tests ActiveIssue
* [MacCatalyst][libraries] Remove test project level skips
* [MacCatalyst] Add forgotten PNSE and ActiveIssue
* [MacCatalyst][libraries] Coalesce MacCatalyst into iOS tvOS SkipOnPlatform
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Alexander Köplinger [Wed, 19 May 2021 11:24:49 +0000 (13:24 +0200)]
Fix link to servicing PR template (#52961)
The old URL didn't show the template anymore, just a generic GitHub page. Linking to the raw URL so `<!-- -->` comments are visible.
dotnet-maestro[bot] [Wed, 19 May 2021 08:04:07 +0000 (08:04 +0000)]
Update dependencies from https://github.com/dotnet/emsdk build
20210518.1 (#52932)
[main] Update dependencies from dotnet/emsdk
Kevin Jones [Wed, 19 May 2021 08:02:21 +0000 (04:02 -0400)]
Fix OpenSSL detection in PlatformDetection for Android (#52798)
Adam Sitnik [Wed, 19 May 2021 07:58:32 +0000 (09:58 +0200)]
Extend FileStreamOptions with BufferSize, allow to specify 0 to disable the buffering (#52928)
* extend FileStreamOptions with BufferSize
* allow to disable the buffering by setting bufferSize to 0
* Apply suggestions from code review
Co-authored-by: David Cantú <dacantu@microsoft.com>
Larry Ewing [Wed, 19 May 2021 07:57:52 +0000 (02:57 -0500)]
Remove exclusion for https://github.com/dotnet/runtime/issues/52384 (#52950)
Eric StJohn [Wed, 19 May 2021 06:22:04 +0000 (23:22 -0700)]
Remove the use of IsPartialFacadeAssembly in refererences (#52793)
* Remove the use of IsPartialFacadeAssembly in refererences
This flag requires assembly-re-writing to replace type-defs in reference
assemblies with type forwards, when the same type exists in references.
We've pretty much exclusively used this on .NETFramework, since it's
not friendly to source build (CCI isn't part of source build).
.NETFramework isn't going to be changing so it doesn't save us much
to generate these typeforwards in the build.
We also used these to make sure the netstandard surface area was
compatible with .NETFramework facades (we'd use the pre-rewritten
reference assemblies for contract), but this need goes away now that we
have package validation based APICompat that compares netstandard refs
to net4x facades.
* Fix some projects I missed after changing naming convention
* Fixup another project
* Fix build of System.System.Threading.AccessControl
* Adding a section to ref-source docs on .NETFramework facades
* Address feedback
Egor Bogatov [Wed, 19 May 2021 06:15:32 +0000 (09:15 +0300)]
JIT: Convert some of the old-style intrinsics to NamedIntrinsics (#52156)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Kunal Pathak [Wed, 19 May 2021 04:31:26 +0000 (10:01 +0530)]
Refactor LSRA's heuristics selection (#52832)
* refactor lsra
* Add missing return condition
* Minor cleanup
- summary docs
- Removed DEFAULT_ORDER
- Added order seq ID
* jit format
* fix linux build
* review feedback
* Remove TODO
Andy Ayers [Wed, 19 May 2021 03:09:27 +0000 (20:09 -0700)]
JIT: peel off dominant switch case under PGO (#52827)
If we have PGO data and the dominant non-default switch case has more than
55% of the profile, add an explicit test for that case upstream of the switch.
We don't see switches all that often anymore as CSC is quite aggressive about
turning them into if-then-else trees, but they still show up in the async
methods.
Ankit Jain [Wed, 19 May 2021 01:55:30 +0000 (21:55 -0400)]
[wasm] Cleanup native build parts of WasmApp.targets (#52732)
* [wasm] Split _WasmNativeBuild into separate targets, as steps
- this gives us more control over the flow, and will be useful for
dependency checking (future work)
* [wasm] WasmApp.targets: Decouple aot compilation from native relinking
* [wasm] Convert emcc flags from property to item, and use rsp files
The default arguments are still from `emcc-flags.txt`, which will get
converted into a rsp file and used with this, in a future PR.
* cleanup
* [wasm] Add new properties to explicitly control optimization level used
.. for compiling native files, and linking.
`$(WasmLinkOptimizationFlag)`, and `$(WasmCompileOptimizationFlag)`
note: right now `emcc-flags.txt` has flags already specified, but that
will go away in favor of only these flags (future work)
* [wasm] Add new properties to specify extra emcc flags
`$(EmccExtraLDFlags)`, `$(EmccExtraCFlags)`
* dummy
Eric Erhardt [Wed, 19 May 2021 01:51:44 +0000 (20:51 -0500)]
Remove From header validation from System.Net.Http (#52794)
* Remove From header validation from System.Net.Http
The From header is not commonly used and this logic adds a decent amount of code to System.Net.Http that can't be trimmed.
Fix #52664
Aaron Robinson [Wed, 19 May 2021 00:50:17 +0000 (17:50 -0700)]
Fix casting issue (#52948)
Alexander Köplinger [Tue, 18 May 2021 23:08:15 +0000 (01:08 +0200)]
Use OperatingSystem APIs instead of RuntimeInformation in more places (#52548)
* Use OperatingSystem APIs instead of RuntimeInformation in more places
These are recommended instead of the older APIs.
* PR feedback
Aleksey Kliger (λgeek) [Tue, 18 May 2021 21:36:02 +0000 (17:36 -0400)]
[build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms (#52915)
* [build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms
Possibly related to crashes on Android like this:
```
05-18 10:59:07.466 17076 17076 F libc : Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41 in tid 17076 (simplehellomaui), pid 17076 (simplehellomaui)
05-18 10:59:07.501 17104 17104 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
05-18 10:59:07.502 989 989 I tombstoned: received crash request for pid 17076
05-18 10:59:07.503 17104 17104 I crash_dump32: performing dump of process 17076 (target tid = 17076)
05-18 10:59:07.512 17104 17104 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-18 10:59:07.512 17104 17104 F DEBUG : Build fingerprint: 'google/crosshatch/crosshatch:11/RQ2A.210405.005/
7181113:user/release-keys'
05-18 10:59:07.512 17104 17104 F DEBUG : Revision: 'MP1.0'
05-18 10:59:07.512 17104 17104 F DEBUG : ABI: 'arm'
05-18 10:59:07.515 17104 17104 F DEBUG : Timestamp: 2021-05-18 10:59:07+0200
05-18 10:59:07.515 17104 17104 F DEBUG : pid: 17076, tid: 17076, name: simplehellomaui >>> com.microsoft.simplehellomaui <<<
05-18 10:59:07.515 17104 17104 F DEBUG : uid: 10364
05-18 10:59:07.515 17104 17104 F DEBUG : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41
05-18 10:59:07.515 17104 17104 F DEBUG : r0
bb4a5cd0 r1
b9c95a49 r2
00000000 r3
e94c7520
05-18 10:59:07.515 17104 17104 F DEBUG : r4
0000000c r5
00000000 r6
ff843c50 r7
ff843e70
05-18 10:59:07.515 17104 17104 F DEBUG : r8
b69547f8 r9
e99eac50 r10
00000000 r11
00000021
05-18 10:59:07.515 17104 17104 F DEBUG : ip
e94c74f0 sp
ff843c48 lr
bb31e0dd pc
bb3a4d24
05-18 10:59:07.531 709 709 E Layer : [Surface(name=Task=1)/@0x52e6b1a - animation-leash#0] No local sync point found
05-18 10:59:07.532 709 709 E Layer : [Surface(name=Task=1571)/@0x9c90165 - animation-leash#0] No local sync point found
05-18 10:59:07.706 17104 17104 F DEBUG : backtrace:
05-18 10:59:07.707 17104 17104 F DEBUG : #00 pc
000ddd24 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+9232) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #01 pc
000d7777 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (inline_method+622) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #02 pc
000ec0a3 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+67470) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #03 pc
000cda6d /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mini_method_compile+2264) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #04 pc
000cf413 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_inner+50) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #05 pc
000d1d7f /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_with_opt+1766) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #06 pc
0012d94d /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (common_call_trampoline+832) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #07 pc
0012d5cb /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_magic_trampoline+62) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #08 pc
0000006a <anonymous:
b7986000>
```
* move to host/target sections
Alexander Köplinger [Tue, 18 May 2021 21:24:24 +0000 (23:24 +0200)]
Fix backport GitHub Action (#52938)
The octokit client we get from @actions/github recently changed their API.
Egor Bogatov [Tue, 18 May 2021 20:35:20 +0000 (23:35 +0300)]
Don't call result.ToString() in Random.AssertInRange (#52918)
* Avoid calling result.ToString() when the Assert condition is not met
* handle other asserts
* Update Random.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Anirudh Agnihotry [Tue, 18 May 2021 20:03:27 +0000 (13:03 -0700)]
update branding (#52921)
Anton Firszov [Tue, 18 May 2021 19:22:32 +0000 (21:22 +0200)]
HttpStress: also disable firewall for HTTP2 (#52643)
We decided that we need to rule out the Windows Firewall as a cause for further failure types documented in #42211.
Miha Zupan [Tue, 18 May 2021 19:19:09 +0000 (21:19 +0200)]
Avoid test race condition between two completing requests (#52887)
hrrrrustic [Tue, 18 May 2021 19:16:09 +0000 (22:16 +0300)]
Obsolete Socket.UseOnlyOverlappedIO (#52475)
close #47163
Marek Safar [Tue, 18 May 2021 19:04:53 +0000 (21:04 +0200)]
Fix errors formatting to show full information in resources trimmed configs (#52305)
Egor Bogatov [Tue, 18 May 2021 18:28:30 +0000 (21:28 +0300)]
JIT: Optimize *x = dblCns to *x = intCns (#52298)
Nikola Milosavljevic [Tue, 18 May 2021 18:11:05 +0000 (11:11 -0700)]
Add CBL-Mariner deps package (#52924)
Andy Ayers [Tue, 18 May 2021 18:09:09 +0000 (11:09 -0700)]
JIT: don't allow negative edge weights (#52884)
If the solver wants to set the edge weight below zero, set it to
zero if within slop, or disallow if not.
Addresses assert seen in #52785.
Alexander Köplinger [Tue, 18 May 2021 18:04:32 +0000 (20:04 +0200)]
Disable ProcessorCount_Windows_RespectsJobCpuRateAndConfigurationSetting test on Mono (#52911)
It fails on Mono in the runtime-staging pipeline: https://github.com/dotnet/runtime/issues/52910
Viktor Hofer [Tue, 18 May 2021 18:00:35 +0000 (20:00 +0200)]
Fix OfficialBuildId property passing down to scripts (#52927)
* Fix OfficialBuildId property passing down to scripts
Regressed with https://github.com/dotnet/runtime/commit/
4267d564affb062f934126e285aed9d9608adfee
Jo Shields [Tue, 18 May 2021 17:56:40 +0000 (13:56 -0400)]
Add support for building and using Mac Catalyst offsets (#52777)
* Add support for building Mac Catalyst offsets, and use to create AOT compiler nupkgs
dotnet-maestro[bot] [Tue, 18 May 2021 17:35:47 +0000 (17:35 +0000)]
Update dependencies from https://github.com/mono/linker build
20210517.3 (#52903)
[main] Update dependencies from mono/linker
dotnet-maestro[bot] [Tue, 18 May 2021 16:11:57 +0000 (09:11 -0700)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210517.7 (#52901)
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21266.3 -> To Version 1.0.0-prerelease.21267.7
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adeel Mujahid [Tue, 18 May 2021 15:42:26 +0000 (18:42 +0300)]
Quote property value (#52917)
Pent Ploompuu [Tue, 18 May 2021 15:39:23 +0000 (18:39 +0300)]
Faster unsigned division by constants (#52893)
* Faster unsigned division by constants
* Fix Arm build and add some tests.
* Improve register allocation
* Fix ARM64 codegen
* Fix MULHI flags
* Remove ARM32 codegen
* Widen 32bit UDIV to 64bit MULHI when possible. Improve register allocation.
* Always widen 32bit UDIV to 64bit MUL/MULHI
* Cleanup
* Final optimization
* Fix typo
* Rebase and use inst_Mov instead of inst_RV_RV(INS_mov)
* Fix formatting (1 space)
dotnet-maestro[bot] [Tue, 18 May 2021 15:31:01 +0000 (17:31 +0200)]
[main] Update dependencies from dotnet/icu dotnet/xharness dotnet/llvm-project dotnet/runtime-assets dotnet/hotreload-utils (#52902)
* Update dependencies from https://github.com/dotnet/icu build
20210517.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 6.0.0-preview.5.21260.1 -> To Version 6.0.0-preview.5.21267.1
* Update dependencies from https://github.com/dotnet/xharness build
20210518.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21264.3 -> To Version 1.0.0-prerelease.21268.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20210517.1
runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
From Version 9.0.1-alpha.1.21260.1 -> To Version 9.0.1-alpha.1.21267.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20210517.1
System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 6.0.0-beta.21260.1 -> To Version 6.0.0-beta.21267.1
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20210517.1
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.1-alpha.0.21264.2 -> To Version 1.0.1-alpha.0.21267.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Ulrich Weigand [Tue, 18 May 2021 15:22:06 +0000 (17:22 +0200)]
Fix ABI problem when marshalling X509VerifyStatusCode on s390x
The X509VerifyStatusCode type is defined as an enum in C code, but as
a struct (with a single member) in C# code. This means that marshalling
this type only works correctly on platforms where the ABI treats these
two types as equivalent. This fails e.g. on Linux on s390x.
Fixed by changing all native functions that take X509VerifyStatusCode
as argument or return type to use a plain "int" instead.
Ulrich Weigand [Tue, 18 May 2021 15:16:21 +0000 (17:16 +0200)]
Allow building paltests without coreclr_misc (#52899)
Remove dependency on coreclr_misc for the paltests_install component.
Michal Strehovský [Tue, 18 May 2021 15:08:53 +0000 (17:08 +0200)]
Reflection-annotate the ReflectObj test (#52896)
* Reflection-annotate the ReflectObj test
* Delete reflectobj.reflect.xml
dotnet-maestro[bot] [Tue, 18 May 2021 14:08:39 +0000 (14:08 +0000)]
Update dependencies from https://github.com/dotnet/emsdk build
20210517.1 (#52839)
[main] Update dependencies from dotnet/emsdk
Marie Píchová [Tue, 18 May 2021 13:36:04 +0000 (15:36 +0200)]
Fixed state handling in case of StreamSend fails. (#52756)
Ulrich Weigand [Tue, 18 May 2021 12:48:38 +0000 (14:48 +0200)]
Build support for s390x: eng scripts (#52840)
Add support for Linux on s390x as host and target build architecture.
Adeel Mujahid [Tue, 18 May 2021 12:47:48 +0000 (15:47 +0300)]
Fix versions for Libs subset's native artifacts (#52799)
During the repo consolidation, we missed passing `OfficialBuildId`
argument to common script from all subsets, which resulted in default
version emitted in the binaries produced by Libs subset in the official
builds.
Aleksey Kliger (λgeek) [Tue, 18 May 2021 12:41:38 +0000 (08:41 -0400)]
[reflection] Add GC Unsafe transitions on embedding API functions (#52769)
Transition to GC Unsafe mode on every MONO_RT_EXTERNAL_ONLY function in
reflection.c
In particular, fix mono_reflection_type_from_name which is used in
https://github.com/xamarin/xamarin-android/blob/
681887ebdbd192ce7ce1cd02221d4939599ba762/src/monodroid/jni/embedded-assemblies.cc#L350
Fixes stack traces like
```
05-14 08:06:12.848 31274 31274 F DEBUG : #00 pc
00000b99 [vdso] (__kernel_vsyscall+9)
05-14 08:06:12.848 31274 31274 F DEBUG : #01 pc
0005ad68 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId:
6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG : #02 pc
00076511 /apex/com.android.runtime/lib/bionic/libc.so (abort+209) (BuildId:
6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG : #03 pc
0002afcd /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::mono_log_handler(char const*, char const*, char const*, int, void*)+141) (BuildId:
9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.848 31274 31274 F DEBUG : #04 pc
00112c5d /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (eglib_log_adapter+141) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #05 pc
00020fdf /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_logv+175) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #06 pc
0002113a /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_log+42) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #07 pc
00128892 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_transition_do_blocking+258) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #08 pc
0012a406 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_unbalanced_with_info+134) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #09 pc
0012a27e /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_internal+46) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #10 pc
000799a7 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_loader_lock+71) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #11 pc
000447a1 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_create_from_typedef+129) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #12 pc
0003c073 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_get_checked+99) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #13 pc
0003cc0f /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked_aux+735) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #14 pc
00037989 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked+73) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #15 pc
000cc5f4 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_internal+132) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #16 pc
000c9bce /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_with_rootimage+126) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #17 pc
000ca204 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (_mono_reflection_get_type_from_info+292) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #18 pc
000ca06e /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name_checked+334) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #19 pc
000c9f01 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name+49) (BuildId:
b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG : #20 pc
0001b40b /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(char const*)+427) (BuildId:
9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG : #21 pc
0001b551 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(_MonoString*)+113) (BuildId:
9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG : #22 pc
000211a7 /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::typemap_java_to_managed(_MonoString*)+39) (BuildId:
9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
```
Alexander Köplinger [Tue, 18 May 2021 12:05:38 +0000 (14:05 +0200)]
Cleanup eglib config handling on Windows (#52855)
We were using a hardcoded checked-in version of the config file on Windows, replace it with the CMake-generated one.
Zoltan Varga [Tue, 18 May 2021 11:19:51 +0000 (07:19 -0400)]
[mono][aot] Fix --full-aot-interp support on amd64. (#52861)
We need to generate more trampolines since a lot of runtime code generates
trampolines even in --full-aot-interp mode.
Fixes https://github.com/dotnet/runtime/pull/52848.
Tanner Gooding [Tue, 18 May 2021 10:33:52 +0000 (03:33 -0700)]
Port SIMDIntrinsicGetItem and SIMDIntrinsicSetItem to be implemented via HWIntrinsics (#52288)
* Port SIMDIntrinsicGetItem and SIMDIntrinsicSetItem to be implemented using SimdAsHWIntrinsic
* Apply suggestions from code review
Co-authored-by: Egor Chesakov <Egor.Chesakov@microsoft.com>
* Resolving mismerge
* Added a comment explaining why we sometimes return and sometimes do containment checks
* Update src/coreclr/jit/lsraarm64.cpp
Co-authored-by: Egor Chesakov <Egor.Chesakov@microsoft.com>
Co-authored-by: Egor Chesakov <Egor.Chesakov@microsoft.com>
dotnet-maestro[bot] [Tue, 18 May 2021 10:14:09 +0000 (10:14 +0000)]
[main] Update dependencies from dotnet/arcade dotnet/runtime dotnet/hotreload-utils dotnet/xharness (#52757)
[main] Update dependencies from dotnet/arcade dotnet/runtime dotnet/hotreload-utils dotnet/xharness
- Merge branch 'main' into darc-main-
317b66dc-7ef9-4236-b9c5-
988c4d1fe4bd
- Update Versions.props
- Update Versions.props
James Newton-King [Tue, 18 May 2021 08:58:59 +0000 (20:58 +1200)]
WinHttpHandler: Add support for bidirectional streaming (#51094)
Adam Sitnik [Tue, 18 May 2021 07:52:03 +0000 (09:52 +0200)]
Allow to specify file preallocation size (#51111)
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
Aaron Robinson [Tue, 18 May 2021 06:59:13 +0000 (23:59 -0700)]
Revert "Faster unsigned division by constants (#49585)" (#52885)
This reverts commit
e4b4807e2fae2164d9116fbcdd49ba9044461e7e.
Elinor Fung [Tue, 18 May 2021 05:04:12 +0000 (22:04 -0700)]
Conditionally run CallSitesAreUniquePerServiceTypeAndSlot test based on threading support (#52881)
Pent Ploompuu [Tue, 18 May 2021 03:06:50 +0000 (06:06 +0300)]
Faster unsigned division by constants (#49585)
* Faster unsigned division by constants
* Fix Arm build and add some tests.
* Improve register allocation
* Fix ARM64 codegen
* Fix MULHI flags
* Remove ARM32 codegen
* Widen 32bit UDIV to 64bit MULHI when possible. Improve register allocation.
* Always widen 32bit UDIV to 64bit MUL/MULHI
* Cleanup
* Final optimization
* Fix typo
Elinor Fung [Tue, 18 May 2021 01:17:23 +0000 (18:17 -0700)]
Stop including some unused files for p/invokes (#52865)
David Wrighton [Tue, 18 May 2021 00:51:40 +0000 (17:51 -0700)]
Add support in Reflection.Emit and GetInterfaceMap for static virtual methods (#52871)
- Remove logic in MethodBuild that disallows static abstract methods
- Add support in interface map for finding static virtuals, and enumerating them
- Add tests
dotnet-maestro[bot] [Tue, 18 May 2021 00:49:50 +0000 (17:49 -0700)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#52678)
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210512.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21255.6 -> To Version 1.0.0-prerelease.21262.4
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210513.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21255.6 -> To Version 1.0.0-prerelease.21263.4
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210514.6
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21255.6 -> To Version 1.0.0-prerelease.21264.6
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210515.5
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21255.6 -> To Version 1.0.0-prerelease.21265.5
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210516.3
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21255.6 -> To Version 1.0.0-prerelease.21266.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Omair Majid [Tue, 18 May 2021 00:45:50 +0000 (20:45 -0400)]
Always call CloseHandle in AsmMan::EmitManifest (#50372)
Unless it's an ERROR_INVALID_HANDLE.
Otherwise, we can leak the file handle.
Layomi Akinrinade [Mon, 17 May 2021 22:18:16 +0000 (15:18 -0700)]
Make JsonTypeInfo.ObjectType internal (#52850)
Andy Ayers [Mon, 17 May 2021 22:14:11 +0000 (15:14 -0700)]
Fix logic error in PGO schema comparison (#52822)
* Fix logic error in PGO schema comparison
* Revert "Fix logic error in PGO schema comparison"
This reverts commit
a3a977c4be10e545774d371642c87693f2989414.
* Fix merging of edge counts
Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
Jakob Botsch Nielsen [Mon, 17 May 2021 21:51:34 +0000 (23:51 +0200)]
Add SPGO support and MIBC comparison in dotnet-pgo (#52765)
This allows dotnet-pgo to generate .mibc files using the sample data
stored in the trace that it is processing. It implements support for
both last branch record (LBR) data and normal IP samples. The latter can
be produced using PerfView as normal while the former currently requires
using xperf with LBR mode enabled. For posterity, to enable both logging
required .NET events and LBR, the following commands can be used (on
Windows):
```
xperf.exe -start "NT Kernel Logger" -on LOADER+PROC_THREAD+PMC_PROFILE -MinBuffers 4096 -MaxBuffers 4096 -BufferSize 4096 -pmcprofile BranchInstructionRetired -LastBranch PmcInterrupt -setProfInt BranchInstructionRetired 65537 -start clr -on
e13c0d23-ccbc-4e12-931b-
d9cc2eee27e4:0x40000A0018:0x5 -MinBuffers 4096 -MaxBuffers 4096 -BufferSize 4096
scenario.exe
xperf.exe -stop "NT Kernel Logger" -stop clr -d xperftrace.etl
```
SPGO does not currently do well with optimized code as the mapping
IP<->IL mappings the JIT produces there are not sufficiently accurate.
To collect data in tier-0 one can enable two environment variables
before running the scenario:
```
$env:COMPlus_TC_QuickJitForLoops=1
$env:COMPlus_TC_CallCounting=0
```
When samples are used the associated counts will not typically look
valid, i.e. they won't satisfy flow conservation. To remedy this,
dotnet-pgo performs a smoothing step after assigning samples to the
flow-graph of each method. The smoothing is based on [1] and the code
comes from Midori.
The commit adds some new commands to dotnet-pgo. The --spgo flag can be
specified to create-mibc to use samples to create the .mibc file. Also,
even if --spgo is specified, instrumented data will still be preferred
if available in the trace. If spgo is not specified, the behavior should
be the same as before.
--spgo-with-block-counts and --spgo-with-edge-counts control whether
dotnet-pgo outputs the smoothed block or edge counts (or both). By
default block counts are output. The JIT can use both forms of counts
but will be most happy if only one kind is present for each method.
--spgo-min-samples controls how many samples must be in each method
before smoothing is applied and the result included in the .mibc. SPGO
is quite sensitive to low sample counts and the produced results are not
good when the number of samples is low. By default, this value is 50.
The commit also adds a new compare-mibc command that allows to compare
two .mibc files. Usage is dotnet-pgo compare-mibc --input file1.mibc
--input file2.mibc. For example, comparing a .mibc produced via
instrumentation and one produced via SPGO (in tier-0) for some JIT
benchmarks produces the following:
```
Comparing instrumented.mibc to spgo.mibc
Statistics for instrumented.mibc
# Methods: 3490
# Methods with any profile data: 865
# Methods with 32-bit block counts: 0
# Methods with 64-bit block counts: 865
# Methods with 32-bit edge counts: 0
# Methods with 64-bit edge counts: 0
# Methods with type handle histograms: 184
# Methods with GetLikelyClass data: 0
# Profiled methods in instrumented.mibc not in spgo.mibc: 652
Statistics for spgo.mibc
# Methods: 1107
# Methods with any profile data: 286
# Methods with 32-bit block counts: 286
# Methods with 64-bit block counts: 0
# Methods with 32-bit edge counts: 0
# Methods with 64-bit edge counts: 0
# Methods with type handle histograms: 0
# Methods with GetLikelyClass data: 0
# Profiled methods in spgo.mibc not in instrumented.mibc: 73
Comparison
# Methods with profile data in both .mibc files: 213
Of these, 213 have matching flow-graphs and the remaining 0 do not
When comparing the flow-graphs of the matching methods, their overlaps break down as follows:
100% █ (1.9%)
>95% █████████████████████████████████▌ (61.0%)
>90% ████████ (14.6%)
>85% ████▏ (7.5%)
>80% ████▋ (8.5%)
>75% █▊ (3.3%)
>70% █ (1.9%)
>65% ▎ (0.5%)
>60% ▎ (0.5%)
>55% ▏ (0.0%)
>50% ▏ (0.0%)
>45% ▏ (0.0%)
>40% ▎ (0.5%)
>35% ▏ (0.0%)
>30% ▏ (0.0%)
>25% ▏ (0.0%)
>20% ▏ (0.0%)
>15% ▏ (0.0%)
>10% ▏ (0.0%)
> 5% ▏ (0.0%)
> 0% ▏ (0.0%)
(using block counts)
```
I also made the dump command print some statistics about the .mibc that
was dumped. Hopefully some of this tooling can help track down #51908.
[1] Levin R., Newman I., Haber G. (2008) Complementing Missing and
Inaccurate Profiling Using a Minimum Cost Circulation Algorithm. In:
Stenström P., Dubois M., Katevenis M., Gupta R., Ungerer T. (eds) High
Performance Embedded Architectures and Compilers. HiPEAC 2008. Lecture
Notes in Computer Science, vol 4917. Springer, Berlin, Heidelberg.
https://doi.org/10.1007/978-3-540-77560-7_20
Juan Hoyos [Mon, 17 May 2021 20:40:01 +0000 (13:40 -0700)]
SingleFile diagnostic support - Add export table and DotNetRuntimeInfo to dumps (#52731)
* DACize PEDecoder::GetExport
* Ensure export table and runtimeinfo export are always present in a minidump
Mitchell Hwang [Mon, 17 May 2021 18:42:59 +0000 (14:42 -0400)]
[libraries][MacCatalyst] Update MacCatalyst min required CMake version (#52847)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Ulrich Weigand [Mon, 17 May 2021 18:10:48 +0000 (20:10 +0200)]
Build support for s390x: libraries (#52842)
Adds cmake and proj entries to support building for s390x.
Manish Godse [Mon, 17 May 2021 17:39:38 +0000 (10:39 -0700)]
enable regions by default in standalone gc (#52716)
* enable regions by default in standalone gc
* fix linux build break
* fix gcc build break.
* Missed one more build break for gcc
* CR Feedback.
Buyaa Namnan [Mon, 17 May 2021 16:51:22 +0000 (09:51 -0700)]
Use Platform-Guard Assertion Annotations for some known cases (#52689)
* Use platform guard attributes
Ulrich Weigand [Mon, 17 May 2021 16:23:07 +0000 (18:23 +0200)]
Build support for s390x: mono runtime (#52841)
Adds cmake and proj entries to support building for s390x.
Includes a bug fix to CMakeLists.txt where IS_BIG_ENDIAN
was used before it was defined, causing failures on big-
endian platforms.
Egor Bogatov [Mon, 17 May 2021 13:46:08 +0000 (16:46 +0300)]
follow up to https://github.com/dotnet/runtime/pull/52524 (#52714)
Egor Bogatov [Mon, 17 May 2021 13:27:12 +0000 (16:27 +0300)]
JIT: Fix asserts in fgSplitBlockAfterStatement and fgCheckStmtAfterTailCall (GDV-related) (#52274)
Tom Deseyn [Mon, 17 May 2021 12:48:52 +0000 (14:48 +0200)]
TcpReceiveSendGetsCanceledByDispose: fix test timing out with latest RHEL7 kernel (#52833)
The timeout on this test is less than the accumulated delay on retries,
which causes the test to timeout on a RHEL7 system that has the kernel bug fixed.
Dave Senn [Mon, 17 May 2021 12:38:13 +0000 (14:38 +0200)]
Removing duplicated "and" (#52826)
Minor change to "fix" that sentence... not really an issue but it makes more sense like this
Ulrich Weigand [Mon, 17 May 2021 08:48:40 +0000 (10:48 +0200)]
[mono] Add thunking to s390x for calls that will be patched (#52783)
Merge https://github.com/mono/mono/pull/21052 into dotnet runtime.
This fixes sporadic crashes due to code being patched non-atomically.
Vlad Brezae [Mon, 17 May 2021 08:45:45 +0000 (11:45 +0300)]
[interp] Pass correct argument to MINT_STOBJ_VT (#52752)
When emitting it as part of thread static store.
Tanner Gooding [Mon, 17 May 2021 04:51:12 +0000 (21:51 -0700)]
Refactor codegen and emit to centralize `mov reg, reg` handling (#52661)
* Refactor codegen and emit to centralize `mov reg, reg` handling
* Responding to PR feedback
Zoltan Varga [Sat, 15 May 2021 23:36:07 +0000 (19:36 -0400)]
[mono] Fix full aot compilation on android+x86. (#52816)
Fixes https://github.com/dotnet/runtime/issues/50493.
David Wrighton [Sat, 15 May 2021 21:00:36 +0000 (14:00 -0700)]
Fix references to MDArray methods (#52796)
dotnet-maestro[bot] [Sat, 15 May 2021 21:00:17 +0000 (14:00 -0700)]
Update dependencies from https://github.com/mono/linker build
20210514.1 (#52806)
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.5.21263.3 -> To Version 6.0.100-preview.5.21264.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Marek Safar [Sat, 15 May 2021 20:59:56 +0000 (22:59 +0200)]
Better formatting for parameters signature with no name (#52804)
It also allows distinguishing between empty and null name